Return serialized array of primitive.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(primitive_compressible), | intent(in) | :: | self | Primitive. |
Serialized array of primitive.
pure function array(self) result(array_)
!< Return serialized array of primitive.
class(primitive_compressible), intent(in) :: self !< Primitive.
real(R8P), allocatable :: array_(:) !< Serialized array of primitive.
allocate(array_(1:5))
array_(1) = self%density
array_(2) = self%velocity%x
array_(3) = self%velocity%y
array_(4) = self%velocity%z
array_(5) = self%pressure
endfunction array