59 TYPE(t_region
),
INTENT(INOUT) :: region
65 CHARACTER(CHRLEN) :: rcsidentstring
68 INTEGER :: ilev,icoff,ijcoff,ijkc0
69 INTEGER :: ncnt1,ncnt2,iloc1,jloc1,kloc1,iloc2,jloc2,kloc2
71 LOGICAL :: clip,firsttype
73 REAL(RFREAL) :: minc,maxc,maxconc
74 REAL(RFREAL),
POINTER :: cv(:,:)
80 rcsidentstring =
'$RCSfile: PEUL_EnforcePositivity.F90,v $ $Revision: 1.3 $'
82 global => region%global
85 'PEUL_EnforcePositivity.F90' )
91 ilev = region%currLevel
97 cv => region%levels(ilev)%peul%cv
99 nptypes = region%peulInput%nPtypes
105 maxconc = region%peulInput%ptypes(ipt)%maxConc
111 iloc1 = crazy_value_int
112 jloc1 = crazy_value_int
113 kloc1 = crazy_value_int
114 iloc2 = crazy_value_int
115 jloc2 = crazy_value_int
116 kloc2 = crazy_value_int
120 SELECT CASE (region%peulInput%ptypes(ipt)%clipModel)
122 CASE (peul_clip_model_used)
127 IF (region%peulInput%ptypes(ipt)%negReport == peul_neg_report_none &
128 .AND. .NOT.clip) cycle
133 ijkc0 = indijk(
i,
j,
k,icoff,ijcoff)
135 IF (cv(ipt,ijkc0) < minc)
THEN
142 IF (cv(ipt,ijkc0) > maxc)
THEN
149 IF (cv(ipt,ijkc0) < 0._rfreal)
THEN
151 IF (clip) cv(ipt,ijkc0) = 0._rfreal
154 IF (cv(ipt,ijkc0) > maxconc)
THEN
156 IF (clip) cv(ipt,ijkc0) = maxconc
163 IF (ncnt1 > 0 .OR. ncnt2 > 0)
THEN
165 SELECT CASE (region%peulInput%ptypes(ipt)%negReport)
167 CASE (peul_neg_report_used)
171 WRITE(stdout,
'(A,1X,A)') solver_name, &
172 'Negative smoke concentration detected!'
174 IF ( global%flowType == flow_unsteady )
THEN
175 WRITE(stdout,
'(A,3X,A,1X,ES12.5,A,I1)') solver_name, &
176 'Current time and stage:',global%currentTime,
', ',region%irkStep
178 WRITE(stdout,
'(A,3X,A,1X,I6)') solver_name, &
179 'Current iteration number:', global%currentIter
182 WRITE(stdout,
'(A,2X,12(1X,A))') solver_name, &
199 WRITE(stdout,
'(A,I10,I6,I8,ES16.6,3I6,I8,ES16.6,3I6)') &
200 solver_name,region%iRegionGlobal,ipt,ncnt1,minc,iloc1,jloc1,kloc1, &
201 ncnt2,maxc,iloc2,jloc2,kloc2
subroutine peul_enforcepositivity(region)
**********************************************************************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 kpcbeg
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 jpcbeg
**********************************************************************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 ipcend
**********************************************************************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 ipcbeg
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************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 jpcend
subroutine deregisterfunction(global)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)