allocate_memory Subroutine

private subroutine allocate_memory(cells, Ifaces, Jfaces, Kfaces)

Allocate memory for the required variables.

Allocate memory for cells

Allocate memory for the face variables.

Arguments

Type IntentOptional AttributesName
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


Calls

proc~~allocate_memory~2~~CallsGraph proc~allocate_memory~2 allocate_memory debugcall debugcall proc~allocate_memory~2->debugcall

Called by

proc~~allocate_memory~2~~CalledByGraph proc~allocate_memory~2 allocate_memory proc~setup_geometry setup_geometry proc~setup_geometry->proc~allocate_memory~2 proc~setup_solver setup_solver proc~setup_solver->proc~setup_geometry proc~start_run start_run proc~start_run->proc~setup_solver program~main main program~main->proc~start_run

Contents

Source Code


Source Code

        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