81 CLASS(fluxes_kt),
INTENT(INOUT) :: this
82 CLASS(mesh_base),
INTENT(IN) :: Mesh
83 CLASS(physics_base),
INTENT(IN) :: Physics
84 TYPE(Dict_TYP),
INTENT(IN),
POINTER :: config,IO
86 CALL this%InitFluxes(mesh,physics,config,io,
kt,
"KT")
95 CALL this%Error(
"InitFluxes_kt",
"Unknown mesh type.")
110 xfluxdydz,yfluxdzdx,zfluxdxdy)
117 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX,Physics%vnum), &
118 INTENT(OUT) :: xfluxdydz,yfluxdzdx,zfluxdxdy
123 CALL this%CalculateFaceData(mesh,physics,pvar,cvar)
126 IF (mesh%INUM.GT.1)
THEN 129 CALL physics%CalculateFluxesX(mesh,2*m-1,2*m,
this%prim,
this%cons,
this%pfluxes)
133 DO k=mesh%KGMIN,mesh%KGMAX
135 DO j=mesh%JGMIN,mesh%JGMAX
137 DO i=mesh%IMIN+mesh%IM1,mesh%IMAX
138 xfluxdydz(i,j,k,l) = mesh%dAxdydz(i+1,j,k,1) / &
139 (
this%maxwav%data4d(i,j,k,m) -
this%minwav%data4d(i,j,k,m)) * &
140 (
this%maxwav%data4d(i,j,k,m) *
this%pfluxes%data5d(i,j,k,2*m,l) - &
141 this%minwav%data4d(i,j,k,m) *
this%pfluxes%data5d(i+1,j,k,2*m-1,l) + &
142 this%minwav%data4d(i,j,k,m) *
this%maxwav%data4d(i,j,k,m) * &
143 (
this%cons%data5d(i+1,j,k,2*m-1,l) -
this%cons%data5d(i,j,k,2*m,l)))
150 xfluxdydz(:,:,:,:) = 0.0
154 IF (mesh%JNUM.GT.1)
THEN 158 CALL physics%CalculateFluxesY(mesh,2*m-1,2*m,
this%prim,
this%cons,
this%pfluxes)
162 DO k=mesh%KGMIN,mesh%KGMAX
164 DO j=mesh%JMIN+mesh%JM1,mesh%JMAX
166 DO i=mesh%IGMIN,mesh%IGMAX
167 yfluxdzdx(i,j,k,l) = mesh%dAydzdx(i,j+1,k,1) / &
168 (
this%maxwav%data4d(i,j,k,m) -
this%minwav%data4d(i,j,k,m)) * &
169 (
this%maxwav%data4d(i,j,k,m) *
this%pfluxes%data5d(i,j,k,2*m,l) - &
170 this%minwav%data4d(i,j,k,m) *
this%pfluxes%data5d(i,j+1,k,2*m-1,l) + &
171 this%minwav%data4d(i,j,k,m) *
this%maxwav%data4d(i,j,k,m) * &
172 (
this%cons%data5d(i,j+1,k,2*m-1,l) -
this%cons%data5d(i,j,k,2*m,l)))
178 yfluxdzdx(:,:,:,:) = 0.0
182 IF (mesh%KNUM.GT.1)
THEN 186 CALL physics%CalculateFluxesZ(mesh,2*m-1,2*m,
this%prim,
this%cons,
this%pfluxes)
190 DO k=mesh%KMIN+mesh%KM1,mesh%KMAX
192 DO j=mesh%JGMIN,mesh%JGMAX
194 DO i=mesh%IGMIN,mesh%IGMAX
195 zfluxdxdy(i,j,k,l) = mesh%dAzdxdy(i,j,k+1,1) / &
196 (
this%maxwav%data4d(i,j,k,m) -
this%minwav%data4d(i,j,k,m)) * &
197 (
this%maxwav%data4d(i,j,k,m) *
this%pfluxes%data5d(i,j,k,2*m,l) - &
198 this%minwav%data4d(i,j,k,m) *
this%pfluxes%data5d(i,j,k+1,2*m-1,l) + &
199 this%minwav%data4d(i,j,k,m) *
this%maxwav%data4d(i,j,k,m) * &
200 (
this%cons%data5d(i,j,k+1,2*m-1,l) -
this%cons%data5d(i,j,k,2*m,l)))
206 zfluxdxdy(:,:,:,:) = 0.0
216 CLASS(fluxes_kt),
INTENT(INOUT) :: this
218 CALL this%Finalize_base()
subroutine finalize(this)
Destructor of common class.
mesh module for midpoint quadrature rule
type(logging_base), save this
derived class for compound of mesh arrays
numerical fluxes module for midpoint quadrature rule
base module for reconstruction process
integer, parameter, public kt
named integer constants for flavour of state vectors
Dictionary for generic data types.
pure subroutine calculatefluxes(this, Mesh, Physics, pvar, cvar, xfluxdydz, yfluxdzdx, zfluxdxdy)
Calculates the fluxes with the midpoint method.
subroutine initfluxes_kt(this, Mesh, Physics, config, IO)
base module for numerical flux functions