97 subroutine vx_create(this, name, exg_id, m1_id, m2_id)
99 character(len=*) :: name
100 integer(I4B) :: exg_id
101 integer(I4B) :: m1_id
102 integer(I4B) :: m2_id
104 logical(LGP) :: is_local
112 is_local = this%v_model1%is_local .or. this%v_model2%is_local
113 call this%VirtualDataContainerType%vdc_create(name, exg_id, is_local)
115 call this%allocate_data()
116 call this%init_virtual_data()
123 logical(LGP) :: is_nodem1_local
124 logical(LGP) :: is_nodem2_local
129 is_nodem1_local = this%v_model1%is_local
130 is_nodem2_local = this%v_model2%is_local
131 call this%set(this%nexg%base(),
'NEXG',
'',
map_all_type)
132 call this%set(this%naux%base(),
'NAUX',
'',
map_all_type)
133 call this%set(this%ianglex%base(),
'IANGLEX',
'',
map_all_type)
134 call this%set(this%nodem1%base(),
'NODEM1',
'', &
136 call this%set(this%nodem2%base(),
'NODEM2',
'', &
141 call this%set(this%hwva%base(),
'HWVA',
'',
map_all_type)
142 call this%set(this%auxvar%base(),
'AUXVAR',
'',
map_all_type)
148 integer(I4B) :: stage
150 integer(I4B) :: nexg, naux
160 nexg = this%nexg%get()
161 naux = this%naux%get()
178 integer(I4B) :: stage
182 integer(I4B) :: nodem1_idx, nodem2_idx
183 class(*),
pointer :: vdi
186 nodem1_idx = this%virtual_data_list%GetIndex(vdi)
188 nodem2_idx = this%virtual_data_list%GetIndex(vdi)
190 if (this%v_model1%is_local .and. &
191 this%v_model2%orig_rank == rank)
then
194 if (this%nodem2%check_stage(stage))
then
195 call virtual_items%push_back(nodem2_idx)
197 else if (this%v_model2%is_local .and. &
198 this%v_model1%orig_rank == rank)
then
200 if (this%nodem1%check_stage(stage))
then
201 call virtual_items%push_back(nodem1_idx)
205 call this%VirtualDataContainerType%get_recv_items(stage, rank, &
213 integer(I4B) :: stage
217 integer(I4B) :: nodem1_idx, nodem2_idx
218 class(*),
pointer :: vdi
221 nodem1_idx = this%virtual_data_list%GetIndex(vdi)
223 nodem2_idx = this%virtual_data_list%GetIndex(vdi)
224 if (this%v_model1%is_local .and. &
225 this%v_model2%orig_rank == rank)
then
228 if (this%nodem1%check_stage(stage))
then
229 call virtual_items%push_back(nodem1_idx)
231 else if (this%v_model2%is_local .and. &
232 this%v_model1%orig_rank == rank)
then
234 if (this%nodem2%check_stage(stage))
then
235 call virtual_items%push_back(nodem2_idx)
239 call this%VirtualDataContainerType%get_send_items(stage, rank, &
249 logical(LGP) :: has_mover
258 call this%VirtualDataContainerType%destroy()
259 call this%deallocate_data()
268 allocate (this%ianglex)
269 allocate (this%nodem1)
270 allocate (this%nodem2)
275 allocate (this%auxvar)
282 deallocate (this%nexg)
283 deallocate (this%naux)
284 deallocate (this%ianglex)
285 deallocate (this%nodem1)
286 deallocate (this%nodem2)
287 deallocate (this%ihc)
288 deallocate (this%cl1)
289 deallocate (this%cl2)
290 deallocate (this%hwva)
291 deallocate (this%auxvar)
299 integer(I4B) :: exg_id
303 class(*),
pointer :: ve
305 virtual_exg => null()
310 if (ve%id == exg_id)
then
324 class(*),
pointer :: obj_ptr
326 obj_ptr => list%GetItem(idx)
332 class(*),
pointer :: obj_ptr
335 virtual_exg => null()
336 select type (obj_ptr)
338 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)
class(virtualexchangetype) function, pointer, private cast_as_virtual_exchange(obj_ptr)
class(virtualexchangetype) function, pointer, public get_virtual_exchange_from_list(list, idx)
subroutine vx_get_send_items(this, stage, rank, virtual_items)
subroutine vx_get_recv_items(this, stage, rank, virtual_items)
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_destroy(this)
A generic heterogeneous doubly-linked list.
Container (list) of virtual data items.
The Virtual Exchange is based on two Virtual Models and is therefore not always strictly local or rem...