27 integer,
pointer :: invar
39 integer(I4B),
pointer :: naux => null()
40 integer(I4B),
pointer :: maxbound => null()
41 integer(I4B),
pointer :: inamedbound => null()
42 integer(I4B),
pointer :: iprpak => null()
43 integer(I4B),
pointer :: nbound => null()
44 integer(I4B),
pointer :: ncpl => null()
46 contiguous :: auxname_cst => null()
48 contiguous :: boundname_cst => null()
49 real(dp),
dimension(:, :),
pointer, &
50 contiguous :: auxvar => null()
51 integer(I4B),
dimension(:),
pointer,
contiguous :: mshape => null()
52 logical(LGP) :: readasarrays
71 subroutine create(this, mf6_input, readasarrays)
76 logical(LGP),
intent(in) :: readasarrays
78 this%mf6_input = mf6_input
79 this%readasarrays = readasarrays
82 call this%allocate_scalars()
100 call mem_setptr(this%naux,
'NAUX', this%mf6_input%mempath)
103 call mem_allocate(this%nbound,
'NBOUND', this%mf6_input%mempath)
104 call mem_allocate(this%ncpl,
'NCPL', this%mf6_input%mempath)
107 allocate (this%maxbound)
108 allocate (this%inamedbound)
109 allocate (this%iprpak)
119 call mem_set_value(this%inamedbound,
'BOUNDNAMES', this%mf6_input%mempath, &
121 call mem_set_value(this%maxbound,
'MAXBOUND', this%mf6_input%mempath, found)
122 call mem_set_value(this%iprpak,
'IPRPAK', this%mf6_input%mempath, found)
126 this%mf6_input%component_mempath)
129 if (
size(this%mshape) == 2)
then
130 this%ncpl = this%mshape(2)
131 else if (
size(this%mshape) == 3)
then
132 this%ncpl = this%mshape(2) * this%mshape(3)
136 call this%package_params%init(this%mf6_input,
'PERIOD', this%readasarrays, &
137 this%naux, this%inamedbound)
154 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid
158 if (this%naux > 0)
then
159 call mem_setptr(this%auxname_cst,
'AUXILIARY', this%mf6_input%mempath)
162 'AUXILIARY', this%mf6_input%mempath)
166 if (this%readasarrays)
then
167 call mem_allocate(cellid, 0, 0,
'CELLID', this%mf6_input%mempath)
171 call mem_setptr(this%boundname_cst,
'BOUNDNAME', this%mf6_input%mempath)
174 call mem_setptr(this%auxvar,
'AUXVAR', this%mf6_input%mempath)
191 character(len=*),
dimension(:),
allocatable,
intent(in) :: params
192 integer(I4B),
intent(in) :: nparam
193 character(len=*),
intent(in) :: input_name
196 integer(I4B) :: iparam
199 do iparam = 1, nparam
201 this%mf6_input%component_type, &
202 this%mf6_input%subcomponent_type, &
203 'PERIOD', params(iparam),
'')
206 select case (idt%datatype)
209 this%mf6_input%mempath)
213 this%mf6_input%mempath)
217 this%mf6_input%mempath)
220 if (idt%shape ==
'NCELLDIM')
then
222 idt%mf6varname, this%mf6_input%mempath)
224 errmsg =
'IDM unimplemented. BoundInputContext::list_params_create &
225 &shape='//trim(idt%shape)
231 if (idt%shape ==
'NAUX')
then
233 idt%mf6varname, this%mf6_input%mempath)
235 errmsg =
'IDM unimplemented. BoundInputContext::list_params_create &
236 &tagname='//trim(idt%tagname)
242 errmsg =
'IDM unimplemented. BoundInputContext::list_params_create &
243 &datatype='//trim(idt%datatype)
266 character(len=*),
dimension(:),
allocatable,
intent(in) :: params
267 integer(I4B),
intent(in) :: nparam
268 character(len=*),
intent(in) :: input_name
271 integer(I4B) :: iparam
274 do iparam = 1, nparam
278 this%mf6_input%component_type, &
279 this%mf6_input%subcomponent_type, &
280 'PERIOD', params(iparam),
'')
282 if (idt%blockname ==
'PERIOD')
then
283 select case (idt%datatype)
286 this%mf6_input%mempath)
290 this%mf6_input%mempath)
294 this%mf6_input%mempath)
297 errmsg =
'IDM unimplemented. BoundInputContext::array_params_create &
298 &datatype='//trim(idt%datatype)
318 call this%package_params%destroy()
321 deallocate (this%maxbound)
322 deallocate (this%inamedbound)
323 deallocate (this%iprpak)
327 nullify (this%nbound)
329 nullify (this%maxbound)
330 nullify (this%inamedbound)
331 nullify (this%iprpak)
332 nullify (this%auxname_cst)
333 nullify (this%boundname_cst)
334 nullify (this%auxvar)
335 nullify (this%mshape)
357 character(len=*),
intent(in) :: mf6varname
359 character(len=LENVARNAME) :: varname
361 integer(I4B),
pointer :: intvar
362 character(len=2) :: prefix =
'IN'
365 ilen = len_trim(mf6varname)
368 varname = prefix//mf6varname(1:(
lenvarname - len(prefix)))
370 varname = prefix//trim(mf6varname)
373 call mem_allocate(intvar, varname, this%mf6_input%mempath)
387 character(len=LINELENGTH),
dimension(:),
allocatable, &
388 intent(inout) :: params
389 integer(I4B),
intent(inout) :: nparam
390 character(len=*),
intent(in) :: input_name
391 logical(LGP),
optional,
intent(in) :: create
392 logical(LGP) :: allocate_params
396 allocate_params = .true.
399 if (
present(create))
then
400 allocate_params = create
403 if (
allocated(params))
deallocate (params)
405 nparam = this%package_params%nparam
407 allocate (params(nparam))
410 params(n) = this%package_params%params(n)
413 if (allocate_params)
then
414 if (this%readasarrays)
then
416 call this%array_params_create(params, nparam, input_name)
419 call this%list_params_create(params, nparam, input_name)
This module contains the BoundInputContextModule.
subroutine array_params_create(this, params, nparam, input_name)
allocate dfn array input period block parameters
subroutine allocate_arrays(this)
allocate_arrays
subroutine bound_params(this, params, nparam, input_name, create)
allocate and set input array to filtered param set
character(len=lenvarname) function rsv_alloc(this, mf6varname)
allocate a read state variable
subroutine create(this, mf6_input, readasarrays)
create boundary input context
subroutine allocate_scalars(this)
create boundary input context
subroutine destroy(this)
destroy boundary input context
subroutine list_params_create(this, params, nparam, input_name)
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenauxname
maximum length of a aux variable
integer(i4b), parameter lenboundname
maximum length of a bound name
integer(i4b), parameter izero
integer constant zero
real(dp), parameter dzero
real constant zero
This module contains the DefinitionSelectModule.
type(inputparamdefinitiontype) function, pointer, public get_param_definition_type(input_definition_types, component_type, subcomponent_type, blockname, tagname, filename)
Return parameter definition.
This module contains the DynamicPackageParamsModule.
subroutine, public allocate_param_int2d(ncol, nrow, varname, mempath)
allocate int2d
subroutine, public allocate_param_int1d(nrow, varname, mempath)
allocate int1d
subroutine, public allocate_param_dbl1d(nrow, varname, mempath)
allocate dbl1d
subroutine, public allocate_param_charstr(strlen, nrow, varname, mempath)
allocate character string type array
subroutine, public allocate_param_dbl2d(ncol, nrow, varname, mempath)
allocate dbl2d
This module defines variable data types.
subroutine, public get_isize(name, mem_path, isize)
@ brief Get the number of elements for this variable
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
derived type for boundary package input context
Pointer type for read state variable.
This class is used to store a single deferred-length character string. It was designed to work in an ...
dynamic parameter filter type