Assign one Euler field to another.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(euler_1D), | intent(inout) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
subroutine euler_assign_euler(lhs, rhs)
!---------------------------------------------------------------------------------------------------------------------------------
!< Assign one Euler field to another.
!---------------------------------------------------------------------------------------------------------------------------------
class(euler_1D), intent(INOUT) :: lhs !< Left hand side.
class(integrand), intent(IN) :: rhs !< Right hand side.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
select type(rhs)
class is(euler_1D)
lhs%steps = rhs%steps
lhs%ord = rhs%ord
lhs%Ni = rhs%Ni
lhs%Ng = rhs%Ng
lhs%Ns = rhs%Ns
lhs%Nc = rhs%Nc
lhs%Np = rhs%Np
lhs%Dx = rhs%Dx
lhs%weno = rhs%weno
if (allocated(rhs%U)) lhs%U = rhs%U
if (allocated(rhs%previous)) lhs%previous = rhs%previous
if (allocated(rhs%cp0)) lhs%cp0 = rhs%cp0
if (allocated(rhs%cv0)) lhs%cv0 = rhs%cv0
if (allocated(rhs%BC_L)) lhs%BC_L = rhs%BC_L
if (allocated(rhs%BC_R)) lhs%BC_R = rhs%BC_R
endselect
return
!---------------------------------------------------------------------------------------------------------------------------------
endsubroutine euler_assign_euler