Make the geometry module useful
Allocates memory to the variables and initializes them.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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 |
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