61 TYPE(t_region
),
POINTER :: regions(:)
63 INTEGER,
INTENT(IN) :: ireg
66 INTEGER ::
icorner, iedge, ilev, ijk
69 CHARACTER(CHRLEN) :: rcsidentstring
71 INTEGER :: errorflag, naiv, narv, ncont, ncv, ndv, ntv
72 INTEGER :: nbuffi, nbuffr, nbuffsizemax, ngridlevels
73 INTEGER :: nbuffsizecorn, nbuffsizeedge
75 TYPE(t_region
),
POINTER :: pregion
76 TYPE(t_level
),
POINTER :: plevel
77 TYPE(t_buffer_plag),
POINTER :: pcorncellsxbuff, pedgecellsxbuff
78 TYPE(t_plag),
POINTER :: pplag
83 rcsidentstring =
'$RCSfile: PLAG_CECellsAllocateData.F90,v $ $Revision: 1.3 $'
85 global => regions(ireg)%global
88 'PLAG_CECellsAllocateData.F90' )
90 IF ( global%myProcid == masterproc .AND. &
91 global%verbLevel > verbose_none )
THEN
92 WRITE(stdout,
'(A,3X,A)') solver_name, &
93 'Allocating Corner-Edge Cells Data Buffers for PLAG...'
98 pregion => regions(ireg)
102 ncont = pregion%plagInput%nCont
103 nbuffsizemax = pregion%plagInput%nPclsBuffCECellsMax
104 ngridlevels = pregion%nGridLevels
105 nbuffsizecorn = nbuffsizemax
106 nbuffsizeedge = nbuffsizemax
110 DO ilev=1,ngridlevels
114 plevel => pregion%levels(ilev)
115 pplag => regions(ireg)%levels(ilev)%plag
127 nbuffr = 2*narv +4*ncv +ndv +ntv
137 IF( .NOT. plevel%cornerCells(
icorner)%interact ) goto 1999
141 DO ijk=1,ubound(plevel%cornerCells(
icorner)%cells,1)
142 pcorncellsxbuff => plevel%cornerCells(
icorner)%cells(ijk)%bufferExchPlag
143 pcorncellsxbuff%nBuffSize = 0
144 pcorncellsxbuff%nBuffSizeDes = 0
156 IF( .NOT. plevel%cornerCells(
icorner)%interact ) goto 2999
160 IF( plevel%cornerCells(
icorner)%degenrt /= degenerat_none ) goto 2999
164 DO ijk=1,ubound(plevel%cornerCells(
icorner)%cells,1)
165 pcorncellsxbuff => plevel%cornerCells(
icorner)%cells(ijk)%bufferExchPlag
167 pcorncellsxbuff%nBuffSizeTot = nbuffsizecorn
171 ALLOCATE( pcorncellsxbuff%aiv(naiv,nbuffsizecorn),stat=errorflag )
172 global%error = errorflag
173 IF (global%error /= err_none)
THEN
174 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%aiv' )
177 ALLOCATE( pcorncellsxbuff%arv(narv,nbuffsizecorn),stat=errorflag )
178 global%error = errorflag
179 IF (global%error /= err_none)
THEN
180 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%arv' )
183 ALLOCATE( pcorncellsxbuff%cv(ncv,nbuffsizecorn),stat=errorflag )
184 global%error = errorflag
185 IF (global%error /= err_none)
THEN
186 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%cv' )
189 ALLOCATE( pcorncellsxbuff%dv(ndv,nbuffsizecorn),stat=errorflag )
190 global%error = errorflag
191 IF (global%error /= err_none)
THEN
192 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%dv' )
195 ALLOCATE( pcorncellsxbuff%tv(ntv,nbuffsizecorn),stat=errorflag )
196 global%error = errorflag
197 IF (global%error /= err_none)
THEN
198 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%tv' )
201 ALLOCATE( pcorncellsxbuff%aivOld(naiv,nbuffsizecorn),stat=errorflag )
202 global%error = errorflag
203 IF (global%error /= err_none)
THEN
204 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%aivOld' )
207 ALLOCATE( pcorncellsxbuff%arvOld(narv,nbuffsizecorn),stat=errorflag )
208 global%error = errorflag
209 IF (global%error /= err_none)
THEN
210 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%arvOld' )
213 ALLOCATE( pcorncellsxbuff%cvOld(ncv,nbuffsizecorn),stat=errorflag )
214 global%error = errorflag
215 IF (global%error /= err_none)
THEN
216 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%cvOld' )
219 ALLOCATE( pcorncellsxbuff%rhs(ncv,nbuffsizecorn),stat=errorflag )
220 global%error = errorflag
221 IF (global%error /= err_none)
THEN
222 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%rhs' )
225 ALLOCATE( pcorncellsxbuff%rhsSum(ncv,nbuffsizecorn),stat=errorflag )
226 global%error = errorflag
227 IF (global%error /= err_none)
THEN
228 CALL
errorstop( global, err_allocate,__line__,
'pCornCellsXBuff%rhsSum' )
233 pcorncellsxbuff%aiv = 0
234 pcorncellsxbuff%arv = 0.0_rfreal
235 pcorncellsxbuff%cv = 0.0_rfreal
236 pcorncellsxbuff%dv = 0.0_rfreal
237 pcorncellsxbuff%tv = 0.0_rfreal
239 pcorncellsxbuff%aivOld = 0
240 pcorncellsxbuff%arvOld = 0.0_rfreal
241 pcorncellsxbuff%cvOld = 0.0_rfreal
243 pcorncellsxbuff%rhs = 0.0_rfreal
244 pcorncellsxbuff%rhsSum = 0.0_rfreal
259 IF( .NOT. plevel%edgeCells(iedge)%interact ) goto 3999
263 DO ijk=1,ubound(plevel%edgeCells(iedge)%cells,1)
264 pedgecellsxbuff => plevel%edgeCells(iedge)%cells(ijk)%bufferExchPlag
265 pedgecellsxbuff%nBuffSize = 0
266 pedgecellsxbuff%nBuffSizeDes = 0
278 IF( .NOT. plevel%edgeCells(iedge)%interact ) goto 4999
282 IF( plevel%edgeCells(iedge)%degenrt /= degenerat_none ) goto 4999
286 DO ijk=1,ubound(plevel%edgeCells(iedge)%cells,1)
287 pedgecellsxbuff => plevel%edgeCells(iedge)%cells(ijk)%bufferExchPlag
292 pedgecellsxbuff%nBuffSizeTot = nbuffsizeedge
296 ALLOCATE( pedgecellsxbuff%aiv(naiv,nbuffsizeedge),stat=errorflag )
297 global%error = errorflag
298 IF (global%error /= err_none)
THEN
299 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%aiv' )
302 ALLOCATE( pedgecellsxbuff%arv(narv,nbuffsizeedge),stat=errorflag )
303 global%error = errorflag
304 IF (global%error /= err_none)
THEN
305 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%arv' )
308 ALLOCATE( pedgecellsxbuff%cv(ncv,nbuffsizeedge),stat=errorflag )
309 global%error = errorflag
310 IF (global%error /= err_none)
THEN
311 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%cv' )
314 ALLOCATE( pedgecellsxbuff%dv(ndv,nbuffsizeedge),stat=errorflag )
315 global%error = errorflag
316 IF (global%error /= err_none)
THEN
317 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%dv' )
320 ALLOCATE( pedgecellsxbuff%tv(ntv,nbuffsizeedge),stat=errorflag )
321 global%error = errorflag
322 IF (global%error /= err_none)
THEN
323 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%tv' )
326 ALLOCATE( pedgecellsxbuff%aivOld(naiv,nbuffsizeedge),stat=errorflag )
327 global%error = errorflag
328 IF (global%error /= err_none)
THEN
329 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%aivOld' )
332 ALLOCATE( pedgecellsxbuff%arvOld(narv,nbuffsizeedge),stat=errorflag )
333 global%error = errorflag
334 IF (global%error /= err_none)
THEN
335 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%arvOld' )
338 ALLOCATE( pedgecellsxbuff%cvOld(ncv,nbuffsizeedge),stat=errorflag )
339 global%error = errorflag
340 IF (global%error /= err_none)
THEN
341 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%cvOld' )
344 ALLOCATE( pedgecellsxbuff%rhs(ncv,nbuffsizeedge),stat=errorflag )
345 global%error = errorflag
346 IF (global%error /= err_none)
THEN
347 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%rhs' )
350 ALLOCATE( pedgecellsxbuff%rhsSum(ncv,nbuffsizeedge),stat=errorflag )
351 global%error = errorflag
352 IF (global%error /= err_none)
THEN
353 CALL
errorstop( global, err_allocate,__line__,
'pEdgeCellsXBuff%rhsSum' )
358 pedgecellsxbuff%aiv = 0
359 pedgecellsxbuff%arv = 0.0_rfreal
360 pedgecellsxbuff%cv = 0.0_rfreal
361 pedgecellsxbuff%dv = 0.0_rfreal
362 pedgecellsxbuff%tv = 0.0_rfreal
364 pedgecellsxbuff%aivOld = 0
365 pedgecellsxbuff%arvOld = 0.0_rfreal
366 pedgecellsxbuff%cvOld = 0.0_rfreal
368 pedgecellsxbuff%rhs = 0.0_rfreal
369 pedgecellsxbuff%rhsSum = 0.0_rfreal
subroutine plag_cecellsallocatedata(regions, iReg)
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 icorner
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)