58 TYPE(t_region
) :: region
61 INTEGER :: icont, ilev, ipatch
64 CHARACTER(CHRLEN) :: rcsidentstring
66 INTEGER :: bctype, errorflag, n1, n2, ncont, ncv, ndv, ntile
68 TYPE(t_patch),
POINTER :: ppatch
74 rcsidentstring =
'$RCSfile: PLAG_AllocateMemoryTile.F90,v $ $Revision: 1.3 $'
76 global => region%global
79 'PLAG_AllocateMemoryTile.F90' )
81 IF ( global%myProcid == masterproc .AND. &
82 global%verbLevel > verbose_none )
THEN
83 WRITE(stdout,
'(A,3X,A)') solver_name,
'Allocating tile memory for PLAG...'
88 DO ilev=1,region%nGridLevels
89 DO ipatch=1,region%nPatches
91 ppatch => region%levels(ilev)%patches(ipatch)
92 bctype = ppatch%bcType
93 ncont = region%plagInput%nCont
95 IF ( bctype>=bc_injection .AND. bctype<=bc_injection+bc_range )
THEN
96 n1 = abs(ppatch%l1end -ppatch%l1beg ) + 1
97 n2 = abs(ppatch%l2end -ppatch%l2beg ) + 1
100 ptileplag => ppatch%tilePlag
102 ptileplag%nCv = cv_tile_last + ncont
103 ptileplag%nDv = dv_tile_last
108 ALLOCATE( ptileplag%nPclsInjc(ntile),stat=errorflag )
109 global%error = errorflag
110 IF (global%error /= err_none)
THEN
111 CALL
errorstop( global, err_allocate,__line__,
'pTilePlag%nPclsInjc' )
114 ALLOCATE( ptileplag%cv(ncv,ntile),stat=errorflag )
115 global%error = errorflag
116 IF (global%error /= err_none)
THEN
117 CALL
errorstop( global, err_allocate,__line__,
'pTilePlag%cv' )
120 ALLOCATE( ptileplag%cvOld(ncv,ntile),stat=errorflag )
121 global%error = errorflag
122 IF (global%error /= err_none)
THEN
123 CALL
errorstop( global, err_allocate,__line__,
'pTilePlag%cvOld' )
126 ALLOCATE( ptileplag%dv(ndv,ntile),stat=errorflag )
127 global%error = errorflag
128 IF (global%error /= err_none)
THEN
129 CALL
errorstop( global, err_allocate,__line__,
'pTilePlag%dv' )
132 ALLOCATE( ptileplag%rhs(ncv,ntile),stat=errorflag )
133 global%error = errorflag
134 IF (global%error /= err_none)
THEN
135 CALL
errorstop( global, err_allocate,__line__,
'pTilePlag%rhs' )
138 ALLOCATE( ptileplag%rhsSum(ncv,ntile),stat=errorflag )
139 global%error = errorflag
140 IF (global%error /= err_none)
THEN
141 CALL
errorstop( global, err_allocate,__line__,
'pTilePlag%rhsSum' )
144 ALLOCATE( ptileplag%cvTileMass(ncont),stat=errorflag )
145 global%error = errorflag
146 IF (global%error /= err_none)
THEN
147 CALL
errorstop( global, err_allocate,__line__,
'pTilePlag%cvTileMass' )
151 ptileplag%cvTileMass(icont) = cv_tile_last +icont
subroutine registerfunction(global, funName, fileName)
subroutine plag_allocatememorytile(region)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)