AbstractMesh
AbstractMesh_
datatype handles the finite element mesh. The structure of this data type is given here.
Summary of methodsβ
Constructor Methodsβ
Method Name | Purpose |
---|---|
Initiate | Read the mesh by reading a hdf5 file. |
DEALLOCATE | Deallocate memory occupied by the mesh instance. |
isEmpty | Returns true if the mesh is empty. |
DeallocateKdTree | Deallocate the kdtree. |
InitiateDynamicDataStructure | Initiate Kdtree related data |
IOMethodsβ
Method Name | Purpose |
---|---|
Import | Read mesh from hdf5 file. |
Export | Export mesh to an hdf5 file. |
ExportToVTK | Export mesh to a VTKfile. |
Display | Display the mesh. |
DisplayNodeData | Display node data. |
DisplayElementData | Display element data. |
DisplayFacetData | Display facet data. |
DisplayInternalFacetData | Display internal facet data. |
DisplayBoundaryFacetData | Display boundary facet data. |
DisplayFacetElements | Display facet element shape data. |
DisplayMeshInfo | Display mesh information. |
Constructor methods for connectivityβ
Method Name | Purpose |
---|---|
InitiateKdTree | Initiate Kdtree. |
InitiateNodeToElements | Initiate node to element data (mapping). |
InitiateNodeToNodes | Initiate Node to nodes data. |
InitiateExtraNodeToNodes | Initiate Node to nodes mapping (used in jump based FEM). |
InitiateElementToElements | Initiate element to elements mapping. |
InitiateBoundaryData | Initiate the boundary data. |
InitiateEdgeConnectivity | Initiate Edge connectivity data. |
InitiateFaceConnectivity | Initiate Face connectivity data. |
InitiateFacetElements | Initiate boundary data. |
Element information methodsβ
Method Name | Purpose |
---|---|
GetElemType | Get the element name |
GetElemData | Get the element data |
GetElemDataPointer | Get pointer to an element data |
GetNNE | Get number of nodes in an element |
GetMaxNNE | Get maximum number of nodes in an element |
Size | Returns the size of the mesh (total number of elements) |
GetElemNum | Generic method to get list of local or global element number in mesh |
GetOrientation | Get the orientation of the element |
GetTotalCells | Returns the total number of cells in the mesh (obj%tElements) |
GetTotalElements | Generic method for getting the total number of elements |
GetGlobalElemNumber | Returns the global element number for a local element number |
GetLocalElemNumber | Returns the local element number of a global element number |
GetOrder | Returns the order of the element of mesh |
GetMinElemNumber | Get minimum element number |
GetMaxElemNumber | Get maximum element number |
Topology Methodsβ
Method Name | Purpose |
---|---|
GetElemTopology | Generic method to get the element topology name |
GetElemTopologyIndx | Get the index of element topology |
GetTotalElementsTopologyWise | Get total elements topology wise |
GetTotalTopology | Get total topology |
GetTotalEntities | Generic method for getting total entities in mesh and an element |
GetBoundingEntity | Returns the nodal coordinates |
Node Information Methodsβ
Method Name | Purpose |
---|---|
GetNptrs | Get node number of mesh |
GetNptrs_ | Get node number of mesh |
GetNptrsInBox | Get node number in a box |
GetNptrsInBox_ | Get node number in a box without allocation |
GetInternalNptrs | Returns a vector of internal node numbers |
GetInternalNptrs_ | Returns a vector of internal node numbers (subroutine version, no allocation) |
GetBoundaryNptrs | Returns a vector of boundary node numbers |
GetTotalNodes | Get total nodes |
GetTotalInternalNodes | Returns the total number of internal nodes |
GetTotalBoundaryNodes | Returns the total number of boundary nodes |
GetLocalNodeNumber | Returns the local node number of a global node number |
GetLocalNodeNumber_ | Get local node number without allocation |
GetGlobalNodeNumber | Returns the global node number of a local node number |
GetNodeCoord | Get node coordinates |
GetNearestNode | Get nearest node |
GetMinNodeNumber | Get minimum element number |
GetMaxNodeNumber | Get maximum node number |
GetNodeMask | Returns the mask for the presence of node |
Connectivity Methodsβ
Method Name | Purpose |
---|---|
GetConnectivity | Returns node numbers in an element (this is vertex connectivity) |
GetConnectivity_ | Generic method for getting the connectivity of an element |
GetNodeConnectivity | Returns all the node connectivity of the mesh elements |
GetNodeToElements | Generic method to get elements around node or nodes |
GetNodeToNodes | Returns nodes connected to a given node number |
GetNodeToNodes_ | Returns nodes connected to a given node number |
GetElementToElements | Returns elements connected to a given element number |
GetElementToElements_ | Get element to elements mapping |
GetMaxNodeToElements | Get maximum number of node to elements |
GetMaxElementToElements | Get maximum number of element to elements |
GetMaxNodeToNodes | Get maximum number of node to nodes |
Geometry methodsβ
Method Name | Purpose |
---|---|
FindEdge | Find a edge in a cell (only for 3D) |
FindFace | Find a face in a cell |
GetBoundaryElementData | Returns boundary element data |
GetBoundingBox | Return the bounding box |
GetCellNumber | Returns the master and slave cell number of a facet element |
GetFacetConnectivity | Generic method to Get the connectivity of a facet element |
GetFacetElementType | Returns the facet element type of a given cell element number |
GetFacetParam | Get the parameters of facet elements |
GetGlobalEdgeNumber | Get global Edge number from global element and localEdgenumber |
GetGlobalFaceNumber | Get global face number from global element and localFacenumber |
GetLocalFacetID | Return the local facet id, so that we can Get reference element of the facet element |
GetMasterCellNumber | Returns the master cell number of a facet element |
GetNSD | Return the NSD |
GetSlaveCellNumber | Returns the slave cell number of a facet element |
GetTotalBoundaryElements | Returns the total number of boundary elements |
GetTotalBoundaryFacetElements | Returns the total number of boundary facet elements |
GetTotalEdges | Returns the total number of edges in the mesh (obj%tEdges) |
GetTotalFaces | Returns the total number of faces in the mesh (obj%tFaces) |
GetTotalFacetElements | Returns the total number of facet elements in the mesh |
GetTotalInternalFacetElements | Returns the total number of internal facet elements |
GetXidimension | Return the NSD |
Status Check Methodsβ
Method Name | Purpose |
---|---|
isInit | Returns obj%isInitiated |
isNodeToElements | Check if node to elements mapping is available |
isNodeToNodes | Check if node to nodes mapping is available |
isExtraNodeToNodes | Check if extra node to nodes mapping is available |
isElementToElements | Check if element to elements mapping is available |
isEdgeConnectivity | Check if edge connectivity is available |
isFaceConnectivity | Check if face connectivity is available |
isBoundaryData | Check if boundary data is available |
isFacetData | Check if facet data is available |
isBoundaryElement | Returns true if a given global element number is a boundary element |
isDomainBoundaryElement | Returns true if a given global element number is a boundary element |
isDomainFacetElement | Returns true if a given global element number is a boundary element |
isAnyNodePresent | Returns true if any of the node number is present |
isAllNodePresent | Returns true if all of the node numbers are present |
isBoundaryNode | Returns true if a given global node number is a boundary node |
isNodePresent | Returns true if a node number is present |
isElementPresent | Returns true if a given element number is present |
isElementActive | Check if element is active |
Set methodsβ
Method Name | Purpose |
---|---|
SetShowTime | Set showTime option |
SetBoundingBox | Set the bounding box |
SetSparsity | Generic method for Setting the sparsity |
SetTotalMaterial | Generic method |
SetMaterial | Set material to an element |
SetFacetElementType | Set the facet element type of a given cell number |
SetQuality | Set mesh quality |
SetParam | Set parameters of mesh |
SetFacetParam | Set the parameters of facet element |
Get Methodsβ
Method Name | Purpose |
---|---|
GetMaterial | Returns the material id of a given medium |
GetTotalMaterial | Returns the total materials in an element |
GetParam | Get parameter of mesh |
All methodsβ
ποΈ Structure
AbstractMesh_ datatype is simply a collection of finite elements and nodes.
ποΈ ElemData
It is a data type for storing the element-data information.
ποΈ NodeData
It is a data type for storing the information of node data in mesh.
ποΈ InternalFacetData
Data storage for internal facet of mesh.
ποΈ BoundaryFacetData
Data storage for boundary elements (i.e., facets which coincides with the boundary of mesh)
ποΈ Initiate
Initiate an instance of Mesh.
ποΈ Deallocate
Deallocate data stored in the mesh object.
ποΈ DeallocateKdTree
Deallocate data related to the kd-tree.
ποΈ Display
Displays comprehensive information about the AbstractMesh_ object including its properties, status flags, and data structures.
ποΈ DisplayBoundaryFacetData
Displays information about boundary facet data in the mesh.
ποΈ DisplayElementData
Displays detailed information about element data in the mesh, either for a specific element or all elements.
ποΈ DisplayFacetData
Displays information about all facet data in the mesh.
ποΈ DisplayFacetElemSD
Interface
ποΈ DisplayFacetElements
Displays information about facet elements in the mesh.
ποΈ DisplayInternalFacetData
Displays information specifically about internal facet data in the mesh.
ποΈ DisplayMeshInfo
Displays concise summary information about the mesh.
ποΈ DisplayNodeData
Displays detailed information about all node data in the mesh.
ποΈ Export
This method exports the mesh to a hdf5 file format.
ποΈ ExportToVTK
Exports an AbstractMesh_ object to a VTK file format, which can be visualized in applications like ParaView or VisIt.
ποΈ Find Edge
Find an edge in a cell (only for 3D meshes).
ποΈ FindFace
Find a face in a cell.
ποΈ GetBoundaryElementData
Returns boundary element data for a given element.
ποΈ GetBoundaryNptrs
The GetBoundaryNptrs method returns the global node numbers of all boundary nodes in the mesh. Boundary nodes are nodes that lie on the boundary of the domain.
ποΈ GetBoundingBox
Return the bounding box of the mesh.
ποΈ GetBoundingEntity
The GetBoundingEntity method retrieves the bounding entity numbers of the mesh. Bounding entities are higher-dimensional geometric entities that contain or bound the current mesh.
ποΈ GetCellNumber
Returns the master and slave cell numbers of a facet element.
ποΈ GetConnectivity
This function returns the global node numbers that define the connectivity of a given element. By default, it returns the vertex connectivity, but you can use the opt parameter to request different types of connectivity (edge, face, cell, or all).
ποΈ GetConnectivity_
A more memory-efficient version of GetConnectivity that allows reusing existing arrays.
ποΈ GetElemData
The GetElemData method retrieves a complete copy of the element data for a specific element in the mesh. The element data contains all information about the element including its nodes, connectivity, and properties.
ποΈ GetElemDataPointer
The GetElemDataPointer method returns a pointer to the element data for a specific element in the mesh. This provides direct access to the element data without creating a copy.
ποΈ GetElemNum
The GetElemNum method retrieves the element numbers (global or local) present in the mesh. It can return either all element numbers or those belonging to a specific mesh ID.
ποΈ GetElemTopology
The GetElemTopology method retrieves the topology information for elements in the mesh. It can return either all element topologies present in the mesh or the topology of a specific element. Element topology refers to the geometric arrangement of nodes that defines the element shape (e.g., triangle, quadrilateral, tetrahedron, hexahedron).
ποΈ GetElemTopologyIndx
The GetElemTopologyIndx method returns the topology index of a specific element in the mesh. The topology index is a numerical identifier for the element shape (1 for point, 2 for line, 3 for triangle, etc.).
ποΈ GetElemType
The GetElemType method retrieves the type (name) of a specific element in the mesh. Element types define the geometric and interpolation properties of mesh elements.
ποΈ GetElementToElements
Retrieves information about elements that are connected to a specified element.
ποΈ GetElementToElements_
A memory-efficient version of GetElementToElements that allows reusing existing arrays.
ποΈ GetFacetConnectivity
Generic method to get the connectivity of a facet element.
ποΈ GetFacetElementType
Returns the facet element type of a given cell element number.
ποΈ GetFacetParam
Get the parameters of facet elements.
ποΈ GetGlobalEdgeNumber
Get global Edge number from global element and localEdgenumber.
ποΈ GetGlobalElemNumber
The GetGlobalElemNumber method converts local element numbers to global element numbers in the mesh.
ποΈ GetGlobalFaceNumber
Get global face number from global element and localFacenumber.
ποΈ GetGlobalNodeNumber
The GetGlobalNodeNumber method converts local node numbers to global node numbers in the mesh. Global node numbers are used for cross-mesh references and for output/visualization.
ποΈ GetInternalNptrs
The GetInternalNptrs method returns the global node numbers of all internal nodes in the mesh. Internal nodes are nodes that are not on the boundary of the domain.
ποΈ GetInternalNptrs_
The GetInternalNptrs_ method retrieves the global node numbers of internal nodes without allocating new memory. The caller provides a pre-allocated array to store the results.
ποΈ GetLocalElemNumber
The GetLocalElemNumber method converts global element numbers to local element numbers in the mesh.
ποΈ GetLocalFacetID
Return the local facet id, so that we can get reference element of the facet element.
ποΈ GetLocalNodeNumber
The GetLocalNodeNumber method converts global node numbers to local node numbers in the mesh. Local node numbers are used for internal mesh operations and array indexing.
ποΈ GetLocalNodeNumber_
The GetLocalNodeNumber_ method converts global node numbers to local node numbers without allocating new memory. The caller provides a pre-allocated array to store the results.
ποΈ GetMasterCellNumber
Returns the master cell number of a facet element.
ποΈ GetMaterial
The GetMaterial method retrieves the material ID assigned to a specific element and medium within the mesh.
ποΈ GetMaxElemNumber
The GetMaxElemNumber method returns the maximum global element number present in the mesh. This is useful for determining the range of element numbers and for array sizing.
ποΈ GetMaxElementToElements
Retrieves the maximum number of elements connected to any element in the mesh.
ποΈ GetMaxNNE
The GetMaxNNE method returns the maximum number of nodes in any element of the mesh. This is useful for allocating arrays that need to accommodate any element in the mesh.
ποΈ GetMaxNodeNumber
The GetMaxNodeNumber method returns the maximum global node number present in the mesh. This is useful for determining the range of node numbers and for array sizing.
ποΈ GetMaxNodeToElements
Retrieves the maximum number of elements connected to any node in the mesh.
ποΈ GetMaxNodeToNodes
Retrieves the maximum number of nodes connected to any node in the mesh.
ποΈ GetMinElemNumber
The GetMinElemNumber method returns the minimum global element number present in the mesh. This is useful for determining the range of element numbers and for array indexing.
ποΈ GetMinNodeNumber
The GetMinNodeNumber method returns the minimum global node number present in the mesh. This is useful for determining the range of node numbers and for array indexing.
ποΈ GetNNE
The GetNNE method returns the number of nodes in a specific element of the mesh. This is useful for determining the size of arrays needed for element-based operations.
ποΈ GetNSD
Return the NSD (Number of Spatial Dimensions).
ποΈ GetNearestNode
The GetNearestNode method finds the node(s) in the mesh that are closest to a given query point in space. It uses a k-d tree for efficient spatial searching.
ποΈ GetNodeConnectivity
GetNodeConnectivity
ποΈ GetNodeCoord
The GetNodeCoord method retrieves the coordinates of nodes in the mesh. It has multiple versions for different use cases, including getting coordinates from files, for all nodes, for specific elements, or for individual nodes.
ποΈ GetNodeMask
The GetNodeMask method creates a logical mask array indicating which global node numbers are present in the mesh. This is useful for quickly checking if nodes exist and for filtering operations.
ποΈ GetNodeToElements
Retrieves the global element numbers that are connected to a specified node or nodes.
ποΈ GetNodeToNodes
Retrieves the global node numbers that are connected to a specified node or nodes.
ποΈ GetNodeToNodes_
A memory-efficient version of GetNodeToNodes that allows reusing existing arrays.
ποΈ GetNptrs
The GetNptrs method retrieves the global node numbers present in the mesh. It can return either all node numbers or those belonging to a specific mesh ID.
ποΈ GetNptrsInBox
The GetNptrsInBox method retrieves the global node numbers of all nodes located within a specified bounding box in 3D space.
ποΈ GetNptrsInBox_
The GetNptrsInBox_ method retrieves the global node numbers of nodes within a specified bounding box without allocating new memory. The caller provides a pre-allocated array to store the results.
ποΈ GetNptrs_
The GetNptrs_ method is a subroutine version of GetNptrs that retrieves node numbers without allocation. It can return all node numbers, those for a specific mesh ID, or those for specified elements.
ποΈ GetOrder
The GetOrder method retrieves the polynomial order of elements in the mesh or of a specific element. The element order determines the degree of interpolation functions used in finite element analysis.
ποΈ GetOrientation
The GetOrientation method retrieves orientation flags for the cells, faces, and edges of a specific element. Orientation flags indicate how local entities are oriented with respect to the global reference frame.
ποΈ GetParam
The GetParam method retrieves various parameters and properties of the mesh. It provides a comprehensive way to access mesh attributes in a single call.
ποΈ GetRefElemPointer
Interface
ποΈ GetSlaveCellNumber
Returns the slave cell number of a facet element.
ποΈ GetTotalBoundaryElements
Returns the total number of boundary elements.
ποΈ GetTotalBoundaryFacetElements
Returns the total number of boundary facet elements.
ποΈ GetTotalBoundaryNodes
The GetTotalBoundaryNodes method returns the total number of boundary nodes in the mesh. Boundary nodes are nodes that lie on the boundary of the domain.
ποΈ GetTotalCells
The GetTotalCells method returns the total number of cells (elements) in the mesh. It is an alias for the Size method.
ποΈ GetTotalEdges
Returns the total number of edges in the mesh (obj%tEdges).
ποΈ GetTotalElements
The GetTotalElements method returns the total number of elements in the mesh, with options to filter by mesh ID.
ποΈ GetTotalElementsTopologyWise
The GetTotalElementsTopologyWise method returns the count of elements for each topology type in the mesh. This provides a breakdown of how many elements of each shape (point, line, triangle, etc.) are present.
ποΈ GetTotalEntities
The GetTotalEntities method retrieves the total count of different entity types (vertices, edges, faces, cells) either for a specific element or for the entire mesh. This information is crucial for many mesh operations and finite element calculations.
ποΈ GetTotalFaces
Returns the total number of faces in the mesh (obj%tFaces).
ποΈ GetTotalFacetElements
Returns the total number of facet elements in the mesh.
ποΈ GetTotalInternalFacetElements
Returns the total number of internal facet elements.
ποΈ GetTotalInternalNodes
The GetTotalInternalNodes method returns the total number of internal nodes in the mesh. Internal nodes are nodes that are not on the boundary of the domain.
ποΈ GetTotalMaterial
The GetTotalMaterial method returns the total number of materials defined for a specific element in the mesh.
ποΈ GetTotalNodes
The GetTotalNodes method returns the total number of nodes in the mesh, with options to count nodes for specific mesh IDs or element selections.
ποΈ GetTotalTopology
The GetTotalTopology method returns the total number of different element topology types present in the mesh. This indicates how many different element shapes are used in the mesh construction.
ποΈ GetXiDimension
Return the xidimension of the mesh.
ποΈ Import
This method reads mesh data from an HDF5 file and initializes the AbstractMesh_
ποΈ InitiateBoundaryData
The InitiateBoundaryData method identifies and marks boundary elements and nodes within an AbstractMesh object.
ποΈ InitiateDynamicDataStructure
This method is used to initiate the dynamic data structure of the mesh object. It is typically called during the initialization phase of the mesh object to set up any necessary data structures that will be used for dynamic operations on the mesh.
ποΈ InitiateEdgeConnectivity
The InitiateEdgeConnectivity method initializes edge connectivity information in an AbstractMesh object. This method identifies all unique edges in the mesh, assigns them global edge numbers, and establishes the mapping between local element edges and these global edges.
ποΈ InitiateElemSD
ποΈ InitiateElementToElements
The InitiateElementToElements method establishes the element-to-element connectivity mapping in an AbstractMesh object. This connectivity represents how elements in the mesh are topologically connected to each other through shared faces, edges, or nodes, depending on the mesh dimension.
ποΈ InitiateExtraNodetoNodes
The InitiateExtraNodetoNodes method builds an extended node-to-node connectivity mapping in an AbstractMesh object. Unlike the standard node-to-node connectivity, this extended mapping includes "second-degree" connections that are not directly connected through a shared element but are neighbors of neighbors.
ποΈ InitiateFaceConnectivity
The InitiateFaceConnectivity method initializes the face connectivity data for elements in an AbstractMesh_ object.
ποΈ InitiateFacetElements
The InitiateFacetElements method initializes facet element data for an AbstractMesh_ object.
ποΈ InitiateKdTree
The InitiateKdtree method initializes a k-d tree data structure within an AbstractMesh object. This tree enables efficient spatial queries for tasks such as nearest neighbor searches, which are essential for many mesh-based operations.
ποΈ InitiateNodeToElements
The InitiateNodeToElements method establishes the node-to-element connectivity mapping in an AbstractMesh object. This mapping is essential for numerous mesh operations as it allows quick identification of all elements connected to any given node.
ποΈ InitiateNodeToNodes
The obj_InitiateNodetoNodes method builds the node-to-node connectivity mapping in an AbstractMesh object. This mapping represents the topological relationship between nodes in the mesh, creating a graph structure where each node knows which other nodes it's connected to through mesh elements.
ποΈ IsAllNodePresent
The IsAllNodePresent method checks if all of the specified nodes exist in the mesh.
ποΈ IsAnyNodePresent
The IsAnyNodePresent method checks if any of the specified nodes exist in the mesh.
ποΈ IsBoundaryData
The IsBoundaryData method checks if the boundary data has been initialized in the mesh.
ποΈ IsBoundaryElement
The IsBoundaryElement method checks if a specific element is a boundary element in the mesh.
ποΈ IsBoundaryNode
The IsBoundaryNode method checks if a specific node is a boundary node in the mesh.
ποΈ IsDomainBoundaryElement
The IsDomainBoundaryElement method checks if a specific element is a domain boundary element in the mesh.
ποΈ IsDomainFacetElement
The IsDomainFacetElement method checks if a specific facet element is a domain boundary facet element in the mesh.
ποΈ IsEdgeConnectivity
The IsEdgeConnectivity method checks if the edge connectivity information has been initialized in the mesh.
ποΈ IsElementActive
The IsElementActive method checks if a specific element is active in the mesh.
ποΈ IsElementPresent
The IsElementPresent method checks if a specific element number exists in the mesh.
ποΈ IsElementToElements
The IsElementToElements method checks if the element-to-elements mapping has been initialized in the mesh.
ποΈ IsEmpty
This method checks it the mesh is empty or not.
ποΈ IsExtraNodeToNodes
The IsExtraNodeToNodes method checks if the extra node-to-nodes mapping has been initialized in the mesh.
ποΈ IsFaceConnectivity
The IsFaceConnectivity method checks if the face connectivity information has been initialized in the mesh.
ποΈ IsFacetData
The IsFacetData method checks if the facet data has been initialized in the mesh.
ποΈ IsInit
The IsInit method checks if the mesh object has been properly initialized.
ποΈ IsNodePresent
The IsNodePresent method checks if specific node numbers exist in the mesh. It has two versions: one for checking a single node, and another for checking multiple nodes simultaneously.
ποΈ IsNodeToElements
The IsNodeToElements method checks if the node-to-elements mapping has been initialized in the mesh.
ποΈ IsNodeToNodes
The IsNodeToNodes method checks if the node-to-nodes mapping has been initialized in the mesh.
ποΈ SetBoundingBox
Interface
ποΈ SetFacetElementType
The SetFacetElementType method sets the element type for a specific facet of a cell in the mesh. This is important for defining boundary conditions and inter-element connectivity.
ποΈ SetFacetParam
The SetFacetParam method sets parameters for a facet element in the mesh.
ποΈ SetMaterial
The SetMaterial method assigns material properties to elements in the mesh. It has three versions for different use cases.
ποΈ SetParam
The SetParam method sets various parameters and flags in the mesh object.
ποΈ SetQuality
The SetQuality method calculates and sets quality measures for mesh elements. Currently, this method is under development.
ποΈ SetShowTime
By using this method you can measure the time required in each subroutine of AbstractMesh.
ποΈ SetSparsity
The SetSparsity method sets the sparsity pattern of a CSR matrix based on mesh connectivity. It has four versions for different use cases.
ποΈ SetTotalMaterial
The SetTotalMaterial method sets the total number of materials for elements in the mesh. It has two versions: one for a specific element, and another for all elements in the mesh.
ποΈ Size
The Size method returns the total number of elements in the mesh. This is equivalent to GetTotalElements() and is provided as an alternative naming for the same functionality.