setup_geometry Subroutine

public subroutine setup_geometry(cells, Ifaces, Jfaces, Kfaces, nodes, bc, dims)

Make the geometry module useful

Allocates memory to the variables and initializes them.

Arguments

Type IntentOptional AttributesName
type(celltype), intent(inout), dimension(:,:,:), allocatable:: cells

Cell center quanties: volume and coordiantes of cell center

type(facetype), intent(inout), dimension(:,:,:), allocatable:: Ifaces

Store face quantites for I faces: normal and area

type(facetype), intent(inout), dimension(:,:,:), allocatable:: Jfaces

Store face quantites for J faces: normal and area

type(facetype), intent(inout), dimension(:,:,:), allocatable:: Kfaces

Store face quantites for K faces: normal and area

type(nodetype), intent(in), dimension(-2:imx+3,-2:jmx+3,-2:kmx+3):: nodes

Grid points

type(boundarytype), intent(in) :: bc

boundary conditions and fixed values

type(extent), intent(in) :: dims

Calls

proc~~setup_geometry~~CallsGraph proc~setup_geometry setup_geometry proc~compute_face_areas_and_normals compute_face_areas_and_normals proc~setup_geometry->proc~compute_face_areas_and_normals proc~compute_ghost_cell_centroid compute_ghost_cell_centroid proc~setup_geometry->proc~compute_ghost_cell_centroid debugcall debugcall proc~setup_geometry->debugcall proc~allocate_memory~2 allocate_memory proc~setup_geometry->proc~allocate_memory~2 proc~compute_volumes compute_volumes proc~setup_geometry->proc~compute_volumes proc~compute_face_area_vectors compute_face_area_vectors proc~compute_face_areas_and_normals->proc~compute_face_area_vectors proc~compute_face_areas compute_face_areas proc~compute_face_areas_and_normals->proc~compute_face_areas proc~normalize_face_normals normalize_face_normals proc~compute_face_areas_and_normals->proc~normalize_face_normals proc~allocate_memory~2->debugcall proc~vol_hexahedron vol_hexahedron proc~compute_volumes->proc~vol_hexahedron proc~vol_tetrahedron vol_tetrahedron proc~vol_hexahedron->proc~vol_tetrahedron

Called by

proc~~setup_geometry~~CalledByGraph proc~setup_geometry setup_geometry 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 setup_geometry(cells, Ifaces, Jfaces, Kfaces, nodes, bc, dims)
            !< Make the geometry module useful
            !<
            !< Allocates memory to the variables and initializes them.
            !-----------------------------------------------------------

            implicit none
            type(extent), intent(in) :: dims
            type(celltype), dimension(:,:,:), allocatable, intent(inout) :: cells
            !< Cell center quanties: volume and coordiantes of cell center
            type(facetype), dimension(:,:,:), allocatable, intent(inout) :: Ifaces
            !< Store face quantites for I faces: normal and area
            type(facetype), dimension(:,:,:), allocatable, intent(inout) :: Jfaces
            !< Store face quantites for J faces: normal and area
            type(facetype), dimension(:,:,:), allocatable, intent(inout) :: Kfaces
            !< Store face quantites for K faces: normal and area
            type(nodetype), dimension(-2:imx+3,-2:jmx+3,-2:kmx+3), intent(in)  :: nodes
            !< Grid points
            type(boundarytype), intent(in) :: bc
            !< boundary conditions and fixed values

            DebugCall('setup_geometry')

            imx = dims%imx
            jmx = dims%jmx
            kmx = dims%kmx

            call allocate_memory(cells, Ifaces, Jfaces, Kfaces)
            call compute_face_areas_and_normals(Ifaces,Jfaces,Kfaces, nodes, bc)
            call compute_volumes(cells, nodes)
            call compute_ghost_cell_centroid(cells, nodes)

        end subroutine setup_geometry