PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
Polydim::Utilities::Inertia_Utilities Struct Referencefinal

#include <Inertia_Utilities.hpp>

Public Member Functions

void InertiaMapping2D (const Gedim::GeometryUtilities &geometryUtilities, const Eigen::MatrixXd &vertices, const Eigen::Vector3d &centroid, const double &diameter, const std::vector< Eigen::Matrix3d > &triangulation_vertices, Polydim::Utilities::Inertia_Data &inertia_data) const
 Compute the inertia mapping of a polygon (2D).
 
void InertiaMapping3D (const Gedim::GeometryUtilities &geometryUtilities, const Eigen::MatrixXd &vertices, const Eigen::Vector3d &centroid, const double &diameter, const std::vector< Eigen::MatrixXd > &tetrahedrons_vertices, Polydim::Utilities::Inertia_Data &inertia_data) const
 Compute the inertia mapping of a polyhedron (3D).
 

Member Function Documentation

◆ InertiaMapping2D()

void Polydim::Utilities::Inertia_Utilities::InertiaMapping2D ( const Gedim::GeometryUtilities geometryUtilities,
const Eigen::MatrixXd &  vertices,
const Eigen::Vector3d &  centroid,
const double &  diameter,
const std::vector< Eigen::Matrix3d > &  triangulation_vertices,
Polydim::Utilities::Inertia_Data inertia_data 
) const

Compute the inertia mapping of a polygon (2D).

Constructs the affine map that sends the polygon onto an isotropic reference configuration aligned with its principal axes of inertia. The element is first rescaled by its diameter and translated to the centroid; the polygon mass (second-moment) matrix is then assembled from the triangulation and diagonalized (self-adjoint eigensolver), and its eigenpairs define a whitening transform that normalizes and aligns the principal directions; a final diameter rescaling is applied. The resulting map, its inverse, translation, Jacobian magnitude and orientation sign are stored in inertia_data.

Parameters
geometryUtilitiesGeDiM helper providing polygon mass and diameter.
verticesPolygon vertices (one per column).
centroidPolygon centroid.
diameterPolygon diameter \(h_E\) (initial rescaling factor).
triangulation_verticesSub-triangulation of the polygon (per-triangle vertices), used to compute the mass matrix.
[out]inertia_dataResulting affine-map data (see Inertia_Data).
Exceptions
std::runtime_errorif the inertia (mass) matrix is singular.

◆ InertiaMapping3D()

void Polydim::Utilities::Inertia_Utilities::InertiaMapping3D ( const Gedim::GeometryUtilities geometryUtilities,
const Eigen::MatrixXd &  vertices,
const Eigen::Vector3d &  centroid,
const double &  diameter,
const std::vector< Eigen::MatrixXd > &  tetrahedrons_vertices,
Polydim::Utilities::Inertia_Data inertia_data 
) const

Compute the inertia mapping of a polyhedron (3D).

Three-dimensional counterpart of InertiaMapping2D(): builds the affine map that aligns the polyhedron with its principal axes of inertia and normalizes it to an isotropic reference configuration, starting from a tetrahedral decomposition used to assemble the mass (second-moment) matrix. The map, its inverse, translation, Jacobian magnitude and orientation sign are stored in inertia_data.

Parameters
geometryUtilitiesGeDiM helper providing polyhedron mass and diameter.
verticesPolyhedron vertices (one per column).
centroidPolyhedron centroid.
diameterPolyhedron diameter \(h_E\) (initial rescaling factor).
tetrahedrons_verticesTetrahedral decomposition of the polyhedron (per-tetrahedron vertices), used to compute the mass matrix.
[out]inertia_dataResulting affine-map data (see Inertia_Data).
Exceptions
std::runtime_errorif the inertia (mass) matrix is singular.

The documentation for this struct was generated from the following files: