104 character(len=*) :: name
105 integer(I4B) :: exg_id
106 integer(I4B) :: m1_id
107 integer(I4B) :: m2_id
109 logical(LGP) :: is_local
117 is_local = this%v_model1%is_local .or. this%v_model2%is_local
118 call this%VirtualDataContainerType%vdc_create(name, exg_id, is_local)
120 call this%allocate_data()
121 call this%init_virtual_data()
128 logical(LGP) :: is_nodem1_local
129 logical(LGP) :: is_nodem2_local
134 is_nodem1_local = this%v_model1%is_local
135 is_nodem2_local = this%v_model2%is_local
136 call this%set(this%nexg%base(),
'NEXG',
'',
map_all_type)
137 call this%set(this%naux%base(),
'NAUX',
'',
map_all_type)
138 call this%set(this%ianglex%base(),
'IANGLEX',
'',
map_all_type)
139 call this%set(this%nodem1%base(),
'NODEM1',
'', &
141 call this%set(this%nodem2%base(),
'NODEM2',
'', &
146 call this%set(this%hwva%base(),
'HWVA',
'',
map_all_type)
147 call this%set(this%auxvar%base(),
'AUXVAR',
'',
map_all_type)
153 integer(I4B) :: stage
155 integer(I4B) :: nexg, naux
165 nexg = this%nexg%get()
166 naux = this%naux%get()
187 if (this%is_local .and. rank == this%orig_rank)
then
191 if (this%nodem1%is_remote)
then
192 call this%add_vdi_for_stage(this%nodem1%base(), stg, vi)
194 if (this%nodem2%is_remote)
then
195 call this%add_vdi_for_stage(this%nodem2%base(), stg, vi)
200 call this%add_vdi_for_stage(this%nexg%base(), stg, vi)
201 call this%add_vdi_for_stage(this%naux%base(), stg, vi)
202 call this%add_vdi_for_stage(this%ianglex%base(), stg, vi)
203 call this%add_vdi_for_stage(this%nodem1%base(), stg, vi)
204 call this%add_vdi_for_stage(this%nodem2%base(), stg, vi)
205 call this%add_vdi_for_stage(this%ihc%base(), stg, vi)
206 call this%add_vdi_for_stage(this%cl1%base(), stg, vi)
207 call this%add_vdi_for_stage(this%cl2%base(), stg, vi)
208 call this%add_vdi_for_stage(this%hwva%base(), stg, vi)
209 call this%add_vdi_for_stage(this%auxvar%base(), stg, vi)
220 if (this%is_local .and. rank == this%orig_rank)
then
224 if (.not. this%nodem1%is_remote)
then
225 call this%add_vdi_for_stage(this%nodem1%base(), stg, vi)
227 if (.not. this%nodem2%is_remote)
then
228 call this%add_vdi_for_stage(this%nodem2%base(), stg, vi)
233 call this%add_vdi_for_stage(this%nexg%base(), stg, vi)
234 call this%add_vdi_for_stage(this%naux%base(), stg, vi)
235 call this%add_vdi_for_stage(this%ianglex%base(), stg, vi)
236 call this%add_vdi_for_stage(this%nodem1%base(), stg, vi)
237 call this%add_vdi_for_stage(this%nodem2%base(), stg, vi)
238 call this%add_vdi_for_stage(this%ihc%base(), stg, vi)
239 call this%add_vdi_for_stage(this%cl1%base(), stg, vi)
240 call this%add_vdi_for_stage(this%cl2%base(), stg, vi)
241 call this%add_vdi_for_stage(this%hwva%base(), stg, vi)
242 call this%add_vdi_for_stage(this%auxvar%base(), stg, vi)
252 integer(I4B) :: stage
255 class(*),
pointer :: vdi
259 idx = this%virtual_data_list%GetIndex(vdi)
260 if (vdata_item%check_stage(stage))
then
261 call virtual_items%push_back(idx)
270 logical(LGP) :: has_mover
279 call this%VirtualDataContainerType%destroy()
280 call this%deallocate_data()
289 allocate (this%ianglex)
290 allocate (this%nodem1)
291 allocate (this%nodem2)
296 allocate (this%auxvar)
303 deallocate (this%nexg)
304 deallocate (this%naux)
305 deallocate (this%ianglex)
306 deallocate (this%nodem1)
307 deallocate (this%nodem2)
308 deallocate (this%ihc)
309 deallocate (this%cl1)
310 deallocate (this%cl2)
311 deallocate (this%hwva)
312 deallocate (this%auxvar)
320 integer(I4B) :: exg_id
324 class(*),
pointer :: ve
326 virtual_exg => null()
331 if (ve%id == exg_id)
then
345 class(*),
pointer :: obj_ptr
347 obj_ptr => list%GetItem(idx)
353 class(*),
pointer :: obj_ptr
356 virtual_exg => null()
357 select type (obj_ptr)
359 virtual_exg => obj_ptr
This module contains simulation constants.
integer(i4b), parameter lenexchangename
maximum length of the exchange name
This module defines variable data types.
integer(i4b), parameter, public stg_aft_exg_df
after exchange define
integer(i4b), parameter, public stg_aft_con_cr
after connection create
integer(i4b), parameter, public stg_bfr_con_df
before connection define
integer(i4b), parameter, public map_all_type
type(listtype), public virtual_exchange_list
subroutine deallocate_data(this)
subroutine init_virtual_data(this)
logical(lgp) function vx_has_mover(this)
Checks if there is an active mover in the exchange.
subroutine allocate_data(this)
subroutine add_vdi_for_stage(this, vdata_item, stage, virtual_items)
Convenience routine to add virtual data item to a list.
class(virtualexchangetype) function, pointer, private cast_as_virtual_exchange(obj_ptr)
subroutine vx_get_recv_items(this, stg, rank, vi)
class(virtualexchangetype) function, pointer, public get_virtual_exchange_from_list(list, idx)
subroutine vx_create(this, name, exg_id, m1_id, m2_id)
Create the virtual exchange base.
class(virtualexchangetype) function, pointer, public get_virtual_exchange(exg_id)
Returns a virtual exchange with the specified id.
subroutine vx_prepare_stage(this, stage)
subroutine vx_get_send_items(this, stg, rank, vi)
subroutine vx_destroy(this)
A generic heterogeneous doubly-linked list.
This is a generic data structure to virtualize pieces of memory in 2 distinct ways:
Container (list) of virtual data items.
The Virtual Exchange is based on two Virtual Models and is therefore not always strictly local or rem...