MODFLOW 6  version 6.5.0.dev2
MODFLOW 6 Code Documentation
memorytypemodule Module Reference

Data Types

type  memorytype
 

Functions/Subroutines

subroutine table_entry (this, memtab)
 
logical function mt_associated (this)
 
subroutine mt_deallocate (this)
 

Function/Subroutine Documentation

◆ mt_associated()

logical function memorytypemodule::mt_associated ( class(memorytype this)
private

Definition at line 85 of file Memory.f90.

86  class(MemoryType) :: this
87  logical :: al
88  al = .false.
89  if (associated(this%strsclr)) al = .true.
90  if (associated(this%logicalsclr)) al = .true.
91  if (associated(this%intsclr)) al = .true.
92  if (associated(this%dblsclr)) al = .true.
93  if (associated(this%astr1d)) al = .true.
94  if (associated(this%aint1d)) al = .true.
95  if (associated(this%aint2d)) al = .true.
96  if (associated(this%aint3d)) al = .true.
97  if (associated(this%adbl1d)) al = .true.
98  if (associated(this%adbl2d)) al = .true.
99  if (associated(this%adbl3d)) al = .true.
100  if (associated(this%acharstr1d)) al = .true.

◆ mt_deallocate()

subroutine memorytypemodule::mt_deallocate ( class(memorytype this)
private

Definition at line 103 of file Memory.f90.

104  class(MemoryType) :: this
105 
106  if (associated(this%strsclr)) then
107  if (this%master) deallocate (this%strsclr)
108  nullify (this%strsclr)
109  end if
110 
111  if (associated(this%logicalsclr)) then
112  if (this%master) deallocate (this%logicalsclr)
113  nullify (this%logicalsclr)
114  end if
115 
116  if (associated(this%intsclr)) then
117  if (this%master) deallocate (this%intsclr)
118  nullify (this%intsclr)
119  end if
120 
121  if (associated(this%dblsclr)) then
122  if (this%master) deallocate (this%dblsclr)
123  nullify (this%dblsclr)
124  end if
125 
126  if (associated(this%astr1d)) then
127  if (this%master) deallocate (this%astr1d)
128  nullify (this%astr1d)
129  end if
130 
131  if (associated(this%aint1d)) then
132  if (this%master) deallocate (this%aint1d)
133  nullify (this%aint1d)
134  end if
135 
136  if (associated(this%aint2d)) then
137  if (this%master) deallocate (this%aint2d)
138  nullify (this%aint2d)
139  end if
140 
141  if (associated(this%aint3d)) then
142  if (this%master) deallocate (this%aint3d)
143  nullify (this%aint3d)
144  end if
145 
146  if (associated(this%adbl1d)) then
147  if (this%master) deallocate (this%adbl1d)
148  nullify (this%adbl1d)
149  end if
150 
151  if (associated(this%adbl2d)) then
152  if (this%master) deallocate (this%adbl2d)
153  nullify (this%adbl2d)
154  end if
155 
156  if (associated(this%adbl3d)) then
157  if (this%master) deallocate (this%adbl3d)
158  nullify (this%adbl3d)
159  end if
160 
161  if (associated(this%acharstr1d)) then
162  if (this%master) deallocate (this%acharstr1d)
163  nullify (this%acharstr1d)
164  end if

◆ table_entry()

subroutine memorytypemodule::table_entry ( class(memorytype this,
type(tabletype), intent(inout)  memtab 
)
private

Definition at line 49 of file Memory.f90.

50  ! -- dummy
51  class(MemoryType) :: this
52  type(TableType), intent(inout) :: memtab
53  ! -- local
54  character(len=16) :: cmem
55  character(len=LENMEMADDRESS) :: cptr
56  integer(I4B) :: ipos
57  ! -- formats
58  !
59  ! -- determine memory type
60  ipos = index(this%memtype, ' (')
61  if (ipos < 1) then
62  ipos = 16
63  else
64  ipos = min(16, ipos - 1)
65  end if
66  cmem = this%memtype(1:ipos)
67  !
68  ! -- Set pointer string
69  cptr = '--'
70  if (.not. this%master) then
71  cptr = create_mem_address(this%masterPath, this%mastername)
72  end if
73  !
74  ! -- write data to the table
75  call memtab%add_term(this%path)
76  call memtab%add_term(this%name)
77  call memtab%add_term(cmem)
78  call memtab%add_term(this%isize)
79  call memtab%add_term(cptr)
80  !
81  ! -- return
82  return
Here is the call graph for this function: