78 character(len=*) :: name
82 logical(LGP) :: is_local
84 is_local =
associated(model)
85 call this%VirtualDataContainerType%vdc_create(name, id, is_local)
87 this%local_model => model
89 call this%allocate_data()
90 call this%init_virtual_data()
98 call this%set(this%con_ianglex%base(),
'IANGLEX',
'CON',
map_all_type)
99 call this%set(this%con_ia%base(),
'IA',
'CON',
map_all_type)
100 call this%set(this%con_ja%base(),
'JA',
'CON',
map_all_type)
101 call this%set(this%con_jas%base(),
'JAS',
'CON',
map_all_type)
102 call this%set(this%con_ihc%base(),
'IHC',
'CON',
map_all_type)
103 call this%set(this%con_hwva%base(),
'HWVA',
'CON',
map_all_type)
104 call this%set(this%con_cl1%base(),
'CL1',
'CON',
map_all_type)
105 call this%set(this%con_cl2%base(),
'CL2',
'CON',
map_all_type)
106 call this%set(this%con_anglex%base(),
'ANGLEX',
'CON',
map_all_type)
108 call this%set(this%dis_ndim%base(),
'NDIM',
'DIS',
map_all_type)
109 call this%set(this%dis_nodes%base(),
'NODES',
'DIS',
map_all_type)
110 call this%set(this%dis_nodesuser%base(),
'NODESUSER',
'DIS',
map_all_type)
111 call this%set(this%dis_nodeuser%base(),
'NODEUSER',
'DIS',
map_all_type)
112 call this%set(this%dis_nja%base(),
'NJA',
'DIS',
map_all_type)
113 call this%set(this%dis_njas%base(),
'NJAS',
'DIS',
map_all_type)
114 call this%set(this%dis_icondir%base(),
'ICONDIR',
'DIS',
map_all_type)
115 call this%set(this%dis_xorigin%base(),
'XORIGIN',
'DIS',
map_all_type)
116 call this%set(this%dis_yorigin%base(),
'YORIGIN',
'DIS',
map_all_type)
117 call this%set(this%dis_angrot%base(),
'ANGROT',
'DIS',
map_all_type)
118 call this%set(this%dis_xc%base(),
'XC',
'DIS',
map_all_type)
119 call this%set(this%dis_yc%base(),
'YC',
'DIS',
map_all_type)
120 call this%set(this%dis_top%base(),
'TOP',
'DIS',
map_all_type)
121 call this%set(this%dis_bot%base(),
'BOT',
'DIS',
map_all_type)
122 call this%set(this%dis_area%base(),
'AREA',
'DIS',
map_all_type)
124 call this%set(this%moffset%base(),
'MOFFSET',
'',
map_all_type)
127 call this%set(this%ibound%base(),
'IBOUND',
'',
map_node_type)
129 call this%set(this%idsoln%base(),
'IDSOLN',
'',
map_all_type)
135 integer(I4B) :: stage
137 integer(I4B) :: nodes, nodesuser, nja, njas, icondir
138 logical(LGP) :: is_reduced
153 nodes = this%dis_nodes%get()
154 nodesuser = this%dis_nodesuser%get()
155 is_reduced = (nodes /= nodesuser)
158 call this%map(this%dis_nodeuser%base(), nodes, (/
stg_bfr_exg_ac/))
161 call this%map(this%dis_nodeuser%base(), 0, (/
stg_never/))
166 nodes = this%dis_nodes%get()
167 nja = this%dis_nja%get()
168 njas = this%dis_njas%get()
169 icondir = this%dis_icondir%get()
174 if (icondir > 0)
then
178 call this%map(this%dis_xc%base(), 0, (/
stg_never/))
179 call this%map(this%dis_yc%base(), 0, (/
stg_never/))
192 if (this%con_ianglex%get() > 0)
then
195 call this%map(this%con_anglex%base(), 0, (/
stg_never/))
206 integer(I4B),
intent(in) :: node_reduced
207 integer(I4B) :: node_user
209 if (this%dis_nodes%get() < this%dis_nodesuser%get())
then
210 node_user = this%dis_nodeuser%get(node_reduced)
212 node_user = node_reduced
219 integer(I4B),
intent(in) :: node_reduced
220 character(len=*),
intent(inout) :: node_str
222 character(len=11) :: nr_str
224 if (this%is_local)
then
225 call this%local_model%dis%noder_to_string(node_reduced, node_str)
228 write (nr_str,
'(i0)') node_reduced
229 node_str =
'('//trim(adjustl(nr_str))//
'r)'
237 call this%VirtualDataContainerType%destroy()
238 call this%deallocate_data()
245 allocate (this%con_ianglex)
246 allocate (this%con_ia)
247 allocate (this%con_ja)
248 allocate (this%con_jas)
249 allocate (this%con_ihc)
250 allocate (this%con_hwva)
251 allocate (this%con_cl1)
252 allocate (this%con_cl2)
253 allocate (this%con_anglex)
254 allocate (this%dis_ndim)
255 allocate (this%dis_nodes)
256 allocate (this%dis_nodesuser)
257 allocate (this%dis_nodeuser)
258 allocate (this%dis_nja)
259 allocate (this%dis_njas)
260 allocate (this%dis_xorigin)
261 allocate (this%dis_yorigin)
262 allocate (this%dis_angrot)
263 allocate (this%dis_icondir)
264 allocate (this%dis_xc)
265 allocate (this%dis_yc)
266 allocate (this%dis_top)
267 allocate (this%dis_bot)
268 allocate (this%dis_area)
269 allocate (this%moffset)
271 allocate (this%x_old)
272 allocate (this%ibound)
273 allocate (this%idsoln)
281 deallocate (this%con_ianglex)
282 deallocate (this%con_ia)
283 deallocate (this%con_ja)
284 deallocate (this%con_jas)
285 deallocate (this%con_ihc)
286 deallocate (this%con_hwva)
287 deallocate (this%con_cl1)
288 deallocate (this%con_cl2)
289 deallocate (this%con_anglex)
291 deallocate (this%dis_ndim)
292 deallocate (this%dis_nodes)
293 deallocate (this%dis_nodesuser)
294 deallocate (this%dis_nodeuser)
295 deallocate (this%dis_nja)
296 deallocate (this%dis_njas)
297 deallocate (this%dis_xorigin)
298 deallocate (this%dis_yorigin)
299 deallocate (this%dis_angrot)
300 deallocate (this%dis_icondir)
301 deallocate (this%dis_xc)
302 deallocate (this%dis_yc)
303 deallocate (this%dis_top)
304 deallocate (this%dis_bot)
305 deallocate (this%dis_area)
307 deallocate (this%moffset)
309 deallocate (this%x_old)
310 deallocate (this%ibound)
312 deallocate (this%idsoln)
321 class(*),
pointer :: obj_ptr
323 obj_ptr => model_list%GetItem(idx)
328 class(*),
pointer :: obj_ptr
332 select type (obj_ptr)
342 logical(LGP) :: is_equal
344 is_equal = (this%id == v_model%id)
351 logical(LGP) :: is_equal
353 is_equal = (this%id == num_model%id)
361 integer(I4B) :: model_id
365 class(*),
pointer :: vm
367 virtual_model => null()
372 if (vm%id == model_id)
then
385 character(len=*) :: model_name
389 class(*),
pointer :: vm
391 virtual_model => null()
396 if (vm%name == model_name)
then
This module contains simulation constants.
integer(i4b), parameter lenmempath
maximum length of the memory path
This module defines variable data types.
integer(i4b), parameter, public stg_aft_mdl_df
after model define
integer(i4b), parameter, public stg_never
never
integer(i4b), parameter, public stg_bfr_exg_ac
before exchange add connections (per solution)
integer(i4b), parameter, public stg_bfr_con_df
before connection define
integer(i4b), parameter, public map_all_type
integer(i4b), parameter, public map_node_type
type(listtype), public virtual_model_list
class(virtualmodeltype) function, pointer, public cast_as_virtual_model(obj_ptr)
logical(lgp) function eq_virtual_model(this, v_model)
subroutine vm_prepare_stage(this, stage)
subroutine vm_create(this, name, id, model)
integer(i4b) function dis_get_nodeuser(this, node_reduced)
Get user node number from reduced number.
class(virtualmodeltype) function, pointer get_virtual_model_by_id(model_id)
Returns a virtual model with the specified id.
subroutine deallocate_data(this)
subroutine init_virtual_data(this)
logical(lgp) function eq_numerical_model(this, num_model)
class(virtualmodeltype) function, pointer get_virtual_model_by_name(model_name)
Returns a virtual model with the specified name.
subroutine vm_destroy(this)
subroutine dis_noder_to_string(this, node_reduced, node_str)
subroutine allocate_data(this)
class(virtualmodeltype) function, pointer, public get_virtual_model_from_list(model_list, idx)
A generic heterogeneous doubly-linked list.
Container (list) of virtual data items.