Rodin::Geometry::Polytope class

Base class for all geometric elements in finite element meshes.

A Polytope represents a geometric entity in a finite element mesh, ranging from vertices (0D) to cells (highest dimension). Polytopes are the building blocks of mesh topology and provide the geometric foundation for finite element computations.

Mathematical Foundation

In finite element analysis, polytopes represent:

  • Vertices (0D): Points $ p \in \mathbb{R}^d $
  • Edges (1D): Line segments connecting vertices
  • Faces (2D): Triangular or quadrilateral surfaces
  • Cells (3D): Tetrahedral, hexahedral, or other volumetric elements

Supported Element Types

  • Simplicial elements: Point, Segment, Triangle, Tetrahedron
  • Tensor-product elements: Quadrilateral, Hexahedron
  • Mixed elements: Wedge (prismatic) elements

Key Features

  • Type classification: Automatic detection of simplex vs tensor-product geometry
  • Dimension queries: Topological and geometric dimension access
  • Connectivity: Support for incidence relations between polytopes
  • Reference mappings: Transformations between reference and physical coordinates

Derived classes

class Cell
Class for representing polytopes of the highest dimension in the mesh, i.e. tetrahedra in 3D, triangles in 2D or lines in 1D.
class Face
Class for representing elements of codimension 1 in the mesh, i.e. triangles in 3D or lines in 2D.
class Vertex
Represents a vertex of the mesh.

Public types

enum class Type { Point, Segment, Triangle, Quadrilateral, Tetrahedron, Wedge }
Enumeration of supported polytope geometries.

Public static variables

static std::array<Type, 6> Types constexpr
Iterable of possible polytope geometry types.

Constructors, destructors, conversion operators

Polytope(size_t dimension, Index index, const MeshBase& mesh)
Consructs a polytope of dimension $ d $ and index $ i $ belonging to the given mesh.

Public functions

auto getIndex() const -> Index
Gets the index of the simplex in the mesh.
auto getMesh() const -> const MeshBase&
Gets the associated mesh to the simplex.
auto getAttribute() const -> Attribute
Gets the attribute of the simplex.
auto getMeasure() const -> Real
Gets the measure of the polytope.

Enum documentation

enum class Rodin::Geometry::Polytope::Type

Enumeration of supported polytope geometries.

This enumeration defines the geometric types supported in Rodin's finite element framework, covering both simplicial and tensor-product element families commonly used in numerical analysis.

Enumerators
Point

0D vertex element

Segment

1D line element

Triangle

2D triangular element (simplex)

Quadrilateral

2D quadrilateral element (tensor-product)

Tetrahedron

3D tetrahedral element (simplex)

Wedge

3D prismatic element (mixed)

Function documentation

Real Rodin::Geometry::Polytope::getMeasure() const

Gets the measure of the polytope.

Returns The measure of the polytope.

Gets the $ d $ -dimensional measure of the polytope. This has different names in different dimensions. See table below.

Dimension of polytopeMeasure
0Always zero
1Length
2Area
3Volume