Skip to content

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:

  • m Total mass.
  • m_x_bar First moment of mass (m * center_of_mass).
  • m_x_bar_x_bar Second 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:

  • sc The simplicial complex.
  • body_force_density The 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:

  • sc The simplicial complex.
  • m The total mass.
  • m_x_bar The total mass times the center of mass.
  • m_x_bar_x_bar The 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:

  • sc The simplicial complex (triangle mesh for shell, edge mesh for rod).
  • rho Volume mass density (kg/m³).
  • thickness Thickness radius r (half-thickness for shell, cross-section radius for rod).
  • m The total mass.
  • m_x_bar The total mass times the center of mass.
  • m_x_bar_x_bar The 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:

  • mass Total mass of the rigid body.
  • center_of_mass Center of mass in the reference configuration.
  • inertia_cm 3x3 inertia tensor about the center of mass.

Returns:

The 12x12 ABD mass matrix.


function q_to_transform

inline Matrix4x4 uipc::geometry::affine_body::q_to_transform (
    const Vector12 & q
) 

function q_v_to_transform_v

inline Matrix4x4 uipc::geometry::affine_body::q_v_to_transform_v (
    const Vector12 & q
) 

function transform_to_q

inline Vector12 uipc::geometry::affine_body::transform_to_q (
    const Matrix4x4 & trans
) 

function transform_v_to_q_v

inline Vector12 uipc::geometry::affine_body::transform_v_to_q_v (
    const Matrix4x4 & transform_v
) 


The documentation for this class was generated from the following file include/uipc/geometry/utils/affine_body/affine_body_from_rigid_body.h