73 TYPE(t_region
),
POINTER :: regions(:)
79 CHARACTER(CHRLEN) :: rcsidentstring
80 INTEGER :: errorflag,
i,
ic,ifc,ipatch,ireg
81 REAL(RFREAL) :: enerlocal,ibarealocal,inbarealocal,masslocal,xmomlocal, &
82 ymomlocal,zmomlocal,vollocal
84 DOUBLE PRECISION,
DIMENSION(MAN_INTEG_SIZE) :: integ
85 REAL(RFREAL),
DIMENSION(MAN_INTEG_SIZE) :: globalvals,localvals
87 REAL(RFREAL),
DIMENSION(2) :: globalvals,localvals
89 REAL(RFREAL),
DIMENSION(:),
POINTER :: pvol
90 REAL(RFREAL),
DIMENSION(:,:),
POINTER :: pcv
92 TYPE(t_patch),
POINTER :: ppatch
93 TYPE(t_region
),
POINTER :: pregion
99 rcsidentstring =
'$RCSfile: RFLU_ComputeIntegralValues.F90,v $ $Revision: 1.7 $'
101 global => regions(1)%global
104 'RFLU_ComputeIntegralValues.F90')
110 vollocal = 0.0_rfreal
111 masslocal = 0.0_rfreal
113 DO ireg = 1,global%nRegionsLocal
114 pregion => regions(ireg)
116 pvol => pregion%grid%vol
117 pcv => pregion%mixt%cv
119 DO ic = 1,pregion%grid%nCells
120 vollocal = vollocal + pvol(
ic)
121 masslocal = masslocal + pcv(cv_mixt_dens,
ic)*pvol(
ic)
130 xmomlocal = 0.0_rfreal
131 ymomlocal = 0.0_rfreal
132 zmomlocal = 0.0_rfreal
133 enerlocal = 0.0_rfreal
139 inbarealocal = 0.0_rfreal
140 ibarealocal = 0.0_rfreal
142 DO ireg = 1,global%nRegionsLocal
143 pregion => regions(ireg)
145 DO ipatch = 1,pregion%grid%nPatches
146 ppatch => pregion%patches(ipatch)
148 IF ( ppatch%bcCoupled == bc_burning )
THEN
149 DO ifc = 1,ppatch%nBFaces
150 ibarealocal = ibarealocal + ppatch%fn(xyzmag,ifc)
152 ELSE IF ( ppatch%bcCoupled == bc_not_burning )
THEN
153 DO ifc = 1,ppatch%nBFaces
154 inbarealocal = inbarealocal + ppatch%fn(xyzmag,ifc)
166 localvals(man_integ_vol ) = vollocal
167 localvals(man_integ_mass ) = masslocal
168 localvals(man_integ_xmom ) = xmomlocal
169 localvals(man_integ_ymom ) = ymomlocal
170 localvals(man_integ_zmom ) = zmomlocal
171 localvals(man_integ_ener ) = enerlocal
172 localvals(man_integ_ibarea ) = ibarealocal
173 localvals(man_integ_inbarea) = inbarealocal
175 localvals(1) = vollocal
176 localvals(2) = masslocal
183 CALL mpi_reduce(localvals,globalvals,
SIZE(localvals,1),mpi_rfreal,mpi_sum, &
184 masterproc,global%mpiComm,errorflag)
185 global%error = errorflag
186 IF ( global%error /= err_none )
THEN
187 CALL
errorstop(global,err_mpi_trouble,__line__)
195 DO i = 1,man_integ_size
196 integ(
i) = globalvals(
i)
199 global%totalVol = globalvals(1)
200 global%totalMass = globalvals(2)
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 rflu_computeintegralvalues(regions)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)