Manicore
Library to implement schemes on n-dimensionnal manifolds.
Functions
Manicore::Geometry Namespace Reference

Functions

double volume_tetrahedron (Eigen::Vector3d const &a, Eigen::Vector3d const &b, Eigen::Vector3d const &c, Eigen::Vector3d const &d)
 Volume of a tetrahedron in 3D given by its 4 vertices. More...
 
double volume_triangle (Eigen::Vector3d const &x1, Eigen::Vector3d const &x2, Eigen::Vector3d const &x3)
 Area of a triangle in 3D given by its 3 vertices. More...
 
double volume_triangle (Eigen::Vector2d const &x1, Eigen::Vector2d const &x2, Eigen::Vector2d const &x3)
 Area of a triangle in 2D given by its 3 vertices. More...
 
template<typename T >
double diameter (std::vector< T > const &vl)
 Diameter of the convex hull of a vector of vertices in ND. More...
 
template<size_t dimension, size_t d>
Eigen::Matrix< double, dimension, d > tangent_space (std::vector< Eigen::Vector< double, dimension >> const &vl)
 Compute a possible basis for the tangent space from a vector of vertices. More...
 
template<size_t d>
Eigen::Vector< double, d > middleSimplex (Simplex< d > const &S)
 Compute the centroid of a simplex S. More...
 
template<size_t d>
bool inside (Eigen::Vector< double, d > const &x, Simplex< d > const &S)
 Is a vector x inside a simplex S. More...
 

Function Documentation

◆ diameter()

template<typename T >
double Manicore::Geometry::diameter ( std::vector< T > const &  vl)

Diameter of the convex hull of a vector of vertices in ND.

◆ inside()

template<size_t d>
bool Manicore::Geometry::inside ( Eigen::Vector< double, d > const &  x,
Simplex< d > const &  S 
)

Is a vector x inside a simplex S.

◆ middleSimplex()

template<size_t d>
Eigen::Vector<double,d> Manicore::Geometry::middleSimplex ( Simplex< d > const &  S)

Compute the centroid of a simplex S.

◆ tangent_space()

template<size_t dimension, size_t d>
Eigen::Matrix<double,dimension,d> Manicore::Geometry::tangent_space ( std::vector< Eigen::Vector< double, dimension >> const &  vl)

Compute a possible basis for the tangent space from a vector of vertices.

Generate a set of vector spanning the basis by subtracting 2 vertices, and apply a Gram-Schmidt process

◆ volume_tetrahedron()

double Manicore::Geometry::volume_tetrahedron ( Eigen::Vector3d const &  a,
Eigen::Vector3d const &  b,
Eigen::Vector3d const &  c,
Eigen::Vector3d const &  d 
)
inline

Volume of a tetrahedron in 3D given by its 4 vertices.

◆ volume_triangle() [1/2]

double Manicore::Geometry::volume_triangle ( Eigen::Vector2d const &  x1,
Eigen::Vector2d const &  x2,
Eigen::Vector2d const &  x3 
)
inline

Area of a triangle in 2D given by its 3 vertices.

◆ volume_triangle() [2/2]

double Manicore::Geometry::volume_triangle ( Eigen::Vector3d const &  x1,
Eigen::Vector3d const &  x2,
Eigen::Vector3d const &  x3 
)
inline

Area of a triangle in 3D given by its 3 vertices.