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()
129 call this%set(this%nexg%base(),
'NEXG',
'',
map_all_type)
130 call this%set(this%naux%base(),
'NAUX',
'',
map_all_type)
131 call this%set(this%ianglex%base(),
'IANGLEX',
'',
map_all_type)
137 call this%set(this%nodem1%base(),
'NODEM1',
'', &
139 call this%set(this%nodem2%base(),
'NODEM2',
'', &
145 call this%set(this%hwva%base(),
'HWVA',
'',
map_all_type)
146 call this%set(this%auxvar%base(),
'AUXVAR',
'',
map_all_type)
152 integer(I4B) :: stage
154 integer(I4B) :: nexg, naux
164 nexg = this%nexg%get()
165 naux = this%naux%get()
186 if (this%is_local .and. rank == this%orig_rank)
then
190 if (this%nodem1%is_remote)
then
191 call this%add_vdi_for_stage(this%nodem1%base(), stg, vi)
193 if (this%nodem2%is_remote)
then
194 call this%add_vdi_for_stage(this%nodem2%base(), stg, vi)
199 call this%add_vdi_for_stage(this%nexg%base(), stg, vi)
200 call this%add_vdi_for_stage(this%naux%base(), stg, vi)
201 call this%add_vdi_for_stage(this%ianglex%base(), stg, vi)
202 call this%add_vdi_for_stage(this%nodem1%base(), stg, vi)
203 call this%add_vdi_for_stage(this%nodem2%base(), stg, vi)
204 call this%add_vdi_for_stage(this%ihc%base(), stg, vi)
205 call this%add_vdi_for_stage(this%cl1%base(), stg, vi)
206 call this%add_vdi_for_stage(this%cl2%base(), stg, vi)
207 call this%add_vdi_for_stage(this%hwva%base(), stg, vi)
208 call this%add_vdi_for_stage(this%auxvar%base(), stg, vi)
219 if (this%is_local .and. rank == this%orig_rank)
then
223 if (.not. this%nodem1%is_remote)
then
224 call this%add_vdi_for_stage(this%nodem1%base(), stg, vi)
226 if (.not. this%nodem2%is_remote)
then
227 call this%add_vdi_for_stage(this%nodem2%base(), stg, vi)
232 call this%add_vdi_for_stage(this%nexg%base(), stg, vi)
233 call this%add_vdi_for_stage(this%naux%base(), stg, vi)
234 call this%add_vdi_for_stage(this%ianglex%base(), stg, vi)
235 call this%add_vdi_for_stage(this%nodem1%base(), stg, vi)
236 call this%add_vdi_for_stage(this%nodem2%base(), stg, vi)
237 call this%add_vdi_for_stage(this%ihc%base(), stg, vi)
238 call this%add_vdi_for_stage(this%cl1%base(), stg, vi)
239 call this%add_vdi_for_stage(this%cl2%base(), stg, vi)
240 call this%add_vdi_for_stage(this%hwva%base(), stg, vi)
241 call this%add_vdi_for_stage(this%auxvar%base(), stg, vi)
251 integer(I4B) :: stage
254 class(*),
pointer :: vdi
258 idx = this%virtual_data_list%GetIndex(vdi)
259 if (vdata_item%check_stage(stage))
then
260 call virtual_items%push_back(idx)
269 logical(LGP) :: has_mover
278 call this%VirtualDataContainerType%destroy()
279 call this%deallocate_data()
288 allocate (this%ianglex)
289 allocate (this%nodem1)
290 allocate (this%nodem2)
295 allocate (this%auxvar)
302 deallocate (this%nexg)
303 deallocate (this%naux)
304 deallocate (this%ianglex)
305 deallocate (this%nodem1)
306 deallocate (this%nodem2)
307 deallocate (this%ihc)
308 deallocate (this%cl1)
309 deallocate (this%cl2)
310 deallocate (this%hwva)
311 deallocate (this%auxvar)
319 integer(I4B) :: exg_id
323 class(*),
pointer :: ve
325 virtual_exg => null()
330 if (ve%id == exg_id)
then
344 class(*),
pointer :: obj_ptr
346 obj_ptr => list%GetItem(idx)
352 class(*),
pointer :: obj_ptr
355 virtual_exg => null()
356 select type (obj_ptr)
358 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...