26 logical(LGP),
private :: has_mvr
45 integer(I4B) :: exchange_id
46 character(len=*) :: name
47 integer(I4B) :: model1_id
48 integer(I4B) :: model2_id
51 class(*),
pointer :: obj_ptr
54 call v_exg%create(name, exchange_id, model1_id, model2_id)
65 character(len=*) :: name
66 integer(I4B) :: exg_id
70 call this%VirtualExchangeType%create(name, exg_id, m1_id, m2_id)
73 call this%allocate_data()
74 call this%init_virtual_data()
76 this%has_mvr = .false.
83 logical(LGP) :: is_nodem1_local
84 logical(LGP) :: is_nodem2_local
86 is_nodem1_local = this%v_model1%is_local
87 is_nodem2_local = this%v_model2%is_local
88 call this%set(this%inmvr%base(),
'INMVR',
'',
map_all_type)
89 call this%set(this%mvr_maxmvr%base(),
'MAXMVR',
'MVR',
map_all_type)
91 call this%set(this%mvr_qpactual_m1%base(),
'QPACTUAL_M1',
'MVR', &
93 call this%set(this%mvr_qpactual_m2%base(),
'QPACTUAL_M2',
'MVR', &
95 call this%set(this%mvr_qavailable_m1%base(),
'QAVAILABLE_M1',
'MVR', &
97 call this%set(this%mvr_qavailable_m2%base(),
'QAVAILABLE_M2',
'MVR', &
99 call this%set(this%mvr_id_mapped_m1%base(),
'ID_MAPPED_M1',
'MVR', &
101 call this%set(this%mvr_id_mapped_m2%base(),
'ID_MAPPED_M2',
'MVR', &
108 integer(I4B) :: stage
113 call this%VirtualExchangeType%prepare_stage(stage)
123 if (this%inmvr%get() > 0)
then
124 this%has_mvr = .true.
130 if (this%has_mvr .and. this%is_local)
then
138 if (this%has_mvr .and. this%is_local) nmax = this%mvr_maxmvr%get()
141 call this%map(this%mvr_qpactual_m1%base(), nmax, (/
stg_bfr_exg_fc/))
142 call this%map(this%mvr_qpactual_m2%base(), nmax, (/
stg_bfr_exg_fc/))
143 call this%map(this%mvr_qavailable_m1%base(), nmax, (/
stg_bfr_exg_fc/))
144 call this%map(this%mvr_qavailable_m2%base(), nmax, (/
stg_bfr_exg_fc/))
145 call this%map(this%mvr_id_mapped_m1%base(), nmax, (/
stg_aft_con_rp/))
146 call this%map(this%mvr_id_mapped_m2%base(), nmax, (/
stg_aft_con_rp/))
148 call this%map(this%mvr_qpactual_m1%base(), 0, (/
stg_never/))
149 call this%map(this%mvr_qpactual_m2%base(), 0, (/
stg_never/))
150 call this%map(this%mvr_qavailable_m1%base(), 0, (/
stg_never/))
151 call this%map(this%mvr_qavailable_m2%base(), 0, (/
stg_never/))
152 call this%map(this%mvr_id_mapped_m1%base(), 0, (/
stg_never/))
153 call this%map(this%mvr_id_mapped_m2%base(), 0, (/
stg_never/))
167 call this%VirtualExchangeType%get_recv_items(stg, rank, vi)
171 if (this%is_local .and. rank == this%orig_rank)
then
172 if (this%mvr_id_mapped_m1%is_remote)
then
174 call this%add_vdi_for_stage(this%mvr_qpactual_m1%base(), stg, vi)
175 call this%add_vdi_for_stage(this%mvr_qavailable_m1%base(), stg, vi)
176 call this%add_vdi_for_stage(this%mvr_id_mapped_m1%base(), stg, vi)
178 if (this%mvr_id_mapped_m2%is_remote)
then
180 call this%add_vdi_for_stage(this%mvr_qpactual_m2%base(), stg, vi)
181 call this%add_vdi_for_stage(this%mvr_qavailable_m2%base(), stg, vi)
182 call this%add_vdi_for_stage(this%mvr_id_mapped_m2%base(), stg, vi)
195 call this%VirtualExchangeType%get_send_items(stg, rank, vi)
199 if (this%is_local .and. rank == this%orig_rank)
then
200 if (.not. this%mvr_id_mapped_m1%is_remote)
then
202 call this%add_vdi_for_stage(this%mvr_qpactual_m1%base(), stg, vi)
203 call this%add_vdi_for_stage(this%mvr_qavailable_m1%base(), stg, vi)
204 call this%add_vdi_for_stage(this%mvr_id_mapped_m1%base(), stg, vi)
206 if (.not. this%mvr_id_mapped_m2%is_remote)
then
208 call this%add_vdi_for_stage(this%mvr_qpactual_m2%base(), stg, vi)
209 call this%add_vdi_for_stage(this%mvr_qavailable_m2%base(), stg, vi)
210 call this%add_vdi_for_stage(this%mvr_id_mapped_m2%base(), stg, vi)
220 logical(LGP) :: has_mover
222 has_mover = this%has_mvr
229 allocate (this%inmvr)
230 allocate (this%mvr_maxmvr)
231 allocate (this%mvr_qpactual_m1)
232 allocate (this%mvr_qpactual_m2)
233 allocate (this%mvr_qavailable_m1)
234 allocate (this%mvr_qavailable_m2)
235 allocate (this%mvr_id_mapped_m1)
236 allocate (this%mvr_id_mapped_m2)
243 deallocate (this%inmvr)
244 deallocate (this%mvr_maxmvr)
245 deallocate (this%mvr_qpactual_m1)
246 deallocate (this%mvr_qpactual_m2)
247 deallocate (this%mvr_qavailable_m1)
248 deallocate (this%mvr_qavailable_m2)
249 deallocate (this%mvr_id_mapped_m1)
250 deallocate (this%mvr_id_mapped_m2)
257 call this%VirtualExchangeType%destroy()
258 call this%deallocate_data()
This module defines variable data types.
integer(i4b), parameter, public stg_aft_con_ar
afterr connection allocate read
integer(i4b), parameter, public stg_aft_exg_df
after exchange define
integer(i4b), parameter, public stg_never
never
integer(i4b), parameter, public stg_aft_con_cr
after connection create
integer(i4b), parameter, public stg_bfr_exg_fc
before exchange formulate (per solution)
integer(i4b), parameter, public stg_bfr_con_ar
before connection allocate read
integer(i4b), parameter, public stg_aft_con_rp
after connection read prepare
integer(i4b), parameter, public map_all_type
integer(i4b), parameter, public vdc_gwfexg_type
type(listtype), public virtual_exchange_list
subroutine deallocate_data(this)
subroutine init_virtual_data(this)
subroutine allocate_data(this)
subroutine, public add_virtual_gwf_exchange(name, exchange_id, model1_id, model2_id)
Add a virtual GWF-GWF exchange to the simulation.
logical(lgp) function vfx_has_mover(this)
Override.
subroutine vfx_create(this, name, exg_id, m1_id, m2_id)
Create a virtual GWF-GWF exchange.
subroutine vfx_destroy(this)
subroutine vfx_prepare_stage(this, stage)
subroutine vfx_get_send_items(this, stg, rank, vi)
subroutine vfx_get_recv_items(this, stg, rank, vi)
The Virtual Exchange is based on two Virtual Models and is therefore not always strictly local or rem...
For synchronization of GWF specific exchange data: