68 TYPE(t_region
),
POINTER :: pregion
74 CHARACTER(CHRLEN) :: rcsidentstring
75 INTEGER :: c1,c2,errorflag,
ic,ifc,indgs,ipatch
76 REAL(RFREAL) :: fs,nm,
term
77 REAL(RFREAL),
DIMENSION(:),
ALLOCATABLE :: checksum,checksumsorted
78 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pxyz,pxyzold
80 TYPE(t_grid),
POINTER :: pgrid,pgridold
81 TYPE(t_patch),
POINTER :: ppatch
87 rcsidentstring =
'$RCSfile: RFLU_CheckGridSpeeds.F90,v $ $Revision: 1.6 $'
89 global => pregion%global
92 'RFLU_CheckGridSpeeds.F90')
94 IF ( global%myProcid == masterproc .AND. &
95 global%verbLevel > verbose_low )
THEN
96 WRITE(stdout,
'(A,1X,A)') solver_name,
'Checking grid speeds...'
103 pgrid => pregion%grid
104 pgridold => pregion%gridOld
112 ALLOCATE(checksum(pgrid%nCellsTot),stat=errorflag)
113 global%error = errorflag
114 IF ( global%error /= err_none )
THEN
115 CALL
errorstop(global,err_allocate,__line__,
'checkSum')
118 ALLOCATE(checksumsorted(pgrid%nCellsTot),stat=errorflag)
119 global%error = errorflag
120 IF ( global%error /= err_none )
THEN
121 CALL
errorstop(global,err_allocate,__line__,
'checkSumSorted')
124 DO ic = 1,pgrid%nCellsTot
125 checksum(
ic) = 0.0_rfreal
132 DO ifc = 1,pgrid%nFaces
133 c1 = pgrid%f2c(1,ifc)
134 c2 = pgrid%f2c(2,ifc)
136 nm = pgrid%fn(xyzmag,ifc)
137 fs = pgrid%gs(indgs*ifc)
139 checksum(c1) = checksum(c1) + fs*nm
140 checksum(c2) = checksum(c2) - fs*nm
147 DO ipatch = 1,pgrid%nPatches
148 ppatch => pregion%patches(ipatch)
150 DO ifc = 1,ppatch%nBFaces
151 c1 = ppatch%bf2c(ifc)
153 nm = ppatch%fn(xyzmag,ifc)
154 fs = ppatch%gs(indgs*ifc)
156 checksum(c1) = checksum(c1) + fs*nm
164 DO ic = 1,pgrid%nCells
165 checksum(
ic) = checksum(
ic)*global%dtMin - (pgrid%vol(
ic)-pgridold%vol(
ic))
166 checksumsorted(
ic) = checksum(
ic)
173 DO ic = 1,pgrid%nCells
179 IF ( global%myProcid == masterproc .AND. &
180 global%verbLevel > verbose_low )
THEN
181 WRITE(stdout,
'(A,3X,A)') solver_name,
'Error in GCL:'
182 WRITE(stdout,
'(A,5X,A,1X,E15.8)') solver_name,
'L2-norm:',
term
183 WRITE(stdout,
'(A,5X,A,1X,E15.8,1X,I6)') solver_name,
'L8-norm:', &
184 maxval(checksum(1:pgrid%nCells)), &
185 maxloc(checksum(1:pgrid%nCells))
192 DEALLOCATE(checksum,stat=errorflag)
193 global%error = errorflag
194 IF ( global%error /= err_none )
THEN
195 CALL
errorstop(global,err_deallocate,__line__,
'checkSum')
198 DEALLOCATE(checksumsorted,stat=errorflag)
199 global%error = errorflag
200 IF ( global%error /= err_none )
THEN
201 CALL
errorstop(global,err_deallocate,__line__,
'checkSum')
204 IF ( global%myProcid == masterproc .AND. &
205 global%verbLevel > verbose_low )
THEN
206 WRITE(stdout,
'(A,1X,A)') solver_name,
'Checking grid speeds done.'
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 ic
subroutine quicksortrfreal(a, n)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine rflu_checkgridspeeds(pRegion)
subroutine deregisterfunction(global)