Interior flux. Variables 1-5 use the parent linear Euler 2D flux; auxiliary variables 6-9 carry zero flux in both directions and are evolved purely by the PML source term.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LinearEuler2D_PML_t), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar,1:2) |
pure function flux2d_LinearEuler2D_PML_t(this,s,dsdx) result(flux)
!! Interior flux. Variables 1-5 use the parent linear Euler 2D
!! flux; auxiliary variables 6-9 carry zero flux in both directions
!! and are evolved purely by the PML source term.
class(LinearEuler2D_PML_t),intent(in) :: this
real(prec),intent(in) :: s(1:this%nvar)
real(prec),intent(in) :: dsdx(1:this%nvar,1:2)
real(prec) :: flux(1:this%nvar,1:2)
flux(1,1) = this%rho0*s(2) ! density, x flux ; rho0*u
flux(1,2) = this%rho0*s(3) ! density, y flux ; rho0*v
flux(2,1) = s(4)/this%rho0 ! x-velocity, x flux; p/rho0
flux(2,2) = 0.0_prec ! x-velocity, y flux; 0
flux(3,1) = 0.0_prec ! y-velocity, x flux; 0
flux(3,2) = s(4)/this%rho0 ! y-velocity, y flux; p/rho0
flux(4,1) = s(5)*s(5)*this%rho0*s(2) ! pressure, x flux : rho0*c^2*u
flux(4,2) = s(5)*s(5)*this%rho0*s(3) ! pressure, y flux : rho0*c^2*v
flux(5,1) = 0.0_prec ! sound speed, x flux; 0 (c held fixed in time)
flux(5,2) = 0.0_prec ! sound speed, y flux; 0
flux(6:9,1) = 0.0_prec ! PML auxiliaries evolve only via source term
flux(6:9,2) = 0.0_prec
if(.false.) flux(1,1) = flux(1,1)+dsdx(1,1) ! suppress unused-dummy-argument warning
endfunction flux2d_LinearEuler2D_PML_t