61 TYPE(t_region
),
POINTER :: regions(:)
63 CHARACTER(CHRLEN) :: wins, inplag
69 INTEGER :: icont, ireg, ipatch
73 CHARACTER(CHRLEN) :: winp
75 INTEGER,
PARAMETER :: ascii_zero = 48
76 INTEGER :: bctype, errorflag, ilb, icount, ilev,pid
78 INTEGER :: naiv, narv, ncont, ncontmax, ncv, ncvtile, ndv, ndvtile
81 INTEGER,
POINTER,
DIMENSION(:) :: pcvtilemass
82 INTEGER,
POINTER :: pint
85 TYPE(t_patch) ,
POINTER :: ppatch
86 TYPE(t_plag) ,
POINTER :: pplag
91 pglobal => regions(1)%global
94 'PLAG_InitGenxInterface.F90' )
98 winp = trim(pglobal%winName)//
'_plag'
105 CALL com_new_attribute( trim(wins)//
'.plag_momnrm',
'e', &
106 com_double, 1,
'kg/(m^2 s)' )
107 CALL com_new_attribute( trim(wins)//
'.plag_ener',
'e', &
108 com_double, 1,
'J/kg' )
111 IF ( pglobal%plagUsed )
THEN
112 DO ireg=1,pglobal%nRegions
113 ncontmax =
max(ncontmax,regions(ireg)%plagInput%nCont)
118 CALL com_new_attribute( trim(wins)//
'.plag_mass'//char(icont+ascii_zero),
'e', &
119 com_double, 1,
'kg/m^3' )
122 CALL com_new_attribute( trim(wins)//
'.plag_dv_timefctr',
'e', &
125 CALL com_new_attribute( trim(wins)//
'.plag_dv_diam' ,
'e', &
128 CALL com_new_attribute( trim(wins)//
'.plag_dv_spload' ,
'e', &
132 CALL com_new_window( trim(winp))
134 CALL com_new_attribute( trim(winp)//
'.plag_aiv_pidini',
'n' , &
136 CALL com_new_attribute( trim(winp)//
'.plag_aiv_regini',
'n' , &
138 CALL com_new_attribute( trim(winp)//
'.plag_aiv_regcrt',
'n' , &
140 CALL com_new_attribute( trim(winp)//
'.plag_aiv_icells',
'n' , &
142 CALL com_new_attribute( trim(winp)//
'.plag_aiv_indexi',
'n' , &
144 CALL com_new_attribute( trim(winp)//
'.plag_aiv_indexj',
'n' , &
146 CALL com_new_attribute( trim(winp)//
'.plag_aiv_indexk',
'n' , &
148 CALL com_new_attribute( trim(winp)//
'.plag_aiv_burnstat',
'n' ,&
150 CALL com_new_attribute( trim(winp)//
'.plag_arv_spload',
'n' , &
153 CALL com_new_attribute( trim(winp)//
'.plag_xmom',
'n', &
154 com_double, 1,
'kg/(m^2 s)' )
155 CALL com_new_attribute( trim(winp)//
'.plag_ymom',
'n', &
156 com_double, 1,
'kg/(m^2 s)' )
157 CALL com_new_attribute( trim(winp)//
'.plag_zmom',
'n', &
158 com_double, 1,
'kg/(m^2 s)' )
159 CALL com_new_attribute( trim(winp)//
'.plag_ener',
'n', &
160 com_double, 1,
'J/kg' )
161 CALL com_new_attribute( trim(winp)//
'.plag_enervapor',
'n', &
162 com_double, 1,
'J/kg' )
163 DO icont = 1, ncontmax
164 CALL com_new_attribute( trim(winp)//
'.plag_mass'//char(icont+ascii_zero),
'n', &
165 com_double,1,
'kg/m^3' )
168 CALL com_new_attribute( trim(winp)//
'.plag_diam',
'n', &
171 CALL com_new_attribute( trim(winp)//
'.plag_nextid',
'p',com_integer, 1,
'')
175 DO ireg=1,pglobal%nRegions
176 IF ( regions(ireg)%procid==pglobal%myProcid .AND. &
177 regions(ireg)%active==active .AND. &
178 pglobal%plagUsed )
THEN
180 ilev = regions(ireg)%currLevel
185 pplag => regions(ireg)%levels(ilev)%plag
191 ndimplag = regions(ireg)%plagInput%nPclsMax
192 ncont = regions(ireg)%plagInput%nCont
197 ncvtile = cv_tile_last+ncont
198 ndvtile = dv_tile_last
202 DO ipatch=1,regions(ireg)%nPatches
203 ppatch => regions(ireg)%levels(ilev)%patches(ipatch)
204 bctype = ppatch%bcType
206 IF ( ppatch%bcCoupled == bc_external .AND. &
207 ( bctype>=bc_injection .AND. bctype<=bc_injection+bc_range ) )
THEN
209 pid = ireg*regoff + icount
211 ptileplag => ppatch%tilePlag
212 pcvtilemass => ptileplag%cvTileMass
216 ilb = lbound(ptileplag%cv,2)
217 CALL com_set_array( trim(wins)//
'.plag_momnrm',pid, &
218 ptileplag%cv(cv_tile_momnrm,ilb),ncvtile)
219 CALL com_set_array( trim(wins)//
'.plag_ener', pid, &
220 ptileplag%cv(cv_tile_ener,ilb),ncvtile)
223 CALL com_set_array( trim(wins)//
'.plag_mass'//char(icont+ascii_zero),&
224 pid, ptileplag%cv(pcvtilemass(icont),ilb),ncvtile)
227 ilb = lbound(ptileplag%dv,2)
228 CALL com_set_array( trim(wins)//
'.plag_dv_timefctr', &
229 pid, ptileplag%dv(dv_tile_countdown,ilb),ndvtile)
230 CALL com_set_array( trim(wins)//
'.plag_dv_diam', &
231 pid, ptileplag%dv(dv_tile_diam ,ilb),ndvtile)
232 CALL com_set_array( trim(wins)//
'.plag_dv_spload', &
233 pid, ptileplag%dv(dv_tile_spload ,ilb),ndvtile)
245 plagstatus = com_get_status( trim(inplag),pid )
250 IF ( plagstatus == -1 )
THEN
255 CALL com_get_size( trim(inplag)//
'.nc',pid,pplag%nPcls)
261 CALL com_set_size( trim(winp)//
'.nc',pid,pplag%nPcls)
264 ilb = lbound(pplag%cv,2)
265 CALL com_set_array( trim(winp)//
'.nc',pid, &
266 pplag%cv(cv_plag_xpos,ilb),ncv,ndimplag )
268 pint => pplag%nextIdNumber
269 CALL com_set_size( trim(winp)//
'.plag_nextid',pid,1)
270 CALL com_set_array( trim(winp)//
'.plag_nextid', pid, pint)
274 ilb = lbound(pplag%aiv,2)
275 CALL com_set_array( trim(winp)//
'.plag_aiv_pidini',pid, &
276 pplag%aiv(aiv_plag_pidini,ilb),naiv,ndimplag )
277 CALL com_set_array( trim(winp)//
'.plag_aiv_regini',pid, &
278 pplag%aiv(aiv_plag_regini,ilb),naiv,ndimplag )
279 CALL com_set_array( trim(winp)//
'.plag_aiv_regcrt',pid, &
280 pplag%aiv(aiv_plag_regcrt,ilb),naiv,ndimplag )
281 CALL com_set_array( trim(winp)//
'.plag_aiv_icells',pid, &
282 pplag%aiv(aiv_plag_icells,ilb),naiv,ndimplag )
283 CALL com_set_array( trim(winp)//
'.plag_aiv_indexi',pid, &
284 pplag%aiv(aiv_plag_indexi,ilb),naiv,ndimplag )
285 CALL com_set_array( trim(winp)//
'.plag_aiv_indexj',pid, &
286 pplag%aiv(aiv_plag_indexj,ilb),naiv,ndimplag )
287 CALL com_set_array( trim(winp)//
'.plag_aiv_indexk',pid, &
288 pplag%aiv(aiv_plag_indexk,ilb),naiv,ndimplag )
289 CALL com_set_array( trim(winp)//
'.plag_aiv_burnstat',pid, &
290 pplag%aiv(aiv_plag_burnstat,ilb),naiv,ndimplag )
294 ilb = lbound(pplag%arv,2)
295 CALL com_set_array( trim(winp)//
'.plag_arv_spload',pid, &
296 pplag%arv(arv_plag_spload,ilb),narv,ndimplag )
300 ilb = lbound(pplag%cv,2)
301 CALL com_set_array( trim(winp)//
'.plag_xmom',pid, &
302 pplag%cv(cv_plag_xmom,ilb),ncv,ndimplag )
303 CALL com_set_array( trim(winp)//
'.plag_ymom',pid, &
304 pplag%cv(cv_plag_ymom,ilb),ncv,ndimplag )
305 CALL com_set_array( trim(winp)//
'.plag_zmom',pid, &
306 pplag%cv(cv_plag_zmom,ilb),ncv,ndimplag )
307 CALL com_set_array( trim(winp)//
'.plag_ener',pid, &
308 pplag%cv(cv_plag_ener,ilb),ncv,ndimplag )
309 CALL com_set_array( trim(winp)//
'.plag_enervapor',pid, &
310 pplag%cv(cv_plag_enervapor,ilb),ncv,ndimplag )
312 CALL com_set_array( trim(winp)//
'.plag_mass'//char(icont+ascii_zero), &
313 pid, pplag%cv(cv_plag_last+icont,ilb),ncv,ndimplag )
318 ilb = lbound(pplag%dv,2)
319 CALL com_set_array( trim(winp)//
'.plag_diam',pid, &
320 pplag%dv(dv_plag_diam,ilb),ndv,ndimplag )
326 CALL com_window_init_done( trim(winp))
330 com_get_attribute_handle_const(trim(inplag)//
".all"), &
331 com_get_attribute_handle(trim(winp)//
".all") )
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine registerfunction(global, funName, fileName)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdnbeg
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idnend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jdnend
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE idnbeg
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
void obtain_attribute(const COM::Attribute *attribute_in, COM::Attribute *user_attribute, int *pane_id=NULL)
Fill the destination (second) attribute from files using the data corresponding to the source (first)...
subroutine deregisterfunction(global)
subroutine plag_initgenxinterface(regions, wins, inPlag, obtain_attribute)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kdnbeg