NDSolve`FEM`
NDSolve`FEM`

ElementMesh

ElementMesh[]

represents data that is used for describing a discrete partitioning of a region or a boundary of a region.

Details and Options

  • ElementMesh[] is generated by ToElementMesh or ToBoundaryMesh.
  • ElementMesh[] can be extracted from NDSolve`StateData objects generated by NDSolve`ProcessEquations using the "FiniteElementData" and "ElementMesh" properties.
  • In standard output format, the bounding box and the number and type of mesh elements are shown.
  • ElementMesh objects are used as input for NDSolve, InitializePDEMethodData, and NumericalRegion.
  • ElementMesh has the following properties:
  • "BoundaryConnectivity"gives a list bc such that bc[[i]] gives the boundary elements to which boundary element i is connected
    "BoundaryElements"gives the boundary elements
    "BoundaryElementMarkerUnion"gives the union of all boundary element markers
    "BoundaryNormals"gives normals of boundary elements
    "Bounds"gives the bounds
    "Coordinates"gives the coordinates
    "ElementConnectivity"gives for each mesh element a list ec such that ec[[i]] gives the elements to which element i is connected
    "EmbeddingDimension"gives the embedding dimensions
    "MeshElements"gives the mesh elements
    "MeshElementMarkerUnion"gives the union of all mesh element markers
    "MeshElementMeasure"gives the measure of each mesh element
    "MeshOrder"gives the mesh order
    "PointElements"gives the point elements
    "PointElementMarkerUnion"gives the union of all point element markers
    "Properties"gives the properties
    "Quality"computes the quality of the mesh
    "VertexBoundaryConnectivity"gives a SparseArray vbc such that vbc[[i]] contains a 1 at the position node i is connected to a boundary element
    "VertexElementConnectivity"gives a SparseArray vec such that vec[[i]] contains a 1 at the position node i is connected to an element

Examples

open allclose all

Basic Examples  (1)

Load the package:

Create an ElementMesh:

Extract the mesh coordinates:

Extract the mesh elements:

Extract the mesh boundary elements:

Extract the mesh point elements:

Scope  (24)

"BoundaryConnectivity"  (1)

The boundary connectivity gives information about how boundary elements are connected to each other.

Create a triangle element mesh:

The boundary-element connectivity of an element mesh can be obtained:

The boundary element 1 is connected to boundary elements 6 and 2:

These boundary elements in turn are both connected to the boundary element 1:

"BoundaryElements"  (1)

Extract the boundary elements:

Visualize the boundary mesh:

"BoundaryElementMarkerUnion"  (1)

Extract the boundary element marker union of a mesh:

"BoundaryNormals"  (3)

Create a boundary element mesh from an implicit region:

Extract the boundary normals from the boundary mesh element:

To visualize the normals, compute the mean of the boundary element coordinates and display the normal vectors as scaled arrows:

Note that the orientation of the normals depends on the orientation of the boundary segments.

Construct a 1D boundary mesh with an internal boundary:

In 1D, the boundary normal for an interior boundary is taken to be 0:

In all cases, the normal computation uses a first-order boundary element mesh:

"Bounds"  (1)

Extract the bounds of a mesh:

"Coordinates"  (1)

Extract the coordinates of a mesh:

"ElementConnectivity"  (4)

The element-element connectivity provides neighboring information about elements.

Create a triangle element mesh:

The first edge of the first element connects nodes {3,2} and does not have a neighbor element, and is thus 0. The second edge connecting nodes 2 to the center node connects to element 2. The third element has an edge connecting the center node to node 3; this edge is connected to element 6. All subsequent elements are treated in the same fashion.

Extract the element connectivity information:

Create a mesh:

Extract the element connectivity information from a mesh:

The third element of the first mesh element is connected to the following elements:

These elements, in turn, are all connected to element three:

All element connectivities that include incidents less than or equal to 0 are boundary elements:

Create a mesh with an interior boundary and region markers:

Extract the element connectivity information:

All element connectivities that include incidents less than or equal to 0 are boundary elements:

Visualize the boundary, interior boundary, and all elements connected to the boundaries:

Negative numbers in the element connectivity indicate interior boundary elements:

Visualize the elements connected to the interior boundary:

Create a mesh with quad and triangle elements and attribute markers for the elements:

Visualize the mesh with node and element numbers:

"EmbeddingDimension"  (1)

Extract the dimension of a mesh:

"MeshElements"  (1)

Extract the mesh elements from a mesh:

"MeshElementMarkerUnion"  (1)

Create a mesh with quad and triangle elements and attribute markers for the elements:

Extract the mesh element marker union of the mesh:

"MeshElementMeasure"  (2)

Create and visualize a mixed-element mesh:

Compute the volume of each mesh element:

Compute the total volume of the mesh:

Generate a mesh with curvature:

Inspect the mesh order:

Compute the total volume of the mesh:

Generate a first-order mesh with curvature:

Inspect the mesh order:

Compute the total volume of the mesh:

"MeshOrder"  (1)

Extract the mesh order from a mesh:

"PointElements"  (1)

Extract the point elements from a mesh:

"PointElementMarkerUnion"  (1)

Extract the point element marker union of a mesh:

"Properties"  (1)

Extract the properties list from a mesh:

"Quality"  (1)

Extract and visualize the mesh quality from a mesh:

"VertexBoundaryConnectivity"  (1)

The vertex boundary connectivity has information about how vertices are connected to the boundary elements.

Create a mesh:

Visualize the mesh with nodes styled in red and boundary edges in blue:

Extract the number of nodes and the number of boundary elements:

Extract the vertex boundary connectivity:

The vertex boundary connectivity matrix has as many rows as there are nodes in the mesh and as many columns as there are boundary elements in the mesh. For each vertex row, the column contains a 1 at the position where that vertex is connected in the boundary elements:

The first vertex has a connection to the following boundary elements:

"VertexElementConnectivity"  (1)

The vertex element connectivity has information about how vertices are connected to the mesh elements.

Create a mesh:

Visualize the mesh with mesh element numbers styled in blue:

Extract the vertex element connectivity:

The number of vertices and mesh elements in the mesh:

Each vertex has a connection to a mesh element:

The seventh vertex has a connection to the following mesh elements:

Properties & Relations  (4)

The ElementMesh can be extracted from an InterpolatingFunction object:

The ElementMesh can be used for higher-order interpolation:

The mesh order is the default mesh order:

Create the interpolation function values over the mesh coordinates:

The ElementMesh can be extracted from the NDSolve`StateData object:

The ElementMesh can be used as an NIntegrate region:

Wolfram Research (2014), ElementMesh, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMesh.html (updated 2021).

Text

Wolfram Research (2014), ElementMesh, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMesh.html (updated 2021).

CMS

Wolfram Language. 2014. "ElementMesh." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMesh.html.

APA

Wolfram Language. (2014). ElementMesh. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMesh.html

BibTeX

@misc{reference.wolfram_2024_elementmesh, author="Wolfram Research", title="{ElementMesh}", year="2021", howpublished="\url{https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMesh.html}", note=[Accessed: 05-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_elementmesh, organization={Wolfram Research}, title={ElementMesh}, year={2021}, url={https://reference.wolfram.com/language/FEMDocumentation/ref/ElementMesh.html}, note=[Accessed: 05-November-2024 ]}