28 integer(I4B),
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)
75 logical(LGP),
intent(in) :: readasarrays
77 this%mf6_input = mf6_input
78 this%readasarrays = readasarrays
81 call this%allocate_scalars()
94 call mem_setptr(this%naux,
'NAUX', this%mf6_input%mempath)
97 call mem_allocate(this%nbound,
'NBOUND', this%mf6_input%mempath)
98 call mem_allocate(this%ncpl,
'NCPL', this%mf6_input%mempath)
101 allocate (this%maxbound)
102 allocate (this%inamedbound)
103 allocate (this%iprpak)
113 call mem_set_value(this%inamedbound,
'BOUNDNAMES', this%mf6_input%mempath, &
115 call mem_set_value(this%maxbound,
'MAXBOUND', this%mf6_input%mempath, found)
116 call mem_set_value(this%iprpak,
'IPRPAK', this%mf6_input%mempath, found)
120 this%mf6_input%component_mempath)
123 if (
size(this%mshape) == 2)
then
124 this%ncpl = this%mshape(2)
125 else if (
size(this%mshape) == 3)
then
126 this%ncpl = this%mshape(2) * this%mshape(3)
130 call this%package_params%init(this%mf6_input,
'PERIOD', this%readasarrays, &
131 this%naux, this%inamedbound)
143 integer(I4B),
dimension(:, :),
pointer,
contiguous :: cellid
146 if (this%naux > 0)
then
147 call mem_setptr(this%auxname_cst,
'AUXILIARY', this%mf6_input%mempath)
150 'AUXILIARY', this%mf6_input%mempath)
154 if (this%readasarrays)
then
155 call mem_allocate(cellid, 0, 0,
'CELLID', this%mf6_input%mempath)
159 call mem_setptr(this%boundname_cst,
'BOUNDNAME', this%mf6_input%mempath)
162 call mem_setptr(this%auxvar,
'AUXVAR', this%mf6_input%mempath)
174 character(len=*),
dimension(:),
allocatable,
intent(in) :: params
175 integer(I4B),
intent(in) :: nparam
176 character(len=*),
intent(in) :: input_name
178 integer(I4B) :: iparam
180 do iparam = 1, nparam
182 this%mf6_input%component_type, &
183 this%mf6_input%subcomponent_type, &
184 'PERIOD', params(iparam),
'')
186 select case (idt%datatype)
189 this%mf6_input%mempath)
192 this%mf6_input%mempath)
195 this%mf6_input%mempath)
197 if (idt%shape ==
'NCELLDIM')
then
199 idt%mf6varname, this%mf6_input%mempath)
201 errmsg =
'IDM unimplemented. BoundInputContext::list_params_create &
202 &shape='//trim(idt%shape)
207 if (idt%shape ==
'NAUX')
then
209 idt%mf6varname, this%mf6_input%mempath)
211 errmsg =
'IDM unimplemented. BoundInputContext::list_params_create &
212 &tagname='//trim(idt%tagname)
217 errmsg =
'IDM unimplemented. BoundInputContext::list_params_create &
218 &datatype='//trim(idt%datatype)
236 character(len=*),
dimension(:),
allocatable,
intent(in) :: params
237 integer(I4B),
intent(in) :: nparam
238 character(len=*),
intent(in) :: input_name
240 integer(I4B) :: iparam
243 do iparam = 1, nparam
247 this%mf6_input%component_type, &
248 this%mf6_input%subcomponent_type, &
249 'PERIOD', params(iparam),
'')
250 if (idt%blockname ==
'PERIOD')
then
251 select case (idt%datatype)
254 this%mf6_input%mempath)
257 this%mf6_input%mempath)
260 this%mf6_input%mempath)
262 errmsg =
'IDM unimplemented. BoundInputContext::array_params_create &
263 &datatype='//trim(idt%datatype)
278 call this%package_params%destroy()
281 deallocate (this%maxbound)
282 deallocate (this%inamedbound)
283 deallocate (this%iprpak)
287 nullify (this%nbound)
289 nullify (this%maxbound)
290 nullify (this%inamedbound)
291 nullify (this%iprpak)
292 nullify (this%auxname_cst)
293 nullify (this%boundname_cst)
294 nullify (this%auxvar)
295 nullify (this%mshape)
312 character(len=*),
intent(in) :: mf6varname
313 character(len=LENVARNAME) :: varname
314 integer(I4B),
pointer :: intvar
317 call mem_allocate(intvar, varname, this%mf6_input%mempath)
326 character(len=LINELENGTH),
dimension(:),
allocatable, &
327 intent(inout) :: params
328 integer(I4B),
intent(inout) :: nparam
329 character(len=*),
intent(in) :: input_name
330 logical(LGP),
optional,
intent(in) :: create
331 logical(LGP) :: allocate_params
335 allocate_params = .true.
338 if (
present(create))
then
339 allocate_params = create
342 if (
allocated(params))
deallocate (params)
343 nparam = this%package_params%nparam
344 allocate (params(nparam))
346 params(n) = this%package_params%params(n)
349 if (allocate_params)
then
350 if (this%readasarrays)
then
351 call this%array_params_create(params, nparam, input_name)
353 call this%list_params_create(params, nparam, input_name)
363 character(len=*),
intent(in) :: mf6varname
364 character(len=LENVARNAME) :: varname
366 character(len=2) :: prefix =
'IN'
368 ilen = len_trim(mf6varname)
370 varname = prefix//mf6varname(1:(
lenvarname - len(prefix)))
372 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