77 character(len=*) :: name
81 logical(LGP) :: is_local
83 is_local =
associated(model)
84 call this%VirtualDataContainerType%vdc_create(name, id, is_local)
86 this%local_model => model
88 call this%allocate_data()
89 call this%init_virtual_data()
97 call this%set(this%con_ianglex%base(),
'IANGLEX',
'CON',
map_all_type)
98 call this%set(this%con_ia%base(),
'IA',
'CON',
map_all_type)
99 call this%set(this%con_ja%base(),
'JA',
'CON',
map_all_type)
100 call this%set(this%con_jas%base(),
'JAS',
'CON',
map_all_type)
101 call this%set(this%con_ihc%base(),
'IHC',
'CON',
map_all_type)
102 call this%set(this%con_hwva%base(),
'HWVA',
'CON',
map_all_type)
103 call this%set(this%con_cl1%base(),
'CL1',
'CON',
map_all_type)
104 call this%set(this%con_cl2%base(),
'CL2',
'CON',
map_all_type)
105 call this%set(this%con_anglex%base(),
'ANGLEX',
'CON',
map_all_type)
107 call this%set(this%dis_ndim%base(),
'NDIM',
'DIS',
map_all_type)
108 call this%set(this%dis_nodes%base(),
'NODES',
'DIS',
map_all_type)
109 call this%set(this%dis_nodesuser%base(),
'NODESUSER',
'DIS',
map_all_type)
110 call this%set(this%dis_nodeuser%base(),
'NODEUSER',
'DIS',
map_all_type)
111 call this%set(this%dis_nja%base(),
'NJA',
'DIS',
map_all_type)
112 call this%set(this%dis_njas%base(),
'NJAS',
'DIS',
map_all_type)
113 call this%set(this%dis_xorigin%base(),
'XORIGIN',
'DIS',
map_all_type)
114 call this%set(this%dis_yorigin%base(),
'YORIGIN',
'DIS',
map_all_type)
115 call this%set(this%dis_angrot%base(),
'ANGROT',
'DIS',
map_all_type)
116 call this%set(this%dis_xc%base(),
'XC',
'DIS',
map_all_type)
117 call this%set(this%dis_yc%base(),
'YC',
'DIS',
map_all_type)
118 call this%set(this%dis_top%base(),
'TOP',
'DIS',
map_all_type)
119 call this%set(this%dis_bot%base(),
'BOT',
'DIS',
map_all_type)
120 call this%set(this%dis_area%base(),
'AREA',
'DIS',
map_all_type)
122 call this%set(this%moffset%base(),
'MOFFSET',
'',
map_all_type)
125 call this%set(this%ibound%base(),
'IBOUND',
'',
map_node_type)
127 call this%set(this%idsoln%base(),
'IDSOLN',
'',
map_all_type)
133 integer(I4B) :: stage
135 integer(I4B) :: nodes, nodesuser, nja, njas
136 logical(LGP) :: is_reduced
150 nodes = this%dis_nodes%get()
151 nodesuser = this%dis_nodesuser%get()
152 is_reduced = (nodes /= nodesuser)
155 call this%map(this%dis_nodeuser%base(), nodes, (/
stg_bfr_exg_ac/))
158 call this%map(this%dis_nodeuser%base(), 0, (/
stg_never/))
163 nodes = this%dis_nodes%get()
164 nja = this%dis_nja%get()
165 njas = this%dis_njas%get()
183 if (this%con_ianglex%get() > 0)
then
186 call this%map(this%con_anglex%base(), 0, (/
stg_never/))
197 integer(I4B),
intent(in) :: node_reduced
198 integer(I4B) :: node_user
200 if (this%dis_nodes%get() < this%dis_nodesuser%get())
then
201 node_user = this%dis_nodeuser%get(node_reduced)
203 node_user = node_reduced
210 integer(I4B),
intent(in) :: node_reduced
211 character(len=*),
intent(inout) :: node_str
213 character(len=11) :: nr_str
215 if (this%is_local)
then
216 call this%local_model%dis%noder_to_string(node_reduced, node_str)
219 write (nr_str,
'(i0)') node_reduced
220 node_str =
'('//trim(adjustl(nr_str))//
'r)'
228 call this%VirtualDataContainerType%destroy()
229 call this%deallocate_data()
236 allocate (this%con_ianglex)
237 allocate (this%con_ia)
238 allocate (this%con_ja)
239 allocate (this%con_jas)
240 allocate (this%con_ihc)
241 allocate (this%con_hwva)
242 allocate (this%con_cl1)
243 allocate (this%con_cl2)
244 allocate (this%con_anglex)
245 allocate (this%dis_ndim)
246 allocate (this%dis_nodes)
247 allocate (this%dis_nodesuser)
248 allocate (this%dis_nodeuser)
249 allocate (this%dis_nja)
250 allocate (this%dis_njas)
251 allocate (this%dis_xorigin)
252 allocate (this%dis_yorigin)
253 allocate (this%dis_angrot)
254 allocate (this%dis_xc)
255 allocate (this%dis_yc)
256 allocate (this%dis_top)
257 allocate (this%dis_bot)
258 allocate (this%dis_area)
259 allocate (this%moffset)
261 allocate (this%x_old)
262 allocate (this%ibound)
263 allocate (this%idsoln)
271 deallocate (this%con_ianglex)
272 deallocate (this%con_ia)
273 deallocate (this%con_ja)
274 deallocate (this%con_jas)
275 deallocate (this%con_ihc)
276 deallocate (this%con_hwva)
277 deallocate (this%con_cl1)
278 deallocate (this%con_cl2)
279 deallocate (this%con_anglex)
281 deallocate (this%dis_ndim)
282 deallocate (this%dis_nodes)
283 deallocate (this%dis_nodesuser)
284 deallocate (this%dis_nodeuser)
285 deallocate (this%dis_nja)
286 deallocate (this%dis_njas)
287 deallocate (this%dis_xorigin)
288 deallocate (this%dis_yorigin)
289 deallocate (this%dis_angrot)
290 deallocate (this%dis_xc)
291 deallocate (this%dis_yc)
292 deallocate (this%dis_top)
293 deallocate (this%dis_bot)
294 deallocate (this%dis_area)
296 deallocate (this%moffset)
298 deallocate (this%x_old)
299 deallocate (this%ibound)
301 deallocate (this%idsoln)
310 class(*),
pointer :: obj_ptr
312 obj_ptr => model_list%GetItem(idx)
317 class(*),
pointer :: obj_ptr
321 select type (obj_ptr)
331 logical(LGP) :: is_equal
333 is_equal = (this%id == v_model%id)
340 logical(LGP) :: is_equal
342 is_equal = (this%id == num_model%id)
350 integer(I4B) :: model_id
354 class(*),
pointer :: vm
356 virtual_model => null()
361 if (vm%id == model_id)
then
374 character(len=*) :: model_name
378 class(*),
pointer :: vm
380 virtual_model => null()
385 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.