28 character(len=LENFTYPE) ::
ftype =
'API'
29 character(len=LENPACKAGENAME) ::
text =
' API'
49 subroutine api_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, &
52 class(
bndtype),
pointer :: packobj
53 integer(I4B),
intent(in) :: id
54 integer(I4B),
intent(in) :: ibcnum
55 integer(I4B),
intent(in) :: inunit
56 integer(I4B),
intent(in) :: iout
57 character(len=*),
intent(in) :: namemodel
58 character(len=*),
intent(in) :: pakname
59 character(len=*),
intent(in) :: mempath
61 type(
apitype),
pointer :: apiobj
68 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, mempath)
72 call packobj%allocate_scalars()
75 call packobj%pack_initialize()
77 packobj%inunit = inunit
80 packobj%ibcnum = ibcnum
94 class(
apitype),
intent(inout) :: this
97 character(len=*),
parameter :: fmtflow2 = &
98 &
"(4x, 'FLOWS WILL BE SAVED TO BUDGET FILE SPECIFIED IN OUTPUT CONTROL')"
101 call mem_set_value(this%iprpak,
'IPRPAK', this%input_mempath, found%iprpak)
102 call mem_set_value(this%iprflow,
'IPRFLOW', this%input_mempath, found%iprflow)
103 call mem_set_value(this%ipakcb,
'IPAKCB', this%input_mempath, found%ipakcb)
104 call mem_set_value(this%inamedbound,
'BOUNDNAMES', this%input_mempath, &
106 call mem_set_value(this%imover,
'MOVER', this%input_mempath, found%mover)
109 if (found%ipakcb) this%ipakcb = -1
112 if (
filein_fname(this%obs%inputFilename,
'OBS6_FILENAME', &
113 this%input_mempath, this%input_fname))
then
114 this%obs%active = .true.
116 call openfile(this%obs%inUnitObs, this%iout, this%obs%inputFilename,
'OBS')
120 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%text)) &
122 if (found%iprpak)
then
123 write (this%iout,
'(4x,a)') &
124 'LISTS OF '//trim(adjustl(this%text))//
' CELLS WILL BE PRINTED.'
126 if (found%iprflow)
then
127 write (this%iout,
'(4x,a)') trim(adjustl(this%text))// &
128 ' FLOWS WILL BE PRINTED TO LISTING FILE.'
130 if (found%ipakcb)
write (this%iout, fmtflow2)
131 if (found%boundnames)
then
132 write (this%iout,
'(4x,a)') trim(adjustl(this%text))// &
133 ' BOUNDARIES HAVE NAMES IN LAST COLUMN.'
135 if (found%mover)
write (this%iout,
'(4x,A)')
'MOVER OPTION ENABLED'
136 write (this%iout,
'(1x,a)') &
137 'END OF '//trim(adjustl(this%text))//
' OPTIONS'
148 class(
apitype),
intent(inout) :: this
153 call mem_set_value(this%maxbound,
'MAXBOUND', this%input_mempath, &
157 write (this%iout,
'(/1x,a)')
'PROCESSING '//trim(adjustl(this%text))// &
159 write (this%iout,
'(4x,a,i7)')
'MAXBOUND = ', this%maxbound
160 write (this%iout,
'(1x,a)') &
161 'END OF '//trim(adjustl(this%text))//
' DIMENSIONS'
164 if (this%maxbound <= 0)
then
165 write (
errmsg,
'(a)')
'MAXBOUND must be an integer greater than zero.'
180 class(
apitype),
intent(inout) :: this
189 subroutine api_fc(this, rhs, ia, idxglo, matrix_sln)
192 real(DP),
dimension(:),
intent(inout) :: rhs
193 integer(I4B),
dimension(:),
intent(in) :: ia
194 integer(I4B),
dimension(:),
intent(in) :: idxglo
203 if (this%imover == 1)
then
204 call this%pakmvrobj%fc()
208 do i = 1, this%nbound
210 rhs(n) = rhs(n) + this%rhs(i)
212 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
216 qusr = this%rhs(i) - this%hcof(i) * this%xnew(n)
217 if (this%imover == 1 .and. qusr >
dzero)
then
218 call this%pakmvrobj%accumulate_qformvr(i, qusr)
251 call this%obs%StoreObsType(
'api', .true., indx)
256 call this%obs%StoreObsType(
'to-mvr', .true., indx)
This module contains the API package methods.
subroutine, public api_create(packobj, id, ibcnum, inunit, iout, namemodel, pakname, mempath)
@ brief Create a new package object
character(len=lenpackagename) text
character(len=lenftype) ftype
subroutine api_rp(this)
@ brief Read and prepare stress period data for package
subroutine source_options(this)
@ brief Source package options from input context
logical function api_obs_supported(this)
Determine if observations are supported.
subroutine source_dimensions(this)
@ brief Source package dimensions from input context
subroutine api_df_obs(this)
Define the observation types available in the package.
subroutine api_fc(this, rhs, ia, idxglo, matrix_sln)
@ brief Fill A and r for the package
This module contains the base boundary package.
This module contains simulation constants.
integer(i4b), parameter lenpackagename
maximum length of the package name
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
real(dp), parameter dzero
real constant zero
This module defines variable data types.
character(len=lenmempath) function create_mem_path(component, subcomponent, context)
returns the path to the memory object
This module contains the derived type ObsType.
subroutine, public defaultobsidprocessor(obsrv, dis, inunitobs, iout)
@ brief Process IDstring provided for each observation
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
This module contains the SourceCommonModule.
logical(lgp) function, public filein_fname(filename, tagname, input_mempath, input_fname)
enforce and set a single input filename provided via FILEIN keyword
type(timeserieslinktype) function, pointer, public gettimeserieslinkfromlist(list, indx)
Get time series link from a list.