22 logical(LGP) :: dev_always_ifmod = .false.
48 select type (solution)
56 call this%processExchanges(numsol%exchangelist, newconnections)
57 if (newconnections%Count() == 0)
then
61 write (
iout,
'(1x,a,i0,a,a)')
'Created ', newconnections%Count(), &
62 ' model connections for solution ', trim(solution%name)
65 call this%createModelConnectivity(newconnections)
68 call this%setConnectionsToSolution(newconnections, numsol)
71 call newconnections%Clear(destroy=.false.)
84 type(
listtype),
pointer,
intent(in) :: exchanges
85 type(
listtype),
intent(inout) :: newConnections
89 integer(I4B) :: iex, ibasex
91 logical(LGP) :: isPeriodic
93 do iex = 1, exchanges%Count()
95 if (.not.
associated(conex))
then
102 if (conex%use_interface_model() .or. conex%dev_ifmod_on &
103 .or. this%dev_always_ifmod)
then
106 isperiodic = (conex%v_model1 == conex%v_model2)
108 write (*, *)
'Error (which should never happen): interface model '// &
109 'does not support periodic boundary condition'
113 if (conex%v_model1%is_local)
then
121 if (conex%v_model2%is_local)
then
131 if (conex%id == baseex%id)
then
166 select case (exchange%typename)
169 call flowconnection%construct(model, exchange)
170 connection => flowconnection
171 flowconnection => null()
174 call transportconnection%construct(model, exchange)
175 connection => transportconnection
176 transportconnection => null()
179 call energytransportconnection%construct(model, exchange)
180 connection => energytransportconnection
181 energytransportconnection => null()
183 write (*, *)
'Error (which should never happen): '// &
184 'undefined exchangetype found'
197 type(
listtype),
intent(inout) :: connections
201 class(*),
pointer :: exPtr, exPtr2, connPtr
203 integer(I4B) :: iex, iconn
204 logical(LGP) :: keepExchange
207 do iex = 1, solution%exchangelist%Count()
208 exptr => solution%exchangelist%GetItem(iex)
210 keepexchange = .true.
211 do iconn = 1, connections%Count()
213 exptr2 => conn%prim_exchange
214 if (
associated(exptr2, exptr))
then
216 keepexchange = .false.
221 if (keepexchange)
then
222 call keeplist%Add(exptr)
227 call solution%exchangelist%Clear(destroy=.false.)
228 do iex = 1, keeplist%Count()
229 exptr => keeplist%GetItem(iex)
230 call solution%exchangelist%Add(exptr)
234 do iconn = 1, connections%Count()
235 connptr => connections%GetItem(iconn)
236 call solution%exchangelist%Add(connptr)
240 call keeplist%Clear(destroy=.false.)
252 type(
listtype),
intent(inout) :: connections
254 integer(I4B) :: iconn
258 do iconn = 1, connections%Count()
260 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....