Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions src/differentiation/adjoint/intflux_b.F90
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ SUBROUTINE INTFLUX_NODIFF(nfc, ncv, mpg, geo, faceflux, density, cvflux)
!
INTEGER :: idir, ifc
REAL(kind=r8) :: qf(nfc), wrkf(nfc, 0:1), wrkc(ncv, 0:1)
INTRINSIC ABS
REAL(kind=r8) :: abs0
!
! ..interpolate the quantity to cell faces
CALL INTFACE(ncv, nfc, mpg%fccv, geo%fcvol, density, qf)
Expand All @@ -64,13 +62,8 @@ SUBROUTINE INTFLUX_NODIFF(nfc, ncv, mpg, geo, faceflux, density, cvflux)
DO ifc=1,nfc
IF (geo%fcqalf(ifc, idir) .NE. 0.0_R8 .AND. qf(ifc) .NE. 0.0_R8) &
& THEN
IF (geo%fcqalf(ifc, idir) .GE. 0.) THEN
abs0 = geo%fcqalf(ifc, idir)
ELSE
abs0 = -geo%fcqalf(ifc, idir)
END IF
wrkf(ifc, idir) = faceflux(ifc, idir)/qf(ifc)/(geo%fcs(ifc)*abs0&
& )
wrkf(ifc, idir) = faceflux(ifc, idir)/qf(ifc)/(geo%fcs(ifc)*geo%&
& fcqalf(ifc, idir))
ELSE
wrkf(ifc, idir) = 0.0_R8
END IF
Expand Down
11 changes: 2 additions & 9 deletions src/differentiation/hessian_tgt/intflux_dv_dv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ SUBROUTINE INTFLUX_NODIFF_NODIFF(nfc, ncv, mpg, geo, faceflux, density, &
!
INTEGER :: idir, ifc
REAL(kind=r8) :: qf(nfc), wrkf(nfc, 0:1), wrkc(ncv, 0:1)
INTRINSIC ABS
REAL(kind=r8) :: abs0
!
! ..interpolate the quantity to cell faces
CALL INTFACE(ncv, nfc, mpg%fccv, geo%fcvol, density, qf)
Expand All @@ -70,13 +68,8 @@ SUBROUTINE INTFLUX_NODIFF_NODIFF(nfc, ncv, mpg, geo, faceflux, density, &
DO ifc=1,nfc
IF (geo%fcqalf(ifc, idir) .NE. 0.0_R8 .AND. qf(ifc) .NE. 0.0_R8) &
& THEN
IF (geo%fcqalf(ifc, idir) .GE. 0.) THEN
abs0 = geo%fcqalf(ifc, idir)
ELSE
abs0 = -geo%fcqalf(ifc, idir)
END IF
wrkf(ifc, idir) = faceflux(ifc, idir)/qf(ifc)/(geo%fcs(ifc)*abs0&
& )
wrkf(ifc, idir) = faceflux(ifc, idir)/qf(ifc)/(geo%fcs(ifc)*geo%&
& fcqalf(ifc, idir))
ELSE
wrkf(ifc, idir) = 0.0_R8
END IF
Expand Down
11 changes: 2 additions & 9 deletions src/differentiation/tangent/intflux_dv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ SUBROUTINE INTFLUX_NODIFF(nfc, ncv, mpg, geo, faceflux, density, cvflux)
!
INTEGER :: idir, ifc
REAL(kind=r8) :: qf(nfc), wrkf(nfc, 0:1), wrkc(ncv, 0:1)
INTRINSIC ABS
REAL(kind=r8) :: abs0
!
! ..interpolate the quantity to cell faces
CALL INTFACE(ncv, nfc, mpg%fccv, geo%fcvol, density, qf)
Expand All @@ -66,13 +64,8 @@ SUBROUTINE INTFLUX_NODIFF(nfc, ncv, mpg, geo, faceflux, density, cvflux)
DO ifc=1,nfc
IF (geo%fcqalf(ifc, idir) .NE. 0.0_R8 .AND. qf(ifc) .NE. 0.0_R8) &
& THEN
IF (geo%fcqalf(ifc, idir) .GE. 0.) THEN
abs0 = geo%fcqalf(ifc, idir)
ELSE
abs0 = -geo%fcqalf(ifc, idir)
END IF
wrkf(ifc, idir) = faceflux(ifc, idir)/qf(ifc)/(geo%fcs(ifc)*abs0&
& )
wrkf(ifc, idir) = faceflux(ifc, idir)/qf(ifc)/(geo%fcs(ifc)*geo%&
& fcqalf(ifc, idir))
ELSE
wrkf(ifc, idir) = 0.0_R8
END IF
Expand Down
6 changes: 4 additions & 2 deletions src/utility/intflux.F
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ subroutine intflux(nFc,nCv,mpg,geo,faceflux,density,cvflux)
c Provides an interpolation of face flux quantities to cell centers
c The flux carries the cell-centered density of the quantity being transported
c We first interpolate the density to cell faces
c We then compute an effective velocity at cell faces
c We then compute an effective velocity at cell faces. The projected area
c retains the sign of fcQalf because face orientation can reverse across
c topology cuts.
C We interpolate this velocity to cell centers
c We multiply the interpolated velocity by the density and the projected area
use b2mod_types
Expand All @@ -47,7 +49,7 @@ subroutine intflux(nFc,nCv,mpg,geo,faceflux,density,cvflux)
do iFc = 1, nFc
if (geo%fcQalf(iFc,idir).ne.0.0_R8.and.qf(iFc).ne.0.0_R8) then
wrkf(iFc,idir) = faceflux(iFc,idir)/qf(iFc)/
. (geo%fcS(iFc)*abs(geo%fcQalf(iFc,idir)))
. (geo%fcS(iFc)*geo%fcQalf(iFc,idir))
Comment thread
jlore marked this conversation as resolved.
else
wrkf(iFc,idir) = 0.0_R8
end if
Expand Down