Acoustic energy for the PML model. The background density is the scalar this%rho0 (the PML variant does not carry a per-node background density; its variable 6 is the auxiliary phi_rho, not rho0), and the sound speed is taken from s(5). This overrides the parent entropy_func, which reads rho0 from s(6).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(LinearEuler2D_PML_t), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) |
pure function entropy_func_LinearEuler2D_PML_t(this,s) result(e)
!! Acoustic energy for the PML model. The background density is the scalar
!! this%rho0 (the PML variant does not carry a per-node background density;
!! its variable 6 is the auxiliary phi_rho, not rho0), and the sound speed
!! is taken from s(5). This overrides the parent entropy_func, which reads
!! rho0 from s(6).
class(LinearEuler2D_PML_t),intent(in) :: this
real(prec),intent(in) :: s(1:this%nvar)
real(prec) :: e
e = 0.5_prec*this%rho0*(s(2)*s(2)+s(3)*s(3))+ &
0.5_prec*(s(4)*s(4)/(this%rho0*s(5)*s(5)))
endfunction entropy_func_LinearEuler2D_PML_t