28 integer,
pointer :: invar
40 integer(I4B),
pointer :: naux => null()
41 integer(I4B),
pointer :: maxbound => null()
42 integer(I4B),
pointer :: inamedbound => null()
43 integer(I4B),
pointer :: iprpak => null()
44 integer(I4B),
pointer :: nbound => null()
45 integer(I4B),
pointer :: ncpl => null()
47 contiguous :: auxname_cst => null()
49 contiguous :: boundname_cst => null()
50 real(dp),
dimension(:, :),
pointer, &
51 contiguous :: auxvar => null()
52 integer(I4B),
dimension(:),
pointer,
contiguous :: mshape => null()
53 logical(LGP) :: readasarrays
72 subroutine create(this, mf6_input, readasarrays)
77 logical(LGP),
intent(in) :: readasarrays
79 this%mf6_input = mf6_input
80 this%readasarrays = readasarrays
83 call this%allocate_scalars()
101 call mem_setptr(this%naux,
'NAUX', this%mf6_input%mempath)
104 call mem_allocate(this%nbound,
'NBOUND', this%mf6_input%mempath)
105 call mem_allocate(this%ncpl,
'NCPL', this%mf6_input%mempath)
108 allocate (this%maxbound)
109 allocate (this%inamedbound)
110 allocate (this%iprpak)
120 call mem_set_value(this%inamedbound,
'BOUNDNAMES', this%mf6_input%mempath, &
122 call mem_set_value(this%maxbound,
'MAXBOUND', this%mf6_input%mempath, found)
123 call mem_set_value(this%iprpak,
'IPRPAK', this%mf6_input%mempath, found)
127 this%mf6_input%component_mempath)
130 if (
size(this%mshape) == 2)
then
131 this%ncpl = this%mshape(2)
132 else if (
size(this%mshape) == 3)
then
133 this%ncpl = this%mshape(2) * this%mshape(3)
137 call this%package_params%init(this%mf6_input,
'PERIOD', this%readasarrays, &
138 this%naux, this%inamedbound)
155 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid
159 if (this%naux > 0)
then
160 call mem_setptr(this%auxname_cst,
'AUXILIARY', this%mf6_input%mempath)
163 'AUXILIARY', this%mf6_input%mempath)
167 if (this%readasarrays)
then
168 call mem_allocate(cellid, 0, 0,
'CELLID', this%mf6_input%mempath)
172 call mem_setptr(this%boundname_cst,
'BOUNDNAME', this%mf6_input%mempath)
175 call mem_setptr(this%auxvar,
'AUXVAR', this%mf6_input%mempath)
192 character(len=*),
dimension(:),
allocatable,
intent(in) :: params
193 integer(I4B),
intent(in) :: nparam
194 character(len=*),
intent(in) :: input_name
197 integer(I4B) :: iparam
200 do iparam = 1, nparam
202 this%mf6_input%component_type, &
203 this%mf6_input%subcomponent_type, &
204 'PERIOD', params(iparam),
'')
207 select case (idt%datatype)
210 this%mf6_input%mempath)
214 this%mf6_input%mempath)
218 this%mf6_input%mempath)
221 if (idt%shape ==
'NCELLDIM')
then
223 idt%mf6varname, this%mf6_input%mempath)
225 errmsg =
'IDM unimplemented. BoundInputContext::list_params_create &
226 &shape='//trim(idt%shape)
232 if (idt%shape ==
'NAUX')
then
234 idt%mf6varname, this%mf6_input%mempath)
236 errmsg =
'IDM unimplemented. BoundInputContext::list_params_create &
237 &tagname='//trim(idt%tagname)
243 errmsg =
'IDM unimplemented. BoundInputContext::list_params_create &
244 &datatype='//trim(idt%datatype)
267 character(len=*),
dimension(:),
allocatable,
intent(in) :: params
268 integer(I4B),
intent(in) :: nparam
269 character(len=*),
intent(in) :: input_name
272 integer(I4B) :: iparam
275 do iparam = 1, nparam
279 this%mf6_input%component_type, &
280 this%mf6_input%subcomponent_type, &
281 'PERIOD', params(iparam),
'')
283 if (idt%blockname ==
'PERIOD')
then
284 select case (idt%datatype)
287 this%mf6_input%mempath)
291 this%mf6_input%mempath)
295 this%mf6_input%mempath)
298 errmsg =
'IDM unimplemented. BoundInputContext::array_params_create &
299 &datatype='//trim(idt%datatype)
319 call this%package_params%destroy()
322 deallocate (this%maxbound)
323 deallocate (this%inamedbound)
324 deallocate (this%iprpak)
328 nullify (this%nbound)
330 nullify (this%maxbound)
331 nullify (this%inamedbound)
332 nullify (this%iprpak)
333 nullify (this%auxname_cst)
334 nullify (this%boundname_cst)
335 nullify (this%auxvar)
336 nullify (this%mshape)
358 character(len=*),
intent(in) :: mf6varname
360 character(len=LENVARNAME) :: varname
361 integer(I4B),
pointer :: intvar
365 call mem_allocate(intvar, varname, this%mf6_input%mempath)
379 character(len=LINELENGTH),
dimension(:),
allocatable, &
380 intent(inout) :: params
381 integer(I4B),
intent(inout) :: nparam
382 character(len=*),
intent(in) :: input_name
383 logical(LGP),
optional,
intent(in) :: create
384 logical(LGP) :: allocate_params
388 allocate_params = .true.
391 if (
present(create))
then
392 allocate_params = create
395 if (
allocated(params))
deallocate (params)
397 nparam = this%package_params%nparam
399 allocate (params(nparam))
402 params(n) = this%package_params%params(n)
405 if (allocate_params)
then
406 if (this%readasarrays)
then
408 call this%array_params_create(params, nparam, input_name)
411 call this%list_params_create(params, nparam, input_name)
426 character(len=*),
intent(in) :: mf6varname
428 character(len=LENVARNAME) :: varname
430 character(len=2) :: prefix =
'IN'
432 ilen = len_trim(mf6varname)
435 varname = prefix//mf6varname(1:(
lenvarname - len(prefix)))
437 varname = prefix//trim(mf6varname)
This module contains the BoundInputContextModule.
subroutine array_params_create(this, params, nparam, input_name)
allocate dfn array input period block parameters
character(len=lenvarname) function, public rsv_name(mf6varname)
create read state variable name
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