Multiply a real scalar by an Euler field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R_P), | intent(in) | :: | lhs | Left hand side. |
||
class(euler_1D_openmp), | intent(in) | :: | rhs | Right hand side. |
Operator result.
function real_multiply_euler(lhs, rhs) result(opr)
!---------------------------------------------------------------------------------------------------------------------------------
!< Multiply a real scalar by an Euler field.
!---------------------------------------------------------------------------------------------------------------------------------
real(R_P), intent(IN) :: lhs !< Left hand side.
class(euler_1D_openmp), intent(IN) :: rhs !< Right hand side.
class(integrand), allocatable :: opr !< Operator result.
integer(I_P) :: i !< Counter.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
allocate(euler_1D_openmp :: opr)
select type(opr)
class is(euler_1D_openmp)
opr = rhs
endselect
!$OMP PARALLEL DEFAULT(NONE) PRIVATE(i) SHARED(lhs, rhs, opr)
select type(opr)
class is(euler_1D_openmp)
!$OMP DO
do i=1, rhs%Ni
opr%U(:, i) = rhs%U(:, i) * lhs
enddo
endselect
!$OMP END PARALLEL
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction real_multiply_euler