69 TYPE(t_region
),
POINTER :: pregion
75 CHARACTER(CHRLEN) :: rcsidentstring
76 INTEGER :: icg,ispec,negvalcntr
77 REAL(RFREAL) :: negvalmin
78 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcvmixt,pcvspec
79 TYPE(t_grid),
POINTER :: pgrid
82 rcsidentstring =
'$RCSfile: SPEC_RFLU_EnforceBounds.F90,v $ $Revision: 1.3 $'
88 global => pregion%global
91 'SPEC_RFLU_EnforceBounds.F90')
97 pcvmixt => pregion%mixt%cv
98 pcvspec => pregion%spec%cv
102 negvalmin = huge(1.0_rfreal)
108 DO icg = 1,pgrid%nCells
109 DO ispec = 1,pregion%specInput%nSpecies
110 IF ( pcvspec(ispec,icg) < 0.0_rfreal )
THEN
111 negvalcntr = negvalcntr + 1
112 negvalmin =
min(negvalmin,pcvspec(ispec,icg))
113 pcvspec(ispec,icg) = 0.0_rfreal
122 IF ( (global%verbLevel > verbose_low) .AND. &
123 (global%myProcid == masterproc) )
THEN
125 global%warnCounter = global%warnCounter + 1
127 WRITE(stdout,
'(A,1X,A)') solver_name, &
128 '*** WARNING *** Detected negative species mass fractions!'
130 WRITE(stdout,
'(A,3X,A,1X,I5.5)') solver_name,
'Global region:', &
131 pregion%iRegionGlobal
132 IF ( global%flowType == flow_unsteady )
THEN
133 WRITE(stdout,
'(A,3X,A,1X,1PE11.5)') solver_name,
'Current time:', &
137 WRITE(stdout,
'(A,3X,A,1X,I1)') solver_name,
'Runge-Kutta stage:', &
140 WRITE(stdout,
'(A,3X,A,1X,I6)') solver_name, &
141 'Number of locations with negative species mass fractions:', &
143 WRITE(stdout,
'(A,3X,A,1X,E23.16)') solver_name, &
144 'Largest negative species mass fraction:',negvalmin
145 WRITE(stdout,
'(A,3X,A)') solver_name, &
146 'Negative species mass fractions set to zero.'
subroutine registerfunction(global, funName, fileName)
subroutine spec_rflu_enforcebounds(pRegion)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
LOGICAL function rflu_decideprint(global)
subroutine deregisterfunction(global)