![]() |
MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
|
Class to manage spatial connection of a model to one or more models of the same type. Spatial connection here means that the model domains (spatial discretization) are adjacent and connected via DisConnExchangeType object(s). The connection itself is a Numerical Exchange as well, and part of a Numerical Solution providing the amat and rhs. More...


Public Member Functions | |
| 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_ar (this) |
| Allocate the connection,. | |
| procedure | exg_ac (this, sparse) |
| Add connections, handled by the interface model, to the sparse matrix of the global system. | |
| procedure | exg_mc (this, matrix_sln) |
| Creates the mapping from the local system. | |
| procedure | exg_cf (this, kiter) |
| Calculate (or adjust) matrix coefficients, in this case those which are determined or affected. | |
| procedure | exg_fc (this, kiter, matrix_sln, rhs_sln, inwtflag) |
| Formulate coefficients from interface model. | |
| procedure | exg_da (this) |
| Deallocation. | |
| 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_df (this) |
| Define the exchange. | |
| procedure(exg_df), deferred | exg_df (this) |
| procedure | exg_ac (this, sparse) |
| If an implicit exchange then add connections to sparse. | |
| procedure | exg_mc (this, matrix_sln) |
| Map the connections in the global matrix. | |
| procedure | exg_ar (this) |
| Allocate and read. | |
| procedure(exg_ar), deferred | exg_ar (this) |
| 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) |
| Fill the matrix. | |
| 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 | exg_da (this) |
| Deallocate memory. | |
| procedure | exg_da (this) |
| Deallocate memory. | |
| 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(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, 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 | allocatescalars (this) |
| Allocation of scalars. | |
| 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. | |
Definition at line 38 of file SpatialModelConnection.f90.
|
private |
| 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.
|
private |
| this | this connection |
Definition at line 99 of file SpatialModelConnection.f90.
|
private |
| this | this connection |
Definition at line 98 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::cfg_dv | ( | class(spatialmodelconnectiontype) | this, |
| character(len=*) | var_name, | ||
| character(len=*) | subcomp_name, | ||
| integer(i4b) | map_type, | ||
| integer(i4b), dimension(:) | sync_stages, | ||
| character(len=*), optional | exg_var_name ) |
| 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 spatialmodelconnectionmodule::spatialmodelconnectiontype::construct | ( | class(spatialmodelconnectiontype) | this, |
| class(numericalmodeltype), intent(in), pointer | model, | ||
| class(disconnexchangetype), intent(in), pointer | exchange, | ||
| character(len=*), intent(in) | name ) |
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.

|
private |
| this | this connection | |
| [in,out] | sparse | the sparse matrix with the cell connections |
Definition at line 100 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::createmodelhalo | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 93 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 20 of file NumericalExchange.f90.
| procedure spatialmodelconnectionmodule::spatialmodelconnectiontype::exg_ac | ( | class(spatialmodelconnectiontype) | this, |
| type(sparsematrix), intent(inout) | sparse ) |
| 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.
|
pure virtualinherited |
Definition at line 24 of file BaseExchange.f90.
|
inherited |
Definition at line 22 of file NumericalExchange.f90.
| procedure spatialmodelconnectionmodule::spatialmodelconnectiontype::exg_ar | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 75 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 28 of file NumericalExchange.f90.
|
inherited |
Definition at line 26 of file NumericalExchange.f90.
|
inherited |
Definition at line 24 of file NumericalExchange.f90.
| procedure spatialmodelconnectionmodule::spatialmodelconnectiontype::exg_cf | ( | class(spatialmodelconnectiontype) | this, |
| integer(i4b), intent(in) | kiter ) |
| this | this connection | |
| [in] | kiter | the iteration counter |
Definition at line 78 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 27 of file NumericalExchange.f90.
|
inherited |
Definition at line 29 of file BaseExchange.f90.
|
inherited |
Definition at line 30 of file NumericalExchange.f90.
| procedure spatialmodelconnectionmodule::spatialmodelconnectiontype::exg_da | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 80 of file SpatialModelConnection.f90.
|
pure virtualinherited |
Definition at line 23 of file BaseExchange.f90.
|
inherited |
Definition at line 19 of file NumericalExchange.f90.
| procedure spatialmodelconnectionmodule::spatialmodelconnectiontype::exg_df | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 74 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 26 of file BaseExchange.f90.
|
inherited |
Definition at line 25 of file NumericalExchange.f90.
| procedure spatialmodelconnectionmodule::spatialmodelconnectiontype::exg_fc | ( | class(spatialmodelconnectiontype) | 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 | 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.
| procedure spatialmodelconnectionmodule::spatialmodelconnectiontype::exg_mc | ( | class(spatialmodelconnectiontype) | this, |
| class(matrixbasetype), pointer | matrix_sln ) |
| this | this connection |
| matrix_sln | global matrix |
Definition at line 77 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 27 of file BaseExchange.f90.
|
inherited |
Definition at line 29 of file NumericalExchange.f90.
|
inherited |
Definition at line 25 of file BaseExchange.f90.
|
inherited |
Definition at line 31 of file NumericalExchange.f90.
|
private |
| this | this connection |
Definition at line 97 of file SpatialModelConnection.f90.
|
private |
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 96 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::spatialcon_ac | ( | class(spatialmodelconnectiontype) | this, |
| type(sparsematrix), intent(inout) | sparse ) |
| this | this connection | |
| [in,out] | sparse | sparse matrix to store the connections |
Definition at line 85 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::spatialcon_ar | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 84 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::spatialcon_cf | ( | class(spatialmodelconnectiontype) | this, |
| integer(i4b), intent(in) | kiter ) |
| this | this connection | |
| [in] | kiter | the iteration counter |
Definition at line 86 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::spatialcon_connect | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 90 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::spatialcon_da | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 88 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::spatialcon_df | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 83 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::spatialcon_fc | ( | class(spatialmodelconnectiontype) | 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 | the system matrix | |
| [in,out] | rhs_sln | global right-hand-side |
| [in] | inwtflag | newton-raphson flag |
Definition at line 87 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::spatialcon_setmodelptrs | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 89 of file SpatialModelConnection.f90.
| procedure, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::spatialconnection_ctor | ( | class(spatialmodelconnectiontype) | this, |
| class(numericalmodeltype), intent(in), pointer | model, | ||
| class(disconnexchangetype), intent(in), pointer | exchange, | ||
| character(len=*), intent(in) | name ) |
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, pass(this) spatialmodelconnectionmodule::spatialmodelconnectiontype::validateconnection | ( | class(spatialmodelconnectiontype) | this | ) |
| this | this connection |
Definition at line 91 of file SpatialModelConnection.f90.
| integer(i4b), dimension(:), pointer, contiguous spatialmodelconnectionmodule::spatialmodelconnectiontype::active => null() |
Definition at line 59 of file SpatialModelConnection.f90.
| integer(i4b), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::exg_stencil_depth => null() |
Definition at line 51 of file SpatialModelConnection.f90.
| type(stlvecint), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::halo_exchanges |
Definition at line 48 of file SpatialModelConnection.f90.
| type(stlvecint), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::halo_models |
Definition at line 47 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 19 of file BaseExchange.f90.
| type(listtype) spatialmodelconnectionmodule::spatialmodelconnectiontype::iface_dist_vars |
Definition at line 64 of file SpatialModelConnection.f90.
| class(gridconnectiontype), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::ig_builder => null() |
Definition at line 62 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 18 of file BaseExchange.f90.
| integer(i4b), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::int_stencil_depth => null() |
Definition at line 49 of file SpatialModelConnection.f90.
| type(interfacemaptype), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::interface_map => null() |
Definition at line 65 of file SpatialModelConnection.f90.
| class(numericalmodeltype), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::interface_model => null() |
Definition at line 41 of file SpatialModelConnection.f90.
| integer(i4b), dimension(:), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::ipos_to_sln => null() |
Definition at line 63 of file SpatialModelConnection.f90.
| class(sparsematrixtype), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::matrix => null() |
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.
| integer(i4b), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::neq => null() |
Definition at line 55 of file SpatialModelConnection.f90.
| integer(i4b), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::nr_connections => null() |
Definition at line 42 of file SpatialModelConnection.f90.
| class(numericalmodeltype), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::owner => null() |
Definition at line 40 of file SpatialModelConnection.f90.
| logical(lgp) spatialmodelconnectionmodule::spatialmodelconnectiontype::owns_exchange |
Definition at line 45 of file SpatialModelConnection.f90.
| class(disconnexchangetype), pointer spatialmodelconnectionmodule::spatialmodelconnectiontype::prim_exchange => null() |
Definition at line 44 of file SpatialModelConnection.f90.
| real(dp), dimension(:), pointer, contiguous spatialmodelconnectionmodule::spatialmodelconnectiontype::rhs => null() |
Definition at line 57 of file SpatialModelConnection.f90.
|
inherited |
Definition at line 15 of file BaseExchange.f90.
| real(dp), dimension(:), pointer, contiguous spatialmodelconnectionmodule::spatialmodelconnectiontype::x => null() |
Definition at line 58 of file SpatialModelConnection.f90.