Multiply a Lorenz field by a real scalar.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(lorenz), | intent(in) | :: | lhs | Left hand side. |
||
real(kind=R_P), | intent(in) | :: | rhs | Right hand side. |
Operator result.
function lorenz_multiply_real(lhs, rhs) result(opr)
!---------------------------------------------------------------------------------------------------------------------------------
!< Multiply a Lorenz field by a real scalar.
!---------------------------------------------------------------------------------------------------------------------------------
class(lorenz), intent(IN) :: lhs !< Left hand side.
real(R_P), intent(IN) :: rhs !< Right hand side.
class(integrand), allocatable :: opr !< Operator result.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
allocate(lorenz :: opr)
select type(opr)
class is(lorenz)
opr = lhs
opr%U = lhs%U * rhs
endselect
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction lorenz_multiply_real