template<class Context>
Rodin::Geometry::SubMesh class

Represents a subset of a Mesh.

Overview

A SubMesh is a mesh that represents a subset of another mesh, typically corresponding to a specific region or boundary. It maintains references to its parent mesh and provides mappings between polytope indices in the child and parent meshes.

Mapping Between SubMesh and Parent Mesh

A SubMesh object holds a reference to its parent Mesh and includes information about how polytopes and vertices are mapped between the child and parent. This allows finite element operations on the SubMesh to properly reference degrees of freedom in the parent mesh.

Downcasting

A Mesh that is also a SubMesh can be downcasted to access SubMesh functionality. For instance:

if (mesh.isSubMesh())
{
  // The cast is well defined
  auto& submesh = static_cast<SubMesh&>(mesh);
  const auto& parent = submesh.getParent();
}

Use Cases

  • Boundary condition application
  • Interface problem formulation
  • Region-specific operations