Allocate memory for the required variables.
Allocate memory for cells
Allocate memory for the face variables.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(celltype), | intent(out), | dimension(:,:,:), allocatable | :: | cells | Store cell center quantities: volume, cell center coordinate |
|
type(facetype), | intent(out), | dimension(:,:,:), allocatable | :: | Ifaces | Store face quantites for I faces: normal and area |
|
type(facetype), | intent(out), | dimension(:,:,:), allocatable | :: | Jfaces | Store face quantites for J faces: normal and area |
|
type(facetype), | intent(out), | dimension(:,:,:), allocatable | :: | Kfaces | Store face quantites for K faces: normal and area |
subroutine allocate_memory(cells, Ifaces, Jfaces, Kfaces)
!< Allocate memory for the required variables.
!-----------------------------------------------------------
implicit none
type(celltype), dimension(:,:,:), allocatable, intent(out) :: cells
!< Store cell center quantities: volume, cell center coordinate
type(facetype), dimension(:,:,:), allocatable, intent(out) :: Ifaces
!< Store face quantites for I faces: normal and area
type(facetype), dimension(:,:,:), allocatable, intent(out) :: Jfaces
!< Store face quantites for J faces: normal and area
type(facetype), dimension(:,:,:), allocatable, intent(out) :: Kfaces
!< Store face quantites for K faces: normal and area
DebugCall('allocate_memory')
allocate(cells(-2:imx+2, -2:jmx+2, -2:kmx+2))
!< Allocate memory for cells
!-----------------------------------------------------------
allocate(Ifaces(-2:imx+3, -2:jmx+2, -2:kmx+2))
allocate(Jfaces(-2:imx+2, -2:jmx+3, -2:kmx+2))
allocate(Kfaces(-2:imx+2, -2:jmx+2, -2:kmx+3))
!< Allocate memory for the face variables.
!-----------------------------------------------------------
end subroutine allocate_memory