36 logical(LGP) :: is_remote = .false.
37 character(len=LENVARNAME) :: var_name
38 character(len=LENCOMPONENTNAME) :: subcmp_name
39 character(len=LENMEMPATH) :: mem_path
40 integer(I4B),
dimension(:),
allocatable :: sync_stages
41 integer(I4B) :: map_type
42 logical(LGP) :: is_reduced
44 integer(I4B),
dimension(:), &
45 pointer,
contiguous :: remote_elem_shift => null()
47 integer(I4B),
dimension(:), &
48 pointer,
contiguous :: remote_to_virtual => null()
60 integer(I4B),
private,
pointer :: intsclr
68 integer(I4B),
dimension(:),
pointer,
contiguous :: int1d
77 real(dp),
private,
pointer :: dblsclr
85 real(dp),
dimension(:),
pointer,
contiguous :: dbl1d
94 real(dp),
dimension(:, :),
pointer,
contiguous :: dbl2d
107 character(len=*) :: var_name
108 character(len=*) :: mem_path
109 integer(I4B),
dimension(:) :: shape
132 integer(I4B) :: stage, stg_idx
133 logical(LGP) :: has_stage
136 if (
allocated(this%sync_stages))
then
137 stg_idx =
ifind(this%sync_stages, stage)
138 has_stage = (stg_idx > 0)
146 logical(LGP) :: found
149 this%virtual_mt, found)
157 integer(I4B),
dimension(:),
pointer,
contiguous :: el_map
160 if (this%map_type > 0)
then
161 el_map => this%remote_elem_shift
168 character(len=*) :: var_name
169 character(len=*) :: mem_path
170 integer(I4B),
dimension(:) :: shape
185 character(len=*) :: var_name
186 character(len=*) :: mem_path
187 integer(I4B),
dimension(:) :: shape
189 call mem_allocate(this%int1d, shape(1), var_name, mem_path)
202 character(len=*) :: var_name
203 character(len=*) :: mem_path
204 integer(I4B),
dimension(:) :: shape
219 character(len=*) :: var_name
220 character(len=*) :: mem_path
221 integer(I4B),
dimension(:) :: shape
223 call mem_allocate(this%dbl1d, shape(1), var_name, mem_path)
236 character(len=*) :: var_name
237 character(len=*) :: mem_path
238 integer(I4B),
dimension(:) :: shape
240 call mem_allocate(this%dbl2d, shape(1), shape(2), var_name, mem_path)
255 val = this%virtual_mt%intsclr
261 integer(I4B) :: i_rmt
264 integer(I4B) :: i_vrt
266 if (this%is_reduced)
then
267 i_vrt = this%remote_to_virtual(i_rmt)
271 val = this%virtual_mt%aint1d(i_vrt)
277 integer(I4B),
dimension(:),
pointer,
contiguous :: array
279 array => this%virtual_mt%aint1d
287 val = this%virtual_mt%dblsclr
293 integer(I4B) :: i_rmt
296 integer(I4B) :: i_vrt
298 if (this%is_reduced)
then
299 i_vrt = this%remote_to_virtual(i_rmt)
303 val = this%virtual_mt%adbl1d(i_vrt)
309 real(dp),
dimension(:),
pointer,
contiguous :: array
311 array => this%virtual_mt%adbl1d
317 integer(I4B) :: j_cmp
318 integer(I4B) :: i_rmt
321 integer(I4B) :: i_vrt
323 if (this%is_reduced)
then
324 i_vrt = this%remote_to_virtual(i_rmt)
328 val = this%virtual_mt%adbl2d(j_cmp, i_vrt)
334 real(dp),
dimension(:, :),
pointer,
contiguous :: array
336 array => this%virtual_mt%adbl2d
345 class(*),
pointer :: obj_ptr
348 obj_ptr => list%GetItem(idx)
349 select type (obj_ptr)
This module contains simulation constants.
integer(i4b), parameter lencomponentname
maximum length of a component name
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenmempath
maximum length of the memory path
This module defines variable data types.
subroutine, public get_from_memorystore(name, mem_path, mt, found, check)
@ brief Get a memory type entry from the memory list
integer(i4b) function, dimension(:), pointer, contiguous get_element_map(this)
Return array with offsets for elements.
subroutine vm_deallocate_int(this)
subroutine vm_allocate_dbl(this, var_name, mem_path, shape)
real(dp) function get_dbl2d(this, j_cmp, i_rmt)
real(dp) function, dimension(:, :), pointer, contiguous get_array_dbl2d(this)
logical(lgp) function vm_check_stage(this, stage)
Check if this data item requires syncing.
integer(i4b) function, dimension(:), pointer, contiguous get_array_int1d(this)
subroutine vm_allocate_dbl2d(this, var_name, mem_path, shape)
class(virtualdatatype) function, pointer, public get_virtual_data_from_list(list, idx)
subroutine vm_allocate_int1d(this, var_name, mem_path, shape)
real(dp) function, dimension(:), pointer, contiguous get_array_dbl1d(this)
subroutine vm_allocate_dbl1d(this, var_name, mem_path, shape)
integer(i4b) function get_int(this)
integer(i4b) function get_int1d(this, i_rmt)
integer(i4b), parameter, public map_conn_type
integer(i4b), parameter, public map_all_type
subroutine vm_deallocate_int1d(this)
subroutine vm_allocate_int(this, var_name, mem_path, shape)
subroutine vm_deallocate_dbl1d(this)
integer(i4b), parameter, public nr_vdc_element_maps
subroutine vm_deallocate_dbl2d(this)
real(dp) function get_dbl(this)
real(dp) function get_dbl1d(this, i_rmt)
subroutine vm_deallocate_dbl(this)
class(virtualdatatype) function, pointer vm_to_base(this)
integer(i4b), parameter, public map_node_type
A generic heterogeneous doubly-linked list.
This is a generic data structure to virtualize pieces of memory in 2 distinct ways: