Compute the face areas and normals
This is the 2-dimensional version. In this case, the face areas default to edge lengths.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(facetype), | intent(inout), | dimension(-2:imx+3,-2:jmx+2,-2:kmx+2) | :: | Ifaces | Store face quantites for I faces: normal and area |
|
type(facetype), | intent(inout), | dimension(-2:imx+2,-2:jmx+3,-2:kmx+2) | :: | Jfaces | Store face quantites for J faces: normal and area |
|
type(facetype), | intent(inout), | dimension(-2:imx+2,-2:jmx+2,-2:kmx+3) | :: | 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 condition and fixed values |
subroutine compute_face_areas_and_normals(Ifaces,Jfaces,Kfaces, nodes, bc)
!< Compute the face areas and normals
!<
!< This is the 2-dimensional version. In this case, the face
!< areas default to edge lengths.
!-----------------------------------------------------------
implicit none
type(facetype), dimension(-2:imx+3,-2:jmx+2,-2:kmx+2), intent(inout) :: Ifaces
!< Store face quantites for I faces: normal and area
type(facetype), dimension(-2:imx+2,-2:jmx+3,-2:kmx+2), intent(inout) :: Jfaces
!< Store face quantites for J faces: normal and area
type(facetype), dimension(-2:imx+2,-2:jmx+2,-2:kmx+3), 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 condition and fixed values
call compute_face_area_vectors(Ifaces,Jfaces,Kfaces, nodes)
call compute_face_areas(Ifaces,Jfaces,Kfaces, bc)
call normalize_face_normals(Ifaces,Jfaces,Kfaces, bc)
end subroutine compute_face_areas_and_normals