PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
Inertia_Utilities.hpp
Go to the documentation of this file.
1// _LICENSE_HEADER_
2//
3// Copyright (C) 2019 - 2025.
4// Terms register on the GPL-3.0 license.
5//
6// This file can be redistributed and/or modified under the license terms.
7//
8// See top level LICENSE file for more details.
9//
10// This file can be used citing references in CITATION.cff file.
11
12#ifndef __Inertia_Utilities_HPP
13#define __Inertia_Utilities_HPP
14
15#include "GeometryUtilities.hpp"
16
17namespace Polydim
18{
19namespace Utilities
20{
21
29struct Inertia_Data final
30{
31 Eigen::Matrix3d Fmatrix;
32 Eigen::Matrix3d FmatrixInv;
33 Eigen::Vector3d translation;
35 double signDetQ;
36};
37
39{
59 void InertiaMapping2D(const Gedim::GeometryUtilities &geometryUtilities,
60 const Eigen::MatrixXd &vertices,
61 const Eigen::Vector3d &centroid,
62 const double &diameter,
63 const std::vector<Eigen::Matrix3d> &triangulation_vertices,
64 Polydim::Utilities::Inertia_Data &inertia_data) const;
65
82 void InertiaMapping3D(const Gedim::GeometryUtilities &geometryUtilities,
83 const Eigen::MatrixXd &vertices,
84 const Eigen::Vector3d &centroid,
85 const double &diameter,
86 const std::vector<Eigen::MatrixXd> &tetrahedrons_vertices,
87 Polydim::Utilities::Inertia_Data &inertia_data) const;
88};
89
90} // namespace Utilities
91} // namespace Polydim
92
93#endif
The GeometryUtilities class intersects 3D segments.
Definition GeometryUtilities.hpp:37
Definition FEM_MCC_2D_LocalSpace.cpp:17
Affine map data aligning a polytope with its principal axes of inertia.
Definition Inertia_Utilities.hpp:30
double signDetQ
Definition Inertia_Utilities.hpp:35
Eigen::Matrix3d FmatrixInv
Definition Inertia_Utilities.hpp:32
Eigen::Matrix3d Fmatrix
Definition Inertia_Utilities.hpp:31
Eigen::Vector3d translation
Definition Inertia_Utilities.hpp:33
double absDetFmatrix
Definition Inertia_Utilities.hpp:34
Definition Inertia_Utilities.hpp:39
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).
Definition Inertia_Utilities.cpp:22
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).
Definition Inertia_Utilities.cpp:93