GetBoundingBox
Returns the bounding box of the domain.
Interface
- Interface
- example
- ↢ close
INTERFACE
MODULE FUNCTION obj_GetBoundingBox(obj, dim) RESULT(ans)
CLASS(AbstractDomain_), INTENT(IN) :: obj
INTEGER(I4B), OPTIONAL, INTENT(IN) :: dim
!! dimension of the mesh
!! if dim is not present then nodeCoord in domain is
!! used for computing the bounding box
TYPE(BoundingBox_) :: ans
END FUNCTION obj_GetBoundingBox
END INTERFACE
dim
Default value of dim
is same as the obj%nsd
. If the dim
is present then we get the bounding box of the mesh of dim
dimesion.
PROGRAM main
USE easifemBase
USE easifemClasses
USE FEDomain_Class
IMPLICIT NONE
TYPE(FEDomain_) :: dom
TYPE(HDF5File_) :: meshfile
CHARACTER(*), PARAMETER :: filename = &
& "../../Mesh/examples/meshdata/small_mesh.h5"
CALL meshfile%Initiate(filename, "READ")
CALL meshfile%OPEN()
CALL dom%Initiate(meshfile, '')
! Now let us get the bounding box of the domain
! by using the method called `GetBoundingBox()`.
CALL Display(dom%GetBoundingBox(), "Box : ")
CALL Display(dom%GetBoundingBox(dim=dom%GetNSD()), "Box:")
CALL Display(dom%GetBoundingBox(dim=1_I4B), "Box:")
CALL dom%DEALLOCATE()
CALL meshfile%CLOSE()
CALL meshfile%DEALLOCATE()
END PROGRAM main