21 logical(LGP) :: dev_always_ifmod = .false.
47 select type (solution)
55 call this%processExchanges(numsol%exchangelist, newconnections)
56 if (newconnections%Count() == 0)
then
60 write (
iout,
'(1x,a,i0,a,a)')
'Created ', newconnections%Count(), &
61 ' model connections for solution ', trim(solution%name)
64 call this%createModelConnectivity(newconnections)
67 call this%setConnectionsToSolution(newconnections, numsol)
70 call newconnections%Clear(destroy=.false.)
83 type(
listtype),
pointer,
intent(in) :: exchanges
84 type(
listtype),
intent(inout) :: newConnections
88 integer(I4B) :: iex, ibasex
90 logical(LGP) :: isPeriodic
92 do iex = 1, exchanges%Count()
94 if (.not.
associated(conex))
then
101 if (conex%use_interface_model() .or. conex%dev_ifmod_on &
102 .or. this%dev_always_ifmod)
then
105 isperiodic = (conex%v_model1 == conex%v_model2)
107 write (*, *)
'Error (which should never happen): interface model '// &
108 'does not support periodic boundary condition'
112 if (conex%v_model1%is_local)
then
120 if (conex%v_model2%is_local)
then
130 if (conex%id == baseex%id)
then
165 select case (exchange%typename)
168 call flowconnection%construct(model, exchange)
169 connection => flowconnection
170 flowconnection => null()
173 call transportconnection%construct(model, exchange)
174 connection => transportconnection
175 transportconnection => null()
178 call energytransportconnection%construct(model, exchange)
179 connection => energytransportconnection
180 energytransportconnection => null()
182 write (*, *)
'Error (which should never happen): '// &
183 'undefined exchangetype found'
196 type(
listtype),
intent(inout) :: connections
200 class(*),
pointer :: exPtr, exPtr2, connPtr
202 integer(I4B) :: iex, iconn
203 logical(LGP) :: keepExchange
206 do iex = 1, solution%exchangelist%Count()
207 exptr => solution%exchangelist%GetItem(iex)
209 keepexchange = .true.
210 do iconn = 1, connections%Count()
212 exptr2 => conn%prim_exchange
213 if (
associated(exptr2, exptr))
then
215 keepexchange = .false.
220 if (keepexchange)
then
221 call keeplist%Add(exptr)
226 call solution%exchangelist%Clear(destroy=.false.)
227 do iex = 1, keeplist%Count()
228 exptr => keeplist%GetItem(iex)
229 call solution%exchangelist%Add(exptr)
233 do iconn = 1, connections%Count()
234 connptr => connections%GetItem(iconn)
235 call solution%exchangelist%Add(connptr)
239 call keeplist%Clear(destroy=.false.)
251 type(
listtype),
intent(inout) :: connections
253 integer(I4B) :: iconn
257 do iconn = 1, connections%Count()
259 call modelconn%createModelHalo()
class(baseexchangetype) function, pointer, public getbaseexchangefromlist(list, idx)
Retrieve a specific BaseExchangeType object from a list.
subroutine processsolution(this, solution)
Process the exchanges in the solution into model connections.
class(spatialmodelconnectiontype) function, pointer createmodelconnection(model, exchange)
Create a model connection of a given type.
subroutine setconnectionstosolution(this, connections, solution)
Set connections to the solution.
subroutine createmodelconnectivity(this, connections)
Create connectivity of models which contribute to the interface.
subroutine processexchanges(this, exchanges, newConnections)
Create connections from exchanges.
class(disconnexchangetype) function, pointer, public getdisconnexchangefromlist(list, idx)
This module defines variable data types.
type(listtype), public baseexchangelist
type(listtype), public baseconnectionlist
This module contains simulation methods.
subroutine, public ustop(stopmess, ioutlocal)
Stop the simulation.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
This module contains simulation variables.
integer(i4b) iout
file unit number for simulation output
class(spatialmodelconnectiontype) function, pointer, public get_smc_from_list(list, idx)
Get the connection from a list.
class(spatialmodelconnectiontype) function, pointer, public cast_as_smc(obj)
Cast to SpatialModelConnectionType.
subroutine, public add_smc_to_list(list, conn)
Add connection to a list.
Exchange based on connection between discretizations of DisBaseType. The data specifies the connectio...
Connects a GWE model to other GWE models in space. Derives from NumericalExchangeType so the solution...
Connecting a GWF model to other models in space, implements NumericalExchangeType so the solution can...
Connects a GWT model to other GWT models in space. Derives from NumericalExchangeType so the solution...
A generic heterogeneous doubly-linked list.
Class to manage spatial connection of a model to one or more models of the same type....