![]() |
MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
|
Connecting a GWF model to other models in space, implements NumericalExchangeType so the solution can used this object to determine the coefficients for the coupling between two adjacent models. More...


Public Member Functions | |
| procedure | gwfgwfconnection_ctor (this, model, gwfex) |
| Basic construction of the connection. | |
| generic, public | construct (this, model, gwfex) |
| Basic construction of the connection. | |
| procedure | exg_df (this) |
| Define the connection. | |
| procedure | exg_ar (this) |
| Allocate and read the connection. | |
| procedure | exg_rp (this) |
| Read time varying data when required. | |
| procedure | exg_ad (this) |
| Advance this connection. | |
| procedure | exg_cf (this, kiter) |
| procedure | exg_fc (this, kiter, matrix_sln, rhs_sln, inwtflag) |
| Write the calculated coefficients into the global. | |
| procedure | exg_da (this) |
| Deallocate all resources. | |
| procedure | exg_cq (this, icnvg, isuppress_output, isolnid) |
| Calculate intra-cell flows The calculation will be dispatched to the interface model, and then mapped back to real-world cell ids. | |
| procedure | exg_bd (this, icnvg, isuppress_output, isolnid) |
| Calculate the budget terms for this connection, this is dispatched to the GWF-GWF exchange. | |
| procedure | exg_ot (this) |
| Write output for exchange (and calls. | |
| procedure | validateconnection (this) |
| Validate this connection This is called before proceeding to construct the interface model. | |
| procedure, pass(this) | spatialconnection_ctor (this, model, exchange, name) |
| Construct the spatial connection base. | |
| generic | construct (this, model, exchange, name) |
| Construct the spatial connection base. | |
| procedure | exg_df (this) |
| Define this connection, this is where the discretization (DISU) for the interface model is. | |
| procedure | exg_df (this) |
| Define the exchange. | |
| procedure(exg_df), deferred | exg_df (this) |
| procedure | exg_ar (this) |
| Allocate the connection,. | |
| procedure | exg_ar (this) |
| Allocate and read. | |
| procedure(exg_ar), deferred | exg_ar (this) |
| procedure | exg_ac (this, sparse) |
| Add connections, handled by the interface model, to the sparse matrix of the global system. | |
| procedure | exg_ac (this, sparse) |
| If an implicit exchange then add connections to sparse. | |
| procedure | exg_mc (this, matrix_sln) |
| Creates the mapping from the local system. | |
| procedure | exg_mc (this, matrix_sln) |
| Map the connections in the global matrix. | |
| procedure | exg_cf (this, kiter) |
| Calculate (or adjust) matrix coefficients, in this case those which are determined or affected. | |
| procedure | exg_cf (this, kiter) |
| Calculate conductance, and for explicit exchanges, set the conductance in the boundary package. | |
| procedure | exg_fc (this, kiter, matrix_sln, rhs_sln, inwtflag) |
| Formulate coefficients from interface model. | |
| procedure | exg_fc (this, kiter, matrix_sln, rhs_sln, inwtflag) |
| Fill the matrix. | |
| procedure | exg_da (this) |
| Deallocation. | |
| procedure | exg_da (this) |
| Deallocate memory. | |
| procedure | exg_da (this) |
| Deallocate memory. | |
| procedure, pass(this) | spatialcon_df (this) |
| Define this connection, this is where the discretization (DISU) for the interface model is. | |
| procedure, pass(this) | spatialcon_ar (this) |
| Allocate the connection,. | |
| procedure, pass(this) | spatialcon_ac (this, sparse) |
| Add connections, handled by the interface model, to the sparse matrix of the global system. | |
| procedure, pass(this) | spatialcon_cf (this, kiter) |
| Calculate (or adjust) matrix coefficients, in this case those which are determined or affected. | |
| procedure, pass(this) | spatialcon_fc (this, kiter, matrix_sln, rhs_sln, inwtflag) |
| Formulate coefficients from interface model. | |
| procedure, pass(this) | spatialcon_da (this) |
| Deallocation. | |
| procedure, pass(this) | spatialcon_setmodelptrs (this) |
| set model pointers to connection | |
| procedure, pass(this) | spatialcon_connect (this) |
| map interface model connections to our sparse matrix, | |
| procedure, pass(this) | validateconnection (this) |
| Validate this connection. | |
| procedure, pass(this) | cfg_dv (this, var_name, subcomp_name, map_type, sync_stages, exg_var_name) |
| Add a variable from the interface model to be synchronized at the configured stages by copying from the source memory in the models/exchanges that are part. | |
| procedure, pass(this) | createmodelhalo (this) |
| Find all models that might participate in this interface. | |
| procedure | exg_cc (this, icnvg) |
| Additional convergence check. | |
| procedure | exg_cq (this, icnvg, isuppress_output, isolnid) |
| Calculate flow. | |
| procedure | exg_bd (this, icnvg, isuppress_output, isolnid) |
| Exchange budget. | |
| procedure | exg_ot (this) |
| Output. | |
| procedure | exg_ot (this) |
| Run output routines. | |
| procedure | get_iasym (this) |
| procedure | exg_rp (this) |
| Read and prepare. | |
| procedure | exg_dt (this) |
| Calculate time step length. | |
| procedure | exg_fp (this) |
| Final processing. | |
| procedure | exg_ad (this) |
| Advance. | |
| procedure | connects_model (this, model) |
| Should return true when the exchange should be added to the solution where the model resides. | |
Public Attributes | |
| class(gwfmodeltype), pointer | gwfmodel => null() |
| the model for which this connection exists | |
| class(gwfexchangetype), pointer | gwfexchange => null() |
| the primary exchange, cast to its concrete type | |
| class(gwfinterfacemodeltype), pointer | gwfinterfacemodel => null() |
| the interface model | |
| integer(i4b), pointer | ixt3donexchange => null() |
| run XT3D on the interface, 0 = don't, 1 = matrix, 2 = rhs | |
| integer(i4b) | iout = 0 |
| the list file for the interface model | |
| class(numericalmodeltype), pointer | owner => null() |
| the model whose connection this is | |
| class(numericalmodeltype), pointer | interface_model => null() |
| the interface model | |
| integer(i4b), pointer | nr_connections => null() |
| total nr. of connected cells (primary) | |
| class(disconnexchangetype), pointer | prim_exchange => null() |
| the exchange for which the interface model is created | |
| logical(lgp) | owns_exchange |
| there are two connections (in serial) for an exchange, one of them needs to manage/own the exchange (e.g. clean up) | |
| type(stlvecint), pointer | halo_models |
| models that are potentially in the halo of this interface | |
| type(stlvecint), pointer | halo_exchanges |
| exchanges that are potentially part of the halo of this interface (includes primary) | |
| integer(i4b), pointer | int_stencil_depth => null() |
| size of the computational stencil for the interior default = 1, xt3d = 2, ... | |
| integer(i4b), pointer | exg_stencil_depth => null() |
| size of the computational stencil at the interface default = 1, xt3d = 2, ... | |
| integer(i4b), pointer | neq => null() |
| nr. of equations in matrix system | |
| class(sparsematrixtype), pointer | matrix => null() |
| system matrix for the interface | |
| real(dp), dimension(:), pointer, contiguous | rhs => null() |
| rhs of interface system | |
| real(dp), dimension(:), pointer, contiguous | x => null() |
| dependent variable of interface system | |
| integer(i4b), dimension(:), pointer, contiguous | active => null() |
| cell status (c.f. ibound) of interface system | |
| class(gridconnectiontype), pointer | ig_builder => null() |
| facility to build the interface grid connection structure | |
| integer(i4b), dimension(:), pointer | ipos_to_sln => null() |
| mapping between position in the interface matrix and the solution matrix | |
| type(listtype) | iface_dist_vars |
| list with distributed variables for this interface | |
| type(interfacemaptype), pointer | interface_map => null() |
| a map of the interface into models and exchanges | |
| character(len=7) | typename |
| name of the type (e.g., 'GWF-GWF') | |
| character(len=lenexchangename) | name |
| the name of this exchange | |
| character(len=lenmempath) | memorypath |
| the location in the memory manager where the variables are stored | |
| character(len=lenmempath) | input_mempath |
| integer(i4b) | id |
Private Member Functions | |
| procedure, private | cfg_dist_vars (this) |
| Configure distributed variables for this interface model. | |
| procedure, private | allocatescalars (this) |
| allocation of scalars in the connection | |
| procedure, private | setgridextent (this) |
| Set the required size of the interface grid from. | |
| procedure, private | validategwfexchange (this) |
| Validate the exchange, intercepting those cases where two models have to be connected with an interface model, where the individual configurations don't allow this. | |
| procedure, private | setflowtoexchange (this) |
| Set the flows (flowja from interface model) to the. | |
| procedure, private | setflowtomodel (this) |
| Set the flows (flowja from the interface model) to. | |
| procedure, private | setnpfedgeprops (this) |
| Set flowja as edge properties in the model,. | |
| procedure, pass(this), private | setupgridconnection (this) |
| Creates the connection structure for the interface grid, starting from primary exchanges, then extending inward and outward, possibly across model boundaries. | |
| procedure, pass(this), private | getnrofconnections (this) |
| Returns total nr. of primary connections. | |
| procedure, pass(this), private | allocatearrays (this) |
| Allocation of arrays. | |
| procedure, pass(this), private | createcoefficientmatrix (this, sparse) |
| Create connection's matrix (ia,ja,amat) from sparse. | |
| procedure, pass(this), private | maskownerconnections (this) |
| Mask the owner's connections. | |
| procedure, pass(this), private | addmodelneighbors (this, model_id, virtual_exchanges, depth, is_root, mask) |
| Add neighbors and nbrs-of-nbrs to the model tree. | |
Two connections are created per exchange between model1 and model2: one to manage the coefficients in the matrix rows for model1, and the other to do the same for model2.
Definition at line 38 of file GwfGwfConnection.f90.
|
privateinherited |
| this | this connection |
| model_id | the model (id) to add neighbors for |
| virtual_exchanges | list with all virtual exchanges |
| depth | the maximal number of exchanges between |
| is_root | true when called for neighbor from primary exchange |
| mask | don't add this one as a neighbor |
Definition at line 102 of file SpatialModelConnection.f90.
|
privateinherited |
| this | this connection |
Definition at line 99 of file SpatialModelConnection.f90.
|
private |
| this | the connection |
Definition at line 68 of file GwfGwfConnection.f90.
|
private |
| this | the connection |
Definition at line 67 of file GwfGwfConnection.f90.
|
inherited |
| this | this connection |
| var_name | name of variable, e.g. "K11" |
| subcomp_name | subcomponent, e.g. "NPF" |
| map_type | type of variable map |
| sync_stages | stages to sync |
| exg_var_name | needed for exchange variables, e.g. SIMVALS |
Definition at line 92 of file SpatialModelConnection.f90.
|
inherited |
| this | the instance of the exchange | |
| [in] | model | the model to which the exchange might hold a connection |
Definition at line 31 of file BaseExchange.f90.
| generic, public gwfgwfconnectionmodule::gwfgwfconnectiontype::construct | ( | class(gwfgwfconnectiontype) | this, |
| class(numericalmodeltype), pointer | model, | ||
| class(disconnexchangetype), pointer | gwfex ) |
| this | the connection |
| model | the model owning this connection, this must of course be a GwfModelType |
| gwfex | the exchange the interface model is created for |
Definition at line 49 of file GwfGwfConnection.f90.

|
inherited |
This constructor is typically called from a derived class.
| this | the connection | |
| [in] | model | the model that owns the connection |
| [in] | exchange | the primary exchange from which the connection is created |
| [in] | name | the connection name (for memory management mostly) |
Definition at line 71 of file SpatialModelConnection.f90.

|
privateinherited |
| this | this connection | |
| [in,out] | sparse | the sparse matrix with the cell connections |
Definition at line 100 of file SpatialModelConnection.f90.
|
inherited |
| this | this connection |
Definition at line 93 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 20 of file NumericalExchange.f90.
|
inherited |
| this | this connection | |
| [in,out] | sparse | sparse matrix to store the connections |
Definition at line 76 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 30 of file BaseExchange.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_ad | ( | class(gwfgwfconnectiontype) | this | ) |
| this | this connection |
Definition at line 55 of file GwfGwfConnection.f90.
|
pure virtualinherited |
Definition at line 24 of file BaseExchange.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_ar | ( | class(gwfgwfconnectiontype) | this | ) |
| this | this connection |
Definition at line 53 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 22 of file NumericalExchange.f90.
|
inherited |
| this | this connection |
Definition at line 75 of file SpatialModelConnection.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_bd | ( | class(gwfgwfconnectiontype) | this, |
| integer(i4b), intent(inout) | icnvg, | ||
| integer(i4b), intent(in) | isuppress_output, | ||
| integer(i4b), intent(in) | isolnid ) |
| this | this connection | |
| [in,out] | icnvg | convergence flag |
| [in] | isuppress_output | suppress output when =1 |
| [in] | isolnid | solution id |
Definition at line 60 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 28 of file NumericalExchange.f90.
|
inherited |
Definition at line 26 of file NumericalExchange.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_cf | ( | class(gwfgwfconnectiontype) | this, |
| integer(i4b), intent(in) | kiter ) |
| this | this connection | |
| [in] | kiter | the iteration counter |
Definition at line 56 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 24 of file NumericalExchange.f90.
|
inherited |
| this | this connection | |
| [in] | kiter | the iteration counter |
Definition at line 78 of file SpatialModelConnection.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_cq | ( | class(gwfgwfconnectiontype) | this, |
| integer(i4b), intent(inout) | icnvg, | ||
| integer(i4b), intent(in) | isuppress_output, | ||
| integer(i4b), intent(in) | isolnid ) |
| this | this connection | |
| [in,out] | icnvg | convergence flag |
| [in] | isuppress_output | suppress output when =1 |
| [in] | isolnid | solution id |
Definition at line 59 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 27 of file NumericalExchange.f90.
|
inherited |
Definition at line 29 of file BaseExchange.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_da | ( | class(gwfgwfconnectiontype) | this | ) |
| this | this connection |
Definition at line 58 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 30 of file NumericalExchange.f90.
|
inherited |
| this | this connection |
Definition at line 80 of file SpatialModelConnection.f90.
|
pure virtualinherited |
Definition at line 23 of file BaseExchange.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_df | ( | class(gwfgwfconnectiontype) | this | ) |
This sets up the GridConnection (for creating the interface grid), creates and defines the interface
| this | this connection |
Definition at line 52 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 19 of file NumericalExchange.f90.
|
inherited |
| this | this connection |
Definition at line 74 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 26 of file BaseExchange.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_fc | ( | class(gwfgwfconnectiontype) | this, |
| integer(i4b), intent(in) | kiter, | ||
| class(matrixbasetype), pointer | matrix_sln, | ||
| real(dp), dimension(:), intent(inout) | rhs_sln, | ||
| integer(i4b), intent(in), optional | inwtflag ) |
| this | this connection | |
| [in] | kiter | the iteration counter |
| matrix_sln | global system matrix coefficients | |
| [in,out] | rhs_sln | global right-hand-side |
| [in] | inwtflag | newton-raphson flag |
Definition at line 57 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 25 of file NumericalExchange.f90.
|
inherited |
| this | this connection | |
| [in] | kiter | the iteration counter |
| matrix_sln | the system matrix | |
| [in,out] | rhs_sln | global right-hand-side |
| [in] | inwtflag | newton-raphson flag |
Definition at line 79 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 28 of file BaseExchange.f90.
|
inherited |
Definition at line 21 of file NumericalExchange.f90.
|
inherited |
| this | this connection |
| matrix_sln | global matrix |
Definition at line 77 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 27 of file BaseExchange.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_ot | ( | class(gwfgwfconnectiontype) | this | ) |
| this | this connection |
Definition at line 61 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 29 of file NumericalExchange.f90.
|
inherited |
Definition at line 25 of file BaseExchange.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::exg_rp | ( | class(gwfgwfconnectiontype) | this | ) |
| this | this connection |
Definition at line 54 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 31 of file NumericalExchange.f90.
|
privateinherited |
| this | this connection |
Definition at line 97 of file SpatialModelConnection.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::gwfgwfconnection_ctor | ( | class(gwfgwfconnectiontype) | this, |
| class(numericalmodeltype), pointer | model, | ||
| class(disconnexchangetype), pointer | gwfex ) |
| this | the connection |
| model | the model owning this connection, this must of course be a GwfModelType |
| gwfex | the exchange the interface model is created for |
Definition at line 48 of file GwfGwfConnection.f90.
|
privateinherited |
Determine which connections are handled by the interface model (using the connections object in its discretization) and
| this | the connection |
Definition at line 101 of file SpatialModelConnection.f90.
|
private |
| this | this connection |
Definition at line 71 of file GwfGwfConnection.f90.
|
private |
| this | this connection |
Definition at line 72 of file GwfGwfConnection.f90.
|
private |
| this | the connection |
Definition at line 69 of file GwfGwfConnection.f90.
|
private |
| this | this connection |
Definition at line 73 of file GwfGwfConnection.f90.
|
privateinherited |
| this | this connection |
Definition at line 96 of file SpatialModelConnection.f90.
|
inherited |
| this | this connection | |
| [in,out] | sparse | sparse matrix to store the connections |
Definition at line 85 of file SpatialModelConnection.f90.
|
inherited |
| this | this connection |
Definition at line 84 of file SpatialModelConnection.f90.
|
inherited |
| this | this connection | |
| [in] | kiter | the iteration counter |
Definition at line 86 of file SpatialModelConnection.f90.
|
inherited |
| this | this connection |
Definition at line 90 of file SpatialModelConnection.f90.
|
inherited |
| this | this connection |
Definition at line 88 of file SpatialModelConnection.f90.
|
inherited |
| this | this connection |
Definition at line 83 of file SpatialModelConnection.f90.
|
inherited |
| this | this connection | |
| [in] | kiter | the iteration counter |
| matrix_sln | the system matrix | |
| [in,out] | rhs_sln | global right-hand-side |
| [in] | inwtflag | newton-raphson flag |
Definition at line 87 of file SpatialModelConnection.f90.
|
inherited |
| this | this connection |
Definition at line 89 of file SpatialModelConnection.f90.
|
inherited |
This constructor is typically called from a derived class.
| this | the connection | |
| [in] | model | the model that owns the connection |
| [in] | exchange | the primary exchange from which the connection is created |
| [in] | name | the connection name (for memory management mostly) |
Definition at line 70 of file SpatialModelConnection.f90.
| procedure gwfgwfconnectionmodule::gwfgwfconnectiontype::validateconnection | ( | class(gwfgwfconnectiontype) | this | ) |
| this | this connection |
Definition at line 64 of file GwfGwfConnection.f90.
|
inherited |
| this | this connection |
Definition at line 91 of file SpatialModelConnection.f90.
|
private |
Stops with error message on config mismatch
| this | this connection |
Definition at line 70 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 59 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 51 of file SpatialModelConnection.f90.
| class(gwfexchangetype), pointer gwfgwfconnectionmodule::gwfgwfconnectiontype::gwfexchange => null() |
Definition at line 41 of file GwfGwfConnection.f90.
| class(gwfinterfacemodeltype), pointer gwfgwfconnectionmodule::gwfgwfconnectiontype::gwfinterfacemodel => null() |
Definition at line 42 of file GwfGwfConnection.f90.
| class(gwfmodeltype), pointer gwfgwfconnectionmodule::gwfgwfconnectiontype::gwfmodel => null() |
Definition at line 40 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 48 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 47 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 19 of file BaseExchange.f90.
|
inherited |
Definition at line 64 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 62 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 18 of file BaseExchange.f90.
|
inherited |
Definition at line 49 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 65 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 41 of file SpatialModelConnection.f90.
| integer(i4b) gwfgwfconnectionmodule::gwfgwfconnectiontype::iout = 0 |
Definition at line 45 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 63 of file SpatialModelConnection.f90.
| integer(i4b), pointer gwfgwfconnectionmodule::gwfgwfconnectiontype::ixt3donexchange => null() |
Definition at line 43 of file GwfGwfConnection.f90.
|
inherited |
Definition at line 56 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 17 of file BaseExchange.f90.
|
inherited |
Definition at line 16 of file BaseExchange.f90.
|
inherited |
Definition at line 55 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 42 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 40 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 45 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 44 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 57 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 15 of file BaseExchange.f90.
|
inherited |
Definition at line 58 of file SpatialModelConnection.f90.