Assign one real to an Euler field.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(euler_1d), | intent(inout) | :: | lhs | Left hand side. |
||
| real(kind=R8P), | intent(in) | :: | rhs | Right hand side. |
subroutine euler_assign_real(lhs, rhs)
!< Assign one real to an Euler field.
class(euler_1d), intent(inout) :: lhs !< Left hand side.
real(R8P), intent(in) :: rhs !< Right hand side.
integer(I4P) :: i !< Counter.
if (allocated(lhs%U)) then
do i=1, lhs%Ni
lhs%U(i)%density = rhs
lhs%U(i)%momentum = rhs
lhs%U(i)%energy = rhs
enddo
endif
endsubroutine euler_assign_real