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...
|
|
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 62 of file PrintSaveManager.f90.
63 class(PrintSaveManagerType) :: this
64 allocate (this%save_steps)
65 allocate (this%print_steps)
66 call this%save_steps%init()
67 call this%print_steps%init()
◆ create_psm()
- Returns
- the print/save manager
Definition at line 56 of file PrintSaveManager.f90.
57 type(PrintSaveManagerType),
pointer :: psm
◆ deallocate()
- Parameters
-
Definition at line 70 of file PrintSaveManager.f90.
71 class(PrintSaveManagerType) :: this
72 if (
associated(this%save_steps))
deallocate (this%save_steps)
73 if (
associated(this%print_steps))
deallocate (this%print_steps)
◆ init()
Definition at line 76 of file PrintSaveManager.f90.
77 class(PrintSaveManagerType) :: this
78 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 83 of file PrintSaveManager.f90.
85 class(PrintSaveManagerType) :: this
86 character(len=*),
intent(in) :: linein
87 integer(I4B),
intent(in) :: iout
89 character(len=len(linein)) :: line
90 integer(I4B) :: lloc, istart, istop, ival
95 call urword(line, lloc, istart, istop, 1, ival, rval, 0, 0)
97 select case (line(istart:istop))
99 call this%print_steps%read(line(istop + 2:))
101 call this%print_steps%log(iout, verb=
"PRINTED")
103 call this%save_steps%read(line(istop + 2:))
105 call this%save_steps%log(iout, verb=
"SAVED")
108 'Looking for PRINT or SAVE. Found: '//trim(adjustl(line)), &
◆ 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 114 of file PrintSaveManager.f90.
115 class(PrintSaveManagerType) :: this
116 integer(I4B),
intent(in) :: kstp
117 logical(LGP),
intent(in) :: endofperiod
119 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 123 of file PrintSaveManager.f90.
124 class(PrintSaveManagerType) :: this
125 integer(I4B),
intent(in) :: kstp
126 logical(LGP),
intent(in) :: endofperiod
128 should_save = this%save_steps%is_selected(kstp, endofperiod)