InitiateFacetToCellData
This method creates the facet to cell element-data.
In this method we set the relation between element of a facet mesh (Facet elements) and master and slave domain.
A facet mesh usually denotes the boundary or part of boundary of master and slave domain.
Please make sure that nodeToElements
data is initiated in the cell mesh (or domain) before calling this routine.
Interface1
- ܀ Interface
- ️܀ Example 1
- ️܀ Example 2
- ↢
INTERFACE
MODULE SUBROUTINE InitiateFacetToCellData(obj, facetMesh, &
& cellMesh, dim, entityNum, isMaster)
CLASS(DomainConnectivity_), INTENT(INOUT) :: obj
!! Domain connectivity data
CLASS(Mesh_), INTENT(INOUT) :: facetMesh
!! Mesh of facet elements
CLASS(Mesh_), INTENT(INOUT) :: cellMesh
!! Master mesh
INTEGER(I4B), INTENT(IN) :: dim
INTEGER(I4B), INTENT(IN) :: entityNum
LOGICAL(LGT), INTENT(IN) :: isMaster
!! if true then cell Mesh is master cell
!! if false then cell mesh is slave cell
END SUBROUTINE InitiateFacetToCellData
END INTERFACE
- This routine initiate
facetToCell
for given facetMesh and CellMesh - In this case facetMesh should be a boundary of cellMesh
- This routine should not be used for internal boundary.
In this example we will see how to use InitiateFacetToCellData
. We use
this routine to compute the facet to cell data between a cell mesh and a facet mesh. The facet mesh is the boundary of the mesh.
The Cellmesh is shown below.
Importing modules and variables
PROGRAM main
USE easifemBase
USE easifemClasses
IMPLICIT NONE
TYPE( DomainConnectivity_ ) :: obj
TYPE( Domain_ ) :: cellDomain
TYPE( HDF5File_ ) :: cellDomainFile
CHARACTER( LEN=* ), PARAMETER :: cellDomainFileName="./mesh_tri3.h5"
CLASS( Mesh_ ), POINTER :: cellMesh
CLASS( Mesh_ ), POINTER :: facetMesh
CLASS( ReferenceElement_ ), POINTER :: refelem
INTEGER( I4B ) :: ii, iel
Open the mesh file for cellDomain
CALL cellDomainFile%Initiate( FileName=cellDomainFileName, MODE="READ" )
CALL cellDomainFile%Open()
Initiate the cellDomain
CALL cellDomain%Initiate( cellDomainFile, "")
Make a pointer to cellMesh and facet mesh
cellMesh => cellDomain%getMeshPointer( dim=2, entityNum=1)
facetMesh => cellDomain%getMeshPointer( dim=1, entityNum=2 )
Initiate FacetTOCellData.
CALL obj%InitiateFacetToCellData( facetMesh=facetMesh, &
& cellMesh=cellMesh, dim=2, entityNum=1, isMaster=.TRUE. )
CALL obj%DisplayFacetToCellData( msg="facetToCell=" )
CALL cellDomainFile%Deallocate()
CALL cellDomain%Deallocate()
CALL obj%Deallocate()
END PROGRAM main
In this example we will see how to use InitiateFacetToCellData
. We use
this routine to compute the facet to cell data between a cell mesh and a facet mesh. The facet mesh is the boundary of the mesh. This example is similar to the example 21, but in this case we use isMaster=.FALSE.
The Cellmesh is shown below.
Importing modules and variables
PROGRAM main
USE easifemBase
USE easifemClasses
IMPLICIT NONE
TYPE( DomainConnectivity_ ) :: obj
TYPE( Domain_ ) :: cellDomain
TYPE( HDF5File_ ) :: cellDomainFile
CHARACTER( LEN=* ), PARAMETER :: cellDomainFileName="./mesh_tri3b.h5"
CLASS( Mesh_ ), POINTER :: cellMesh
CLASS( Mesh_ ), POINTER :: facetMesh
CLASS( ReferenceElement_ ), POINTER :: refelem
INTEGER( I4B ) :: ii, iel
Open the mesh file for cellDomain
CALL cellDomainFile%Initiate( FileName=cellDomainFileName, MODE="READ" )
CALL cellDomainFile%Open()
Initiate the cellDomain
CALL cellDomain%Initiate( cellDomainFile, "")
Make a pointer to cellMesh and facet mesh
cellMesh => cellDomain%getMeshPointer( dim=2, entityNum=1)
facetMesh => cellDomain%getMeshPointer( dim=1, entityNum=7 )
Initiate FacetTOCellData.
CALL obj%InitiateFacetToCellData( facetMesh=facetMesh, &
& cellMesh=cellMesh, dim=2, entityNum=1, isMaster=.TRUE. )
CALL obj%DisplayFacetToCellData( msg="facetToCell=" )
CALL cellDomainFile%Deallocate()
CALL cellDomain%Deallocate()
CALL obj%Deallocate()
END PROGRAM main
Interface2
INTERFACE
MODULE SUBROUTINE InitiateFacetToCellData(obj, facetMesh, &
& masterDomain, slaveDomain)
CLASS(DomainConnectivity_), INTENT(INOUT) :: obj
!! Mesh connectivity data
CLASS(Mesh_), INTENT(INOUT) :: facetMesh
!! Mesh of facet elements
CLASS(Domain_), INTENT(INOUT) :: masterDomain
!! Domain of master elements
CLASS(Domain_), INTENT(INOUT) :: slaveDomain
!! Domain of slave elements
END SUBROUTINE InitiateFacetToCellData
END INTERFACE
This subroutine generates the faceToCell connectivity data between masterDomain, slaveDomain and faceMesh.
In this case facetMesh should a boundary of masterDomain and slaveDomain. In otherwords, facetMesh cannot represent the internal boundary.
This routine calls InitiateFacetToCellData1
routine.
Interface3
INTERFACE
MODULE SUBROUTINE dc_InitiateFacetToCellData3(obj, facetMesh, &
& cellMesh, dim, entityNum)
CLASS(DomainConnectivity_), INTENT(INOUT) :: obj
!! Domain connectivity data
CLASS(Mesh_), INTENT(INOUT) :: facetMesh
!! Mesh of facet elements
CLASS(Mesh_), INTENT(INOUT) :: cellMesh
!! Master mesh
INTEGER(I4B), INTENT(IN) :: dim
INTEGER(I4B), INTENT(IN) :: entityNum
END SUBROUTINE dc_InitiateFacetToCellData3
END INTERFACE
- This routine initiate
facetToCell
for given facetMesh and CellMesh - In this case facetMesh can be an internal boundary of cellMesh
Interface4
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE SUBROUTINE InitiateFacetToCellData(obj, facetMesh, cellDomain)
CLASS(DomainConnectivity_), INTENT(INOUT) :: obj
!! Domain connectivity data
CLASS(Mesh_), INTENT(INOUT) :: facetMesh
!! Mesh of facet elements
CLASS(Domain_), INTENT(INOUT) :: cellDomain
!! Master mesh
END SUBROUTINE InitiateFacetToCellData
END INTERFACE
- This routine initiates
facetToCell
for given facetMesh and CellMesh - In this case facetMesh can be an internal boundary of cellMesh
In this example we will see how to use InitiateFacetToCellData
. We use this routine to compute the facet to cell data between a cell domain and a facet mesh. The facet mesh is the internal boundary of the domain.
The Cellmesh is shown below.
Importing modules and variables
PROGRAM main
USE easifemBase
USE easifemClasses
IMPLICIT NONE
TYPE( DomainConnectivity_ ) :: obj
TYPE( Domain_ ) :: cellDomain
TYPE( HDF5File_ ) :: cellDomainFile
CHARACTER( LEN=* ), PARAMETER :: cellDomainFileName="./mesh_tri3.h5"
CLASS( Mesh_ ), POINTER :: cellMesh
CLASS( Mesh_ ), POINTER :: facetMesh
CLASS( ReferenceElement_ ), POINTER :: refelem
INTEGER( I4B ) :: ii, iel
Open the mesh file for cellDomain
CALL cellDomainFile%Initiate( FileName=cellDomainFileName, MODE="READ" )
CALL cellDomainFile%Open()
Initiate the cellDomain
CALL cellDomain%Initiate( cellDomainFile, "")
Make a pointer to cellMesh and facet mesh
facetMesh => cellDomain%getMeshPointer( dim=1, entityNum=2 )
Initiate FacetTOCellData.
CALL obj%InitiateFacetToCellData( facetMesh=facetMesh, &
& cellDomain=cellDomain )
CALL obj%DisplayFacetToCellData( msg="facetToCell=" )
CALL cellDomainFile%Deallocate()
CALL cellDomain%Deallocate()
CALL obj%Deallocate()
END PROGRAM main