14 integer(I4B) :: controller_id
15 integer(I4B) :: sync_stage
16 character(len=LENVARNAME) :: src_name
17 character(len=LENMEMPATH) :: src_path
19 character(len=LENVARNAME) :: tgt_name
20 character(len=LENMEMPATH) :: tgt_path
22 logical(LGP) :: copy_all
23 integer(I4B),
dimension(:),
pointer :: src_idx
24 integer(I4B),
dimension(:),
pointer :: tgt_idx
25 integer(I4B),
dimension(:),
pointer :: sign
26 integer(I4B),
dimension(:),
pointer :: lut
49 if (.not.
associated(this%src))
then
55 if (this%skip_sync())
return
57 if (
associated(this%tgt%aint1d))
call this%sync_int1d()
58 if (
associated(this%tgt%adbl1d))
call this%sync_dbl1d()
59 if (
associated(this%tgt%adbl2d))
call this%sync_dbl2d()
61 if (
associated(this%sign))
then
62 if (
associated(this%tgt%aint1d))
call this%apply_sgn_int1d()
63 if (
associated(this%tgt%adbl1d))
call this%apply_sgn_dbl1d()
64 if (
associated(this%tgt%adbl2d))
call this%apply_sgn_dbl2d()
73 skip = (this%src%isize == 0)
83 if (this%copy_all)
then
84 do i = 1, this%tgt%isize
85 this%tgt%aint1d(i) = this%src%aint1d(i)
87 else if (
associated(this%lut))
then
88 do i = 1,
size(this%tgt_idx)
89 this%tgt%aint1d(this%tgt_idx(i)) = &
90 this%src%aint1d(this%lut(this%src_idx(i)))
93 do i = 1,
size(this%tgt_idx)
94 this%tgt%aint1d(this%tgt_idx(i)) = this%src%aint1d(this%src_idx(i))
105 if (this%copy_all)
then
106 do i = 1, this%tgt%isize
107 this%tgt%aint1d(i) = this%tgt%aint1d(i) * this%sign(i)
110 do i = 1,
size(this%tgt_idx)
111 this%tgt%aint1d(this%tgt_idx(i)) = this%tgt%aint1d(this%tgt_idx(i)) * &
125 if (this%copy_all)
then
126 do i = 1, this%tgt%isize
127 this%tgt%adbl1d(i) = this%src%adbl1d(i)
129 else if (
associated(this%lut))
then
130 do i = 1,
size(this%tgt_idx)
131 this%tgt%adbl1d(this%tgt_idx(i)) = &
132 this%src%adbl1d(this%lut(this%src_idx(i)))
135 do i = 1,
size(this%tgt_idx)
136 this%tgt%adbl1d(this%tgt_idx(i)) = this%src%adbl1d(this%src_idx(i))
147 if (this%copy_all)
then
148 do i = 1, this%tgt%isize
149 this%tgt%adbl1d(i) = this%tgt%adbl1d(i) * this%sign(i)
152 do i = 1,
size(this%tgt_idx)
153 this%tgt%adbl1d(this%tgt_idx(i)) = this%tgt%adbl1d(this%tgt_idx(i)) * &
167 if (this%copy_all)
then
168 do i = 1, this%tgt%isize
169 do k = 1,
size(this%src%adbl2d, dim=1)
170 this%tgt%adbl2d(k, i) = this%src%adbl2d(k, i)
173 else if (
associated(this%lut))
then
174 do i = 1,
size(this%tgt_idx)
175 do k = 1,
size(this%src%adbl2d, dim=1)
176 this%tgt%adbl2d(k, this%tgt_idx(i)) = &
177 this%src%adbl2d(k, this%lut(this%src_idx(i)))
181 do i = 1,
size(this%tgt_idx)
182 do k = 1,
size(this%src%adbl2d, dim=1)
183 this%tgt%adbl2d(k, this%tgt_idx(i)) = &
184 this%src%adbl2d(k, this%src_idx(i))
196 if (this%copy_all)
then
197 do i = 1, this%tgt%isize
198 do k = 1,
size(this%src%adbl2d, dim=1)
199 this%tgt%adbl2d(k, i) = this%tgt%adbl2d(k, i) * this%sign(i)
203 do i = 1,
size(this%tgt_idx)
204 do k = 1,
size(this%src%adbl2d, dim=1)
205 this%tgt%adbl2d(k, this%tgt_idx(i)) = &
206 this%tgt%adbl2d(k, this%tgt_idx(i)) * this%sign(i)
215 class(*),
pointer,
intent(inout) :: obj
This module contains simulation constants.
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.
logical(lgp) function skip_sync(this)
subroutine apply_sgn_int1d(this)
subroutine sync_dbl1d(this)
Copy 1d double array with map.
subroutine apply_sgn_dbl2d(this)
subroutine apply_sgn_dbl1d(this)
subroutine sync_int1d(this)
Copy 1d integer array with map.
subroutine sync_dbl2d(this)
Copy 2d double array with map.
class(mappedmemorytype) function, pointer, public castasmappeddata(obj)
subroutine, public get_from_memorystore(name, mem_path, mt, found, check)
@ brief Get a memory type entry from the memory list