MODFLOW 6  version 6.8.0.dev0
USGS Modular Hydrologic Model
GwtGwtConnection.f90
Go to the documentation of this file.
2  use kindmodule, only: i4b, dp, lgp
4  use csrutilsmodule, only: getcsrindex
5  use simmodule, only: ustop
9  use gwtmodule
13  use sparsemodule, only: sparsematrix
17  use simstagesmodule
20 
21  implicit none
22  private
23 
24  public :: castasgwtgwtconnection
25 
26  !> Connects a GWT model to other GWT models in space. Derives
27  !! from NumericalExchangeType so the solution can use it to
28  !! fetch the coefficients for this connection.
29  !<
31 
32  class(gwtmodeltype), pointer :: gwtmodel => null() !< the model for which this connection exists
33  class(gwtexchangetype), pointer :: gwtexchange => null() !< the primary exchange, cast to GWT-GWT
34  class(gwtinterfacemodeltype), pointer :: gwtinterfacemodel => null() !< the interface model
35  integer(I4B), pointer :: iifaceadvscheme => null() !< the advection scheme at the interface:
36  !! 0 = upstream, 1 = central, 2 = TVD
37  integer(I4B), pointer :: iifacext3d => null() !< XT3D in the interface DSP package: 0 = no, 1 = lhs, 2 = rhs
38  integer(I4B), pointer :: exgflowsign => null() !< indicates the flow direction of exgflowja
39  real(dp), dimension(:), pointer, contiguous :: exgflowjagwt => null() !< gwt-flowja at the interface (this is a subset of the GWT
40  !! interface model flowja's)
41 
42  real(dp), dimension(:), pointer, contiguous :: gwfflowja => null() !< gwfflowja for the interface model
43  real(dp), dimension(:), pointer, contiguous :: gwfsat => null() !< gwfsat for the interface model
44  real(dp), dimension(:), pointer, contiguous :: gwfhead => null() !< gwfhead for the interface model
45  real(dp), dimension(:, :), pointer, contiguous :: gwfspdis => null() !< gwfspdis for the interface model
46 
47  real(dp), dimension(:), pointer, contiguous :: conc => null() !< pointer to concentration array
48  integer(I4B), dimension(:), pointer, contiguous :: icbound => null() !< store pointer to gwt ibound array
49 
50  integer(I4B) :: iout = 0 !< the list file for the interface model
51 
52  contains
53 
54  procedure :: gwtgwtconnection_ctor
55  generic, public :: construct => gwtgwtconnection_ctor
56 
57  procedure :: exg_ar => gwtgwtcon_ar
58  procedure :: exg_df => gwtgwtcon_df
59  procedure :: exg_rp => gwtgwtcon_rp
60  procedure :: exg_ad => gwtgwtcon_ad
61  procedure :: exg_cf => gwtgwtcon_cf
62  procedure :: exg_fc => gwtgwtcon_fc
63  procedure :: exg_da => gwtgwtcon_da
64  procedure :: exg_cq => gwtgwtcon_cq
65  procedure :: exg_bd => gwtgwtcon_bd
66  procedure :: exg_ot => gwtgwtcon_ot
67 
68  ! overriding 'protected'
69  procedure :: validateconnection
70 
71  ! local stuff
72  procedure, private :: allocate_scalars
73  procedure, private :: allocate_arrays
74  procedure, private :: cfg_dist_vars
75  procedure, private :: setgridextent
76  procedure, private :: setflowtoexchange
77 
78  end type gwtgwtconnectiontype
79 
80 contains
81 
82  !> @brief Basic construction of the connection
83  !<
84  subroutine gwtgwtconnection_ctor(this, model, gwtEx)
85  use inputoutputmodule, only: openfile
86  class(gwtgwtconnectiontype) :: this !< the connection
87  class(numericalmodeltype), pointer :: model !< the model owning this connection,
88  !! this must be a GwtModelType
89  class(disconnexchangetype), pointer :: gwtEx !< the GWT-GWT exchange the interface model is created for
90  ! local
91  character(len=LINELENGTH) :: fname
92  character(len=LENCOMPONENTNAME) :: name
93  class(*), pointer :: objPtr
94  logical(LGP) :: write_ifmodel_listfile = .false.
95 
96  objptr => model
97  this%gwtModel => castasgwtmodel(objptr)
98  objptr => gwtex
99  this%gwtExchange => castasgwtexchange(objptr)
100 
101  if (gwtex%v_model1%is_local .and. gwtex%v_model2%is_local) then
102  this%owns_exchange = associated(model, gwtex%model1)
103  else
104  this%owns_exchange = .true.
105  end if
106 
107  if (gwtex%v_model1 == model) then
108  write (name, '(a,i0)') 'GWTCON1_', gwtex%id
109  else
110  write (name, '(a,i0)') 'GWTCON2_', gwtex%id
111  end if
112 
113  ! .lst file for interface model
114  if (write_ifmodel_listfile) then
115  fname = trim(name)//'.im.lst'
116  call openfile(this%iout, 0, fname, 'LIST', filstat_opt='REPLACE')
117  write (this%iout, '(4a)') 'Creating GWT-GWT connection for model ', &
118  trim(this%gwtModel%name), 'from exchange ', &
119  trim(gwtex%name)
120  end if
121 
122  ! first call base constructor
123  call this%SpatialModelConnectionType%spatialConnection_ctor(model, &
124  gwtex, &
125  name)
126 
127  call this%allocate_scalars()
128  this%typename = 'GWT-GWT'
129  this%iIfaceAdvScheme = 0
130  this%iIfaceXt3d = 0
131  this%exgflowSign = 1
132 
133  allocate (this%gwtInterfaceModel)
134  this%interface_model => this%gwtInterfaceModel
135 
136  end subroutine gwtgwtconnection_ctor
137 
138  !> @brief Allocate scalar variables for this connection
139  !<
140  subroutine allocate_scalars(this)
141  class(gwtgwtconnectiontype) :: this !< the connection
142 
143  call mem_allocate(this%iIfaceAdvScheme, 'IADVSCHEME', this%memoryPath)
144  call mem_allocate(this%iIfaceXt3d, 'IXT3D', this%memoryPath)
145  call mem_allocate(this%exgflowSign, 'EXGFLOWSIGN', this%memoryPath)
146 
147  end subroutine allocate_scalars
148 
149  !> @brief define the GWT-GWT connection
150  !<
151  subroutine gwtgwtcon_df(this)
152  class(gwtgwtconnectiontype) :: this !< the connection
153  ! local
154  character(len=LENCOMPONENTNAME) :: imName
155 
156  ! determine advection scheme (the GWT-GWT exchange
157  ! has been read at this point)
158  this%iIfaceAdvScheme = this%gwtExchange%iAdvScheme
159  !
160  ! determine xt3d setting on interface
161  this%iIfaceXt3d = this%gwtExchange%ixt3d
162 
163  ! turn off when off in the owning model
164  if (this%gwtModel%indsp > 0) then
165  this%iIfaceXt3d = this%gwtModel%dsp%ixt3d
166  end if
167 
168  ! determine the required size of the interface model grid
169  call this%setGridExtent()
170 
171  ! now set up the GridConnection
172  call this%spatialcon_df()
173 
174  ! we have to 'catch up' and create the interface model
175  ! here, then the remainder of this routine will be define
176  if (this%prim_exchange%v_model1 == this%owner) then
177  write (imname, '(a,i0)') 'GWTIM1_', this%gwtExchange%id
178  else
179  write (imname, '(a,i0)') 'GWTIM2_', this%gwtExchange%id
180  end if
181  call this%gwtInterfaceModel%gwtifmod_cr(imname, &
182  this%iout, &
183  this%ig_builder)
184  call this%gwtInterfaceModel%set_idsoln(this%gwtModel%idsoln)
185  this%gwtInterfaceModel%iAdvScheme = this%iIfaceAdvScheme
186  this%gwtInterfaceModel%ixt3d = this%iIfaceXt3d
187  call this%gwtInterfaceModel%model_df()
188 
189  call this%cfg_dist_vars()
190 
191  call this%allocate_arrays()
192  call this%gwtInterfaceModel%allocate_fmi()
193 
194  ! connect X, RHS, IBOUND, and flowja
195  call this%spatialcon_setmodelptrs()
196 
197  ! connect pointers (used by BUY)
198  this%conc => this%gwtInterfaceModel%x
199  this%icbound => this%gwtInterfaceModel%ibound
200 
201  ! add connections from the interface model to solution matrix
202  call this%spatialcon_connect()
203 
204  end subroutine gwtgwtcon_df
205 
206  !> @brief Configure distributed variables for this interface model
207  !<
208  subroutine cfg_dist_vars(this)
209  class(gwtgwtconnectiontype) :: this !< the connection
210 
211  call this%cfg_dv('X', '', sync_nds, &
213  call this%cfg_dv('IBOUND', '', sync_nds, (/stg_bfr_con_ar/))
214  call this%cfg_dv('TOP', 'DIS', sync_nds, (/stg_bfr_con_ar/))
215  call this%cfg_dv('BOT', 'DIS', sync_nds, (/stg_bfr_con_ar/))
216  call this%cfg_dv('AREA', 'DIS', sync_nds, (/stg_bfr_con_ar/))
217  if (this%gwtInterfaceModel%dsp%idiffc > 0) then
218  call this%cfg_dv('DIFFC', 'DSP', sync_nds, (/stg_bfr_con_ar/))
219  end if
220  if (this%gwtInterfaceModel%dsp%idisp > 0) then
221  call this%cfg_dv('ALH', 'DSP', sync_nds, (/stg_bfr_con_ar/))
222  call this%cfg_dv('ALV', 'DSP', sync_nds, (/stg_bfr_con_ar/))
223  call this%cfg_dv('ATH1', 'DSP', sync_nds, (/stg_bfr_con_ar/))
224  call this%cfg_dv('ATH2', 'DSP', sync_nds, (/stg_bfr_con_ar/))
225  call this%cfg_dv('ATV', 'DSP', sync_nds, (/stg_bfr_con_ar/))
226  end if
227  call this%cfg_dv('GWFHEAD', 'FMI', sync_nds, (/stg_bfr_exg_ad/))
228  call this%cfg_dv('GWFSAT', 'FMI', sync_nds, (/stg_bfr_exg_ad/))
229  call this%cfg_dv('GWFSPDIS', 'FMI', sync_nds, (/stg_bfr_exg_ad/))
230  call this%cfg_dv('GWFFLOWJA', 'FMI', sync_con, (/stg_bfr_exg_ad/))
231  call this%cfg_dv('GWFFLOWJA', 'FMI', sync_exg, (/stg_bfr_exg_ad/), &
232  exg_var_name='GWFSIMVALS')
233  ! fill thetam from mst packages, needed for dsp
234  if (this%gwtModel%indsp > 0 .and. this%gwtModel%inmst > 0) then
235  call this%cfg_dv('THETAM', 'MST', sync_nds, (/stg_aft_con_ar/))
236  end if
237 
238  end subroutine cfg_dist_vars
239 
240  !> @brief Allocate array variables for this connection
241  !<
242  subroutine allocate_arrays(this)
243  class(gwtgwtconnectiontype) :: this !< the connection
244 
245  call mem_allocate(this%exgflowjaGwt, this%ig_builder%nrOfBoundaryCells, &
246  'EXGFLOWJAGWT', this%memoryPath)
247 
248  end subroutine allocate_arrays
249 
250  !> @brief Set required extent of the interface grid from
251  !< the configuration
252  subroutine setgridextent(this)
253  class(gwtgwtconnectiontype) :: this !< the connection
254  ! local
255  logical(LGP) :: hasAdv, hasDsp
256 
257  hasadv = this%gwtModel%inadv > 0
258  hasdsp = this%gwtModel%indsp > 0
259 
260  if (hasadv) then
261  if (this%iIfaceAdvScheme == adv_scheme_tvd .or. &
262  this%iIfaceAdvScheme == adv_scheme_utvd) then
263  this%exg_stencil_depth = 2
264  if (this%gwtModel%adv%iadvwt == adv_scheme_tvd .or. &
265  this%gwtModel%adv%iadvwt == adv_scheme_utvd) then
266  this%int_stencil_depth = 2
267  end if
268  end if
269  end if
270 
271  if (hasdsp) then
272  if (this%iIfaceXt3d > 0) then
273  this%exg_stencil_depth = 2
274  if (this%gwtModel%dsp%ixt3d > 0) then
275  this%int_stencil_depth = 2
276  end if
277  end if
278  end if
279 
280  end subroutine setgridextent
281 
282  !> @brief allocate and read/set the connection's data structures
283  !<
284  subroutine gwtgwtcon_ar(this)
285  class(gwtgwtconnectiontype) :: this !< the connection
286 
287  ! check if we can construct an interface model
288  ! NB: only makes sense after the models' allocate&read have been
289  ! called, which is why we do it here
290  call this%validateConnection()
291 
292  ! allocate and read base
293  call this%spatialcon_ar()
294 
295  ! ... and now the interface model
296  call this%gwtInterfaceModel%model_ar()
297 
298  ! AR the movers and obs through the exchange
299  if (this%owns_exchange) then
300  !cdl implement this when MVT is ready
301  !cdl if (this%gwtExchange%inmvt > 0) then
302  !cdl call this%gwtExchange%mvt%mvt_ar()
303  !cdl end if
304  if (this%gwtExchange%inobs > 0) then
305  call this%gwtExchange%obs%obs_ar()
306  end if
307  end if
308 
309  end subroutine gwtgwtcon_ar
310 
311  !> @brief validate this connection prior to constructing
312  !< the interface model
313  subroutine validateconnection(this)
314  use simvariablesmodule, only: errmsg
316  class(gwtgwtconnectiontype) :: this !< this connection
317 
318  ! base validation, the spatial/geometry part
319  call this%SpatialModelConnectionType%validateConnection()
320 
321  ! we cannot validate this (yet) in parallel mode, TODO_MJR: feels like we can by now
322  if (.not. this%gwtExchange%v_model1%is_local) return
323  if (.not. this%gwtExchange%v_model2%is_local) return
324 
325  ! GWT related matters
326  if ((this%gwtExchange%gwtmodel1%inadv > 0 .and. &
327  this%gwtExchange%gwtmodel2%inadv == 0) .or. &
328  (this%gwtExchange%gwtmodel2%inadv > 0 .and. &
329  this%gwtExchange%gwtmodel1%inadv == 0)) then
330  write (errmsg, '(a,a,a)') 'Cannot connect GWT models in exchange ', &
331  trim(this%gwtExchange%name), ' because one model is configured with ADV &
332  &and the other one is not'
333  call store_error(errmsg)
334  end if
335 
336  if ((this%gwtExchange%gwtmodel1%indsp > 0 .and. &
337  this%gwtExchange%gwtmodel2%indsp == 0) .or. &
338  (this%gwtExchange%gwtmodel2%indsp > 0 .and. &
339  this%gwtExchange%gwtmodel1%indsp == 0)) then
340  write (errmsg, '(a,a,a)') 'Cannot connect GWT models in exchange ', &
341  trim(this%gwtExchange%name), ' because one model is configured with DSP &
342  &and the other one is not'
343  call store_error(errmsg)
344  end if
345 
346  ! abort on errors
347  if (count_errors() > 0) then
348  write (errmsg, '(a)') 'Errors occurred while processing exchange(s)'
349  call ustop(errmsg)
350  end if
351 
352  end subroutine validateconnection
353 
354  subroutine gwtgwtcon_rp(this)
355  class(gwtgwtconnectiontype) :: this !< the connection
356 
357  ! Call exchange rp routines
358  if (this%owns_exchange) then
359  call this%gwtExchange%exg_rp()
360  end if
361 
362  end subroutine gwtgwtcon_rp
363 
364  !> @brief Advance this connection
365  !<
366  subroutine gwtgwtcon_ad(this)
367  class(gwtgwtconnectiontype) :: this !< this connection
368 
369  ! recalculate dispersion ellipse
370  if (this%gwtInterfaceModel%indsp > 0) call this%gwtInterfaceModel%dsp%dsp_ad()
371 
372  if (this%owns_exchange) then
373  call this%gwtExchange%exg_ad()
374  end if
375 
376  end subroutine gwtgwtcon_ad
377 
378  subroutine gwtgwtcon_cf(this, kiter)
379  class(gwtgwtconnectiontype) :: this !< this connection
380  integer(I4B), intent(in) :: kiter !< the iteration counter
381  ! local
382  real(DP), dimension(:), pointer, contiguous :: x_m1, x_m2
383 
384  call this%SpatialModelConnectionType%spatialcon_cf(kiter)
385 
386  ! CF the movers in the exchange
387  if (this%owns_exchange) then
388  if (this%gwtExchange%inmvt > 0) then
389  x_m1 => null()
390  x_m2 => null()
391  if (associated(this%gwtExchange%gwtmodel1)) then
392  x_m1 => this%gwtExchange%gwtmodel1%x
393  end if
394  if (associated(this%gwtExchange%gwtmodel2)) then
395  x_m2 => this%gwtExchange%gwtmodel2%x
396  end if
397  call this%gwtExchange%mvt%xmvt_cf(x_m1, x_m2)
398  end if
399  end if
400 
401  end subroutine gwtgwtcon_cf
402 
403  subroutine gwtgwtcon_fc(this, kiter, matrix_sln, rhs_sln, inwtflag)
404  class(gwtgwtconnectiontype) :: this !< the connection
405  integer(I4B), intent(in) :: kiter !< the iteration counter
406  class(matrixbasetype), pointer :: matrix_sln !< the system matrix
407  real(DP), dimension(:), intent(inout) :: rhs_sln !< global right-hand-side
408  integer(I4B), optional, intent(in) :: inwtflag !< newton-raphson flag
409  ! local
410  real(DP), dimension(:), pointer, contiguous :: x_m1, x_m2
411 
412  call this%SpatialModelConnectionType%spatialcon_fc( &
413  kiter, matrix_sln, rhs_sln, inwtflag)
414  !
415  ! FC the movers through the exchange
416  if (this%owns_exchange) then
417  if (this%gwtExchange%inmvt > 0) then
418  x_m1 => null()
419  x_m2 => null()
420  if (associated(this%gwtExchange%gwtmodel1)) then
421  x_m1 => this%gwtExchange%gwtmodel1%x
422  end if
423  if (associated(this%gwtExchange%gwtmodel2)) then
424  x_m2 => this%gwtExchange%gwtmodel2%x
425  end if
426  call this%gwtExchange%mvt%mvt_fc(x_m1, x_m2)
427  end if
428  end if
429 
430  end subroutine gwtgwtcon_fc
431 
432  subroutine gwtgwtcon_cq(this, icnvg, isuppress_output, isolnid)
433  class(gwtgwtconnectiontype) :: this !< the connection
434  integer(I4B), intent(inout) :: icnvg !< convergence flag
435  integer(I4B), intent(in) :: isuppress_output !< suppress output when =1
436  integer(I4B), intent(in) :: isolnid !< solution id
437 
438  call this%gwtInterfaceModel%model_cq(icnvg, isuppress_output)
439  call this%setFlowToExchange()
440 
441  end subroutine gwtgwtcon_cq
442 
443  !> @brief Set the flows (flowja from interface model) to the
444  !< simvals in the exchange, leaving the budget calcution in there
445  subroutine setflowtoexchange(this)
446  use indexmapmodule
447  class(gwtgwtconnectiontype) :: this !< this connection
448  ! local
449  integer(I4B) :: i
450  class(gwtexchangetype), pointer :: gwtEx
451  type(indexmapsgntype), pointer :: map
452 
453  if (this%owns_exchange) then
454  gwtex => this%gwtExchange
455  map => this%interface_map%exchange_maps(this%interface_map%prim_exg_idx)
456 
457  ! use (half of) the exchange map in reverse:
458  do i = 1, size(map%src_idx)
459  if (map%sign(i) < 0) cycle ! simvals is defined from exg%m1 => exg%m2
460  gwtex%simvals(map%src_idx(i)) = &
461  this%gwtInterfaceModel%flowja(map%tgt_idx(i))
462  end do
463  end if
464 
465  end subroutine setflowtoexchange
466 
467  subroutine gwtgwtcon_bd(this, icnvg, isuppress_output, isolnid)
468  use budgetmodule, only: rate_accumulator
469  class(gwtgwtconnectiontype) :: this !< the connection
470  integer(I4B), intent(inout) :: icnvg !< convergence flag
471  integer(I4B), intent(in) :: isuppress_output !< suppress output when =1
472  integer(I4B), intent(in) :: isolnid !< solution id
473 
474  ! call exchange budget routine, also calls bd
475  ! for movers.
476  if (this%owns_exchange) then
477  call this%gwtExchange%exg_bd(icnvg, isuppress_output, isolnid)
478  end if
479 
480  end subroutine gwtgwtcon_bd
481 
482  subroutine gwtgwtcon_ot(this)
483  class(gwtgwtconnectiontype) :: this !< the connection
484 
485  ! Call exg_ot() here as it handles all output processing
486  ! based on gwtExchange%simvals(:), which was correctly
487  ! filled from gwtgwtcon
488  if (this%owns_exchange) then
489  call this%gwtExchange%exg_ot()
490  end if
491 
492  end subroutine gwtgwtcon_ot
493 
494  subroutine gwtgwtcon_da(this)
495  class(gwtgwtconnectiontype) :: this !< the connection
496  ! local
497  logical(LGP) :: isOpen
498 
499  ! scalars
500  call mem_deallocate(this%iIfaceAdvScheme)
501  call mem_deallocate(this%iIfaceXt3d)
502  call mem_deallocate(this%exgflowSign)
503 
504  ! arrays
505  call mem_deallocate(this%exgflowjaGwt)
506 
507  ! interface model
508  call this%gwtInterfaceModel%model_da()
509  deallocate (this%gwtInterfaceModel)
510 
511  ! dealloc base
512  call this%spatialcon_da()
513 
514  inquire (this%iout, opened=isopen)
515  if (isopen) then
516  close (this%iout)
517  end if
518 
519  ! we need to deallocate the exchange we own:
520  if (this%owns_exchange) then
521  call this%gwtExchange%exg_da()
522  end if
523 
524  end subroutine gwtgwtcon_da
525 
526  !> @brief Cast to GwtGwtConnectionType
527  !<
528  function castasgwtgwtconnection(obj) result(res)
529  implicit none
530  class(*), pointer, intent(inout) :: obj !< object to be cast
531  class(gwtgwtconnectiontype), pointer :: res !< the GwtGwtConnection
532 
533  res => null()
534  if (.not. associated(obj)) return
535 
536  select type (obj)
537  class is (gwtgwtconnectiontype)
538  res => obj
539  end select
540  end function castasgwtgwtconnection
541 
542 end module
integer(i4b), parameter adv_scheme_tvd
integer(i4b), parameter adv_scheme_utvd
This module contains the BudgetModule.
Definition: Budget.f90:20
subroutine, public rate_accumulator(flow, rin, rout)
@ brief Rate accumulator subroutine
Definition: Budget.f90:632
This module contains simulation constants.
Definition: Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:45
integer(i4b), parameter lencomponentname
maximum length of a component name
Definition: Constants.f90:18
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:65
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
Definition: Constants.f90:37
integer(i4b) function, public getcsrindex(i, j, ia, ja)
Return index for element i,j in CSR storage,.
Definition: CsrUtils.f90:13
subroutine allocate_scalars(this)
Allocate scalars and initialize to defaults.
subroutine allocate_arrays(this)
Allocate array data, using the number of connected nodes.
integer(i4b), parameter, public sync_nds
synchronize over nodes
integer(i4b), parameter, public sync_exg
synchronize as exchange variable
integer(i4b), parameter, public sync_con
synchronize over connections
subroutine gwtgwtconnection_ctor(this, model, gwtEx)
Basic construction of the connection.
subroutine gwtgwtcon_rp(this)
class(gwtgwtconnectiontype) function, pointer, public castasgwtgwtconnection(obj)
Cast to GwtGwtConnectionType.
subroutine setgridextent(this)
Set required extent of the interface grid from.
subroutine gwtgwtcon_ad(this)
Advance this connection.
subroutine setflowtoexchange(this)
Set the flows (flowja from interface model) to the.
subroutine gwtgwtcon_bd(this, icnvg, isuppress_output, isolnid)
subroutine gwtgwtcon_fc(this, kiter, matrix_sln, rhs_sln, inwtflag)
subroutine validateconnection(this)
validate this connection prior to constructing
subroutine cfg_dist_vars(this)
Configure distributed variables for this interface model.
subroutine gwtgwtcon_cf(this, kiter)
subroutine gwtgwtcon_cq(this, icnvg, isuppress_output, isolnid)
subroutine gwtgwtcon_da(this)
subroutine gwtgwtcon_ar(this)
allocate and read/set the connection's data structures
subroutine gwtgwtcon_ot(this)
subroutine gwtgwtcon_df(this)
define the GWT-GWT connection
This module contains the GwtGwtExchangeModule Module.
Definition: exg-gwtgwt.f90:10
class(gwtexchangetype) function, pointer, public castasgwtexchange(obj)
@ brief Cast polymorphic object as exchange
Definition: gwt.f90:8
class(gwtmodeltype) function, pointer, public castasgwtmodel(model)
Cast to GwtModelType.
Definition: gwt.f90:825
subroutine, public openfile(iu, iout, fname, ftype, fmtarg_opt, accarg_opt, filstat_opt, mode_opt)
Open a file.
Definition: InputOutput.f90:30
This module defines variable data types.
Definition: kind.f90:8
This module contains simulation methods.
Definition: Sim.f90:10
subroutine, public ustop(stopmess, ioutlocal)
Stop the simulation.
Definition: Sim.f90:312
subroutine, public store_error(msg, terminate)
Store an error message.
Definition: Sim.f90:92
integer(i4b) function, public count_errors()
Return number of errors.
Definition: Sim.f90:59
integer(i4b), parameter, public stg_aft_con_ar
afterr connection allocate read
Definition: SimStages.f90:18
integer(i4b), parameter, public stg_bfr_exg_ad
before exchange advance (per solution)
Definition: SimStages.f90:21
integer(i4b), parameter, public stg_bfr_exg_cf
before exchange calculate (per solution)
Definition: SimStages.f90:22
integer(i4b), parameter, public stg_bfr_con_ar
before connection allocate read
Definition: SimStages.f90:17
This module contains simulation variables.
Definition: SimVariables.f90:9
character(len=maxcharlen) errmsg
error message string
Data structure to hold a global cell identifier, using a pointer to the model and its local cell.
Exchange based on connection between discretizations of DisBaseType. The data specifies the connectio...
Connects a GWT model to other GWT models in space. Derives from NumericalExchangeType so the solution...
Derived type for GwtExchangeType.
Definition: exg-gwtgwt.f90:47
The GWT Interface Model is a utility to calculate the solution's exchange coefficients from the inter...
Class to manage spatial connection of a model to one or more models of the same type....