Namespace uipc::geometry::affine_body
Namespace List > uipc > geometry > affine_body
Public Functions
| Type | Name |
|---|---|
| UIPC_GEOMETRY_API Matrix12x12 | build_abd_mass_matrix (Float m, const Vector3 & m_x_bar, const Matrix3x3 & m_x_bar_x_bar) Build the 12x12 ABD mass matrix from dyadic mass components. |
| UIPC_GEOMETRY_API Vector12 | compute_body_force (const SimplicialComplex & sc, const Vector3 & body_force_density) Compute the body force of an affine body. |
| UIPC_GEOMETRY_API void | compute_dyadic_mass (const SimplicialComplex & sc, Float rho, Float & m, Vector3 & m_x_bar, Matrix3x3 & m_x_bar_x_bar) Compute the dyadic mass of a simplicial complex. |
| UIPC_GEOMETRY_API void | compute_dyadic_mass (const SimplicialComplex & sc, Float rho, Float thickness, Float & m, Vector3 & m_x_bar, Matrix3x3 & m_x_bar_x_bar) Compute the dyadic mass of a codimensional simplicial complex (shell or rod). |
| UIPC_GEOMETRY_API Matrix12x12 | from_rigid_body (Float mass, const Vector3 & center_of_mass, const Matrix3x3 & inertia_cm) Build the 12x12 ABD mass matrix from rigid body quantities. |
| Matrix4x4 | q_to_transform (const Vector12 & q) |
| Matrix4x4 | q_v_to_transform_v (const Vector12 & q) |
| Vector12 | transform_to_q (const Matrix4x4 & trans) |
| Vector12 | transform_v_to_q_v (const Matrix4x4 & transform_v) |
Public Functions Documentation
function build_abd_mass_matrix
Build the 12x12 ABD mass matrix from dyadic mass components.
UIPC_GEOMETRY_API Matrix12x12 uipc::geometry::affine_body::build_abd_mass_matrix (
Float m,
const Vector3 & m_x_bar,
const Matrix3x3 & m_x_bar_x_bar
)
Assembles the block-structured mass matrix: M = | m*I_3 I_3 (x) (mc^T) | | I_3 (x) (mc) I_3 (x) S |
Parameters:
mTotal mass.m_x_barFirst moment of mass (m * center_of_mass).m_x_bar_x_barSecond moment of mass tensor S.
Returns:
The 12x12 ABD mass matrix.
function compute_body_force
Compute the body force of an affine body.
UIPC_GEOMETRY_API Vector12 uipc::geometry::affine_body::compute_body_force (
const SimplicialComplex & sc,
const Vector3 & body_force_density
)
Parameters:
scThe simplicial complex.body_force_densityThe body force density in N/m^3.
function compute_dyadic_mass
Compute the dyadic mass of a simplicial complex.
UIPC_GEOMETRY_API void uipc::geometry::affine_body::compute_dyadic_mass (
const SimplicialComplex & sc,
Float rho,
Float & m,
Vector3 & m_x_bar,
Matrix3x3 & m_x_bar_x_bar
)
Integrate the mass density over the simplicial complex to compute the dyadic mass.
Parameters:
scThe simplicial complex.mThe total mass.m_x_barThe total mass times the center of mass.m_x_bar_x_barThe total mass times the center of mass times the center of mass transpose.
function compute_dyadic_mass
Compute the dyadic mass of a codimensional simplicial complex (shell or rod).
UIPC_GEOMETRY_API void uipc::geometry::affine_body::compute_dyadic_mass (
const SimplicialComplex & sc,
Float rho,
Float thickness,
Float & m,
Vector3 & m_x_bar,
Matrix3x3 & m_x_bar_x_bar
)
Integrates the mass density over the effective 3D volume of the codim body, accounting for thickness to produce an invertible 12×12 ABD mass matrix.
- dim==2 (shell): direct area integration × 2r, plus normal-direction correction.
- dim==1 (rod): segment integration × π r², plus cross-section correction.
Parameters:
scThe simplicial complex (triangle mesh for shell, edge mesh for rod).rhoVolume mass density (kg/m³).thicknessThickness radiusr(half-thickness for shell, cross-section radius for rod).mThe total mass.m_x_barThe total mass times the center of mass.m_x_bar_x_barThe second dyadic moment (including thickness correction).
function from_rigid_body
Build the 12x12 ABD mass matrix from rigid body quantities.
UIPC_GEOMETRY_API Matrix12x12 uipc::geometry::affine_body::from_rigid_body (
Float mass,
const Vector3 & center_of_mass,
const Matrix3x3 & inertia_cm
)
Given the standard rigid body properties (mass, center of mass, inertia tensor about the center of mass), this function constructs the equivalent affine body dynamics mass matrix.
Recipe (see scripts/symbol_calculation/rigid_body_to_affine_body.ipynb): * Parallel axis theorem: I^O = I_cm + m * (|c|^2 I_3 - c c^T) * Inertia-to-second-moment inversion: S = 0.5 * tr(I^O) * I_3 - I^O * Assemble the 12x12 block matrix from (m, m*c, S).
Parameters:
massTotal mass of the rigid body.center_of_massCenter of mass in the reference configuration.inertia_cm3x3 inertia tensor about the center of mass.
Returns:
The 12x12 ABD mass matrix.
function q_to_transform
function q_v_to_transform_v
function transform_to_q
function transform_v_to_q_v
The documentation for this class was generated from the following file include/uipc/geometry/utils/affine_body/affine_body_from_rigid_body.h