Initialize pattern with left and right states.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(riemann_pattern_compressible_object), | intent(inout) | :: | self | Riemann (states) pattern solution. |
||
| class(eos_object), | intent(in) | :: | eos_left | Equation of state for left state. |
||
| class(conservative_object), | intent(in) | :: | state_left | Left Riemann state. |
||
| class(eos_object), | intent(in) | :: | eos_right | Equation of state for right state. |
||
| class(conservative_object), | intent(in) | :: | state_right | Right Riemann state. |
||
| type(vector), | intent(in) | :: | normal | Normal (versor) of face where fluxes are given. |
elemental subroutine initialize(self, eos_left, state_left, eos_right, state_right, normal)
!< Initialize pattern with left and right states.
class(riemann_pattern_compressible_object), intent(inout) :: self !< Riemann (states) pattern solution.
class(eos_object), intent(in) :: eos_left !< Equation of state for left state.
class(conservative_object), intent(in) :: state_left !< Left Riemann state.
class(eos_object), intent(in) :: eos_right !< Equation of state for right state.
class(conservative_object), intent(in) :: state_right !< Right Riemann state.
type(vector), intent(in) :: normal !< Normal (versor) of face where fluxes are given.
select type(eos_left)
class is(eos_compressible)
self%eos_1 = eos_left
endselect
select type(state_left)
class is(conservative_compressible)
self%u_1 = state_left%velocity().dot.normal
self%p_1 = state_left%pressure(eos=eos_left)
self%r_1 = state_left%density
self%a_1 = eos_left%speed_of_sound(density=state_left%density, pressure=self%p_1)
endselect
select type(eos_right)
class is(eos_compressible)
self%eos_4 = eos_right
endselect
select type(state_right)
class is(conservative_compressible)
self%u_4 = state_right%velocity().dot.normal
self%p_4 = state_right%pressure(eos=eos_right)
self%r_4 = state_right%density
self%a_4 = eos_right%speed_of_sound(density=state_right%density, pressure=self%p_4)
endselect
endsubroutine initialize