Subtract two Euler fields.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(euler_1D_caf), | intent(in) | :: | lhs | Left hand side. |
||
class(integrand), | intent(in) | :: | rhs | Right hand side. |
Operator result.
function sub_euler(lhs, rhs) result(opr)
!---------------------------------------------------------------------------------------------------------------------------------
!< Subtract two Euler fields.
!---------------------------------------------------------------------------------------------------------------------------------
class(euler_1D_caf), intent(IN) :: lhs !< Left hand side.
class(integrand), intent(IN) :: rhs !< Right hand side.
class(integrand), allocatable :: opr !< Operator result.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
allocate (euler_1D_caf :: opr)
select type(opr)
class is(euler_1D_caf)
opr = lhs
endselect
select type(opr)
class is(euler_1D_caf)
select type(rhs)
class is (euler_1D_caf)
opr%U = lhs%U - rhs%U
endselect
endselect
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction sub_euler