66 INTEGER,
INTENT(IN) :: nvarscal
67 REAL(RFREAL),
DIMENSION(:,:),
INTENT(IN) :: cvscal
68 REAL(RFREAL),
DIMENSION(:,:),
INTENT(INOUT) :: resscal
69 TYPE(t_region
),
POINTER :: pregion
75 CHARACTER(CHRLEN) :: rcsidentstring
76 INTEGER :: c1,c2,ifc,ivarscal
77 REAL(RFREAL) :: flx,mf,mfn,mfp,sl,sr
78 REAL(RFREAL),
DIMENSION(:),
POINTER :: pmf
80 TYPE(t_grid),
POINTER :: pgrid
86 rcsidentstring =
'$RCSfile: RFLU_ScalarFirst.F90,v $ $Revision: 1.4 $'
88 global => pregion%global
91 'RFLU_ScalarFirst.F90')
97 IF ( pregion%mixtInput%indMfMixt /= 1 )
THEN
98 CALL
errorstop(global,err_indmfmixt_invalid,__line__)
105 pgrid => pregion%grid
106 pmf => pregion%mixt%mfMixt
112 DO ifc = 1,pgrid%nFaces
113 c1 = pgrid%f2c(1,ifc)
114 c2 = pgrid%f2c(2,ifc)
121 mfp =
max(mf,0.0_rfreal)
122 mfn =
min(mf,0.0_rfreal)
128 DO ivarscal = 1,nvarscal
129 sl = cvscal(ivarscal,c1)
130 sr = cvscal(ivarscal,c2)
132 flx = mfp*sl + mfn*sr
134 resscal(ivarscal,c1) = resscal(ivarscal,c1) + flx
135 resscal(ivarscal,c2) = resscal(ivarscal,c2) - flx
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine registerfunction(global, funName, fileName)
subroutine rflu_scalarfirst(pRegion, nVarScal, cvScal, resScal)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)