Print/save manager module.
|
| type(printsavemanagertype) function, pointer, public | create_psm () |
| | Initialize or clear the print/save manager. More...
|
| |
| subroutine | allocate (this) |
| |
| subroutine | deallocate (this) |
| |
| subroutine | init (this) |
| |
| subroutine | read (this, linein, iout) |
| | @ brief Read a line of input and prepare the manager. More...
|
| |
| subroutine | set (this, ocaction, ocsetting, iout) |
| | @ brief set data from an input record. More...
|
| |
| logical function | should_print (this, kstp, endofperiod) |
| | @ brief Determine if printing is enabled for this time step. More...
|
| |
| logical function | should_save (this, kstp, endofperiod) |
| | @ brief Determine if saving is enabled for this time step. More...
|
| |
◆ allocate()
Definition at line 63 of file PrintSaveManager.f90.
64 class(PrintSaveManagerType) :: this
65 allocate (this%save_steps)
66 allocate (this%print_steps)
67 call this%save_steps%init()
68 call this%print_steps%init()
◆ create_psm()
- Returns
- the print/save manager
Definition at line 57 of file PrintSaveManager.f90.
58 type(PrintSaveManagerType),
pointer :: psm
◆ deallocate()
- Parameters
-
Definition at line 71 of file PrintSaveManager.f90.
72 class(PrintSaveManagerType) :: this
73 if (
associated(this%save_steps))
deallocate (this%save_steps)
74 if (
associated(this%print_steps))
deallocate (this%print_steps)
◆ init()
Definition at line 77 of file PrintSaveManager.f90.
78 class(PrintSaveManagerType) :: this
79 call this%deallocate()
◆ read()
| subroutine printsavemanagermodule::read |
( |
class(printsavemanagertype) |
this, |
|
|
character(len=*), intent(in) |
linein, |
|
|
integer(i4b), intent(in) |
iout |
|
) |
| |
|
private |
- Parameters
-
| this | this instance |
| [in] | linein | input line |
| [in] | iout | output file unit |
Definition at line 84 of file PrintSaveManager.f90.
86 class(PrintSaveManagerType) :: this
87 character(len=*),
intent(in) :: linein
88 integer(I4B),
intent(in) :: iout
90 character(len=len(linein)) :: line
91 integer(I4B) :: lloc, istart, istop, ival
96 call urword(line, lloc, istart, istop, 1, ival, rval, 0, 0)
98 select case (line(istart:istop))
100 call this%print_steps%read(line(istop + 2:))
102 call this%print_steps%log(iout, verb=
"PRINTED")
104 call this%save_steps%read(line(istop + 2:))
106 call this%save_steps%log(iout, verb=
"SAVED")
109 'Looking for PRINT or SAVE. Found: '//trim(adjustl(line)), &
◆ set()
| subroutine printsavemanagermodule::set |
( |
class(printsavemanagertype) |
this, |
|
|
character(len=*) |
ocaction, |
|
|
character(len=*) |
ocsetting, |
|
|
integer(i4b), intent(in) |
iout |
|
) |
| |
|
private |
- Parameters
-
| this | this instance |
| [in] | iout | output file unit |
Definition at line 115 of file PrintSaveManager.f90.
117 class(PrintSaveManagerType) :: this
118 character(len=*) :: ocaction
119 character(len=*) :: ocsetting
120 integer(I4B),
intent(in) :: iout
121 select case (ocaction)
123 call this%print_steps%read(ocsetting)
125 call this%print_steps%log(iout, verb=
"PRINTED")
127 call this%save_steps%read(ocsetting)
129 call this%save_steps%log(iout, verb=
"SAVED")
132 'Looking for PRINT or SAVE. Found: '//trim(adjustl(ocaction)), &
◆ should_print()
| logical function printsavemanagermodule::should_print |
( |
class(printsavemanagertype) |
this, |
|
|
integer(i4b), intent(in) |
kstp, |
|
|
logical(lgp), intent(in) |
endofperiod |
|
) |
| |
|
private |
- Parameters
-
| this | this instance |
| [in] | kstp | current time step |
| [in] | endofperiod | whether last step of stress period |
Definition at line 138 of file PrintSaveManager.f90.
139 class(PrintSaveManagerType) :: this
140 integer(I4B),
intent(in) :: kstp
141 logical(LGP),
intent(in) :: endofperiod
143 should_print = this%print_steps%is_selected(kstp, endofperiod)
◆ should_save()
| logical function printsavemanagermodule::should_save |
( |
class(printsavemanagertype) |
this, |
|
|
integer(i4b), intent(in) |
kstp, |
|
|
logical(lgp), intent(in) |
endofperiod |
|
) |
| |
|
private |
- Parameters
-
| this | this instance |
| [in] | kstp | current time step |
| [in] | endofperiod | whether last step of stress period |
Definition at line 147 of file PrintSaveManager.f90.
148 class(PrintSaveManagerType) :: this
149 integer(I4B),
intent(in) :: kstp
150 logical(LGP),
intent(in) :: endofperiod
152 should_save = this%save_steps%is_selected(kstp, endofperiod)