Unary operator + prim.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(primitive_compressible), | intent(in) | :: | self | Primitive. |
Operator result.
function positive(self) result(operator_result)
!< Unary operator `+ prim`.
class(primitive_compressible), intent(in) :: self !< Primitive.
class(primitive_object), allocatable :: operator_result !< Operator result.
allocate(primitive_compressible :: operator_result)
select type(operator_result)
class is(primitive_compressible)
operator_result%density = + self%density
operator_result%velocity = + self%velocity
operator_result%pressure = + self%pressure
endselect
endfunction positive