Rodin::Geometry::Vertex class

Represents a vertex (0-dimensional element) in a mesh.

Vertices are the fundamental building blocks of the mesh, representing points in space with associated coordinates. They serve as:

  • Degrees of freedom locations for P1 finite elements
  • Endpoints for edges and corners for higher-dimensional elements
  • Spatial anchors for the mesh geometry

Base classes

class Polytope
Base class for all geometric elements in finite element meshes.

Public types

using Parent = Polytope
Parent class type.

Constructors, destructors, conversion operators

Vertex(Index index, const MeshBase& mesh)
Constructs a vertex with given index.
Vertex(const Vertex& other)
Copy constructor.

Public functions

auto x() const -> Real
Gets the x-coordinate (first coordinate).
auto y() const -> Real
Gets the y-coordinate (second coordinate).
auto z() const -> Real
Gets the z-coordinate (third coordinate).
auto operator()(size_t i) const -> Real
Gets the i-th coordinate.
auto getCoordinates() const -> Eigen::Map<const Math::SpatialPoint>
Gets the vertex coordinates as a vector.
auto getGeometry() const -> Type constexpr
Gets the geometry type (always Point for vertices).

Function documentation

Rodin::Geometry::Vertex::Vertex(Index index, const MeshBase& mesh)

Constructs a vertex with given index.

Parameters
index in Index of the vertex in the mesh
mesh in Reference to the containing mesh

Real Rodin::Geometry::Vertex::x() const

Gets the x-coordinate (first coordinate).

Returns x-coordinate value

Real Rodin::Geometry::Vertex::y() const

Gets the y-coordinate (second coordinate).

Returns y-coordinate value

Real Rodin::Geometry::Vertex::z() const

Gets the z-coordinate (third coordinate).

Returns z-coordinate value

Real Rodin::Geometry::Vertex::operator()(size_t i) const

Gets the i-th coordinate.

Parameters
in Coordinate index
Returns i-th coordinate value

Eigen::Map<const Math::SpatialPoint> Rodin::Geometry::Vertex::getCoordinates() const

Gets the vertex coordinates as a vector.

Returns Eigen map to the coordinate vector

Type Rodin::Geometry::Vertex::getGeometry() const constexpr

Gets the geometry type (always Point for vertices).

Returns Polytope::Type::Point