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

Data Types

type  prtmiptype
 

Functions/Subroutines

subroutine, public mip_cr (mip, name_model, input_mempath, inunit, iout, dis)
 Create a model input object. More...
 
subroutine mip_da (this)
 Deallocate memory. More...
 
subroutine allocate_scalars (this)
 
subroutine allocate_arrays (this, nodes)
 Allocate arrays. More...
 
subroutine mip_ar (this)
 @ brief Initialize package inputs More...
 

Function/Subroutine Documentation

◆ allocate_arrays()

subroutine prtmipmodule::allocate_arrays ( class(prtmiptype this,
integer(i4b), intent(in)  nodes 
)
private

Definition at line 95 of file prt-mip.f90.

96  class(PrtMipType) :: this
97  integer(I4B), intent(in) :: nodes
98  ! -- local
99  integer(I4B) :: i
100  !
101  ! -- Allocate
102  call mem_allocate(this%porosity, nodes, 'POROSITY', this%memoryPath)
103  call mem_allocate(this%retfactor, nodes, 'RETFACTOR', this%memoryPath)
104  call mem_allocate(this%izone, nodes, 'IZONE', this%memoryPath)
105  !
106  do i = 1, nodes
107  this%porosity(i) = dzero
108  this%retfactor(i) = done
109  this%izone(i) = 0
110  end do
111 

◆ allocate_scalars()

subroutine prtmipmodule::allocate_scalars ( class(prtmiptype this)
private

Definition at line 88 of file prt-mip.f90.

89  class(PrtMipType) :: this
90  call this%NumericalPackageType%allocate_scalars()
91  call mem_allocate(this%zeromethod, 'IZEROMETHOD', this%memoryPath)

◆ mip_ar()

subroutine prtmipmodule::mip_ar ( class(prtmiptype), intent(inout)  this)
private
Parameters
[in,out]thisPrtMipType object

Definition at line 115 of file prt-mip.f90.

116  ! -- dummy variables
117  class(PrtMipType), intent(inout) :: this !< PrtMipType object
118  ! -- local variables
119  character(len=LINELENGTH) :: errmsg
120  type(PrtMipParamFoundType) :: found
121  integer(I4B), dimension(:), pointer, contiguous :: map => null()
122  !
123  ! -- set map to convert user input data into reduced data
124  if (this%dis%nodes < this%dis%nodesuser) map => this%dis%nodeuser
125  !
126  ! -- Allocate arrays
127  call this%allocate_arrays(this%dis%nodes)
128  !
129  ! -- Source array inputs from IDM
130  call mem_set_value(this%porosity, 'POROSITY', this%input_mempath, &
131  map, found%porosity)
132  call mem_set_value(this%retfactor, 'RETFACTOR', this%input_mempath, &
133  map, found%retfactor)
134  call mem_set_value(this%izone, 'IZONE', this%input_mempath, map, &
135  found%izone)
136  !
137  ! -- Source scalars
138  call mem_set_value(this%zeromethod, 'ZERO_METHOD', this%input_mempath, &
139  found%zero_method)
140  if (.not. found%zero_method) this%zeromethod = 1
141  !
142  ! -- Ensure POROSITY was found
143  if (.not. found%porosity) then
144  write (errmsg, '(a)') 'Error in GRIDDATA block: POROSITY not found'
145  call store_error(errmsg)
146  end if
147 
Here is the call graph for this function:

◆ mip_cr()

subroutine, public prtmipmodule::mip_cr ( type(prtmiptype), pointer  mip,
character(len=*), intent(in)  name_model,
character(len=*), intent(in)  input_mempath,
integer(i4b), intent(in)  inunit,
integer(i4b), intent(in)  iout,
class(disbasetype), intent(in), pointer  dis 
)

Definition at line 34 of file prt-mip.f90.

35  ! -- dummy
36  type(PrtMipType), pointer :: mip
37  character(len=*), intent(in) :: name_model
38  character(len=*), intent(in) :: input_mempath
39  integer(I4B), intent(in) :: inunit
40  integer(I4B), intent(in) :: iout
41  class(DisBaseType), pointer, intent(in) :: dis
42  ! -- formats
43  character(len=*), parameter :: fmtheader = &
44  "(1x, /1x, 'MIP -- MODEL INPUT PACKAGE', &
45  &' INPUT READ FROM MEMPATH: ', A, /)"
46  !
47  ! -- Create the object
48  allocate (mip)
49  !
50  ! -- Create name and memory path
51  call mip%set_names(1, name_model, 'MIP', 'MIP', input_mempath)
52  !
53  ! -- Allocate scalars
54  call mip%allocate_scalars()
55  !
56  ! -- Set variables
57  mip%inunit = inunit
58  mip%iout = iout
59  !
60  ! -- Set pointers
61  mip%dis => dis
62  !
63  ! -- Print a message identifying the package if enabled
64  if (inunit > 0) &
65  write (iout, fmtheader) input_mempath
66 
Here is the caller graph for this function:

◆ mip_da()

subroutine prtmipmodule::mip_da ( class(prtmiptype this)
private

Definition at line 70 of file prt-mip.f90.

71  class(PrtMipType) :: this
72  !
73  ! -- Deallocate input memory
74  call memorylist_remove(this%name_model, 'MIP', idm_context)
75  !
76  ! -- Deallocate parent package
77  call this%NumericalPackageType%da()
78  !
79  ! -- Deallocate arrays
80  call mem_deallocate(this%porosity)
81  call mem_deallocate(this%retfactor)
82  call mem_deallocate(this%izone)
83  !
84  ! -- Deallocate scalars
85  call mem_deallocate(this%zeromethod)
Here is the call graph for this function: