Struct PhysicalModalBodyParams#

Inheritance Relationships#

Base Type#

Struct Documentation#

struct PhysicalModalBodyParams : public Karana::Dynamics::PhysicalBodyParams#

Struct with parameters for a modal deformable body

Public Functions

PhysicalModalBodyParams(km::SpatialInertia sp_i = km::SpatialInertia(2.0, km::Vec3(0.3, 0.2, 0.1), Eigen::DiagonalMatrix<double, 3>(3, 2, 1)), km::HomTran body_to_joint_transform = km::HomTran(km::UnitQuaternion(.8, .6, 0, 0), km::Vec3(.2, .3, .4)), km::HomTran inb_to_joint_transform = km::HomTran(km::UnitQuaternion(.5, .5, .5, .5), km::Vec3(.4, .2, .3)), PhysicalHingeParams hinge_params = {}, std::vector<ks::ScenePartSpec> scene_part_specs = {}, std::vector<ks::SceneFileObjectSpec> scene_file_object_specs = {}, size_t nmodes = 4, km::Vec stiffness = km::Vec::NullaryExpr(4, 1, [](int i, int j) { return .1 *(i+j+1);}), km::Vec damping = km::Vec::NullaryExpr(4, 1, [](int i, int j) { return .01 *(i+j+1);}), km::Mat pnode_nodal_matrix = km::Mat::NullaryExpr(6, 4, [](int i, int j) { return .1 *(i+j+1);}), km::Mat onode_nodal_matrix = km::Mat::NullaryExpr(6, 4, [](int i, int j) { return .2 *(i+j+1);}))#
Parameters:
  • sp_i – The spatial inertia to assign to each body

  • body_to_joint_transform – The body to joint transform for the bodies

  • inb_to_joint_transform – The inboard body to joint transform for the bodies

  • hinge_params – The data for the body’s hinge

  • scene_part_specs – List of scene part specs for the body

  • scene_file_object_specs – List of scene file object specs for the body

  • nmodes – The number of deformation modes

  • stiffness – The stiffness vector (based on modal frequencies)

  • damping – The damping coefficients

  • pnode_nodal_matrix – The nodal matrix for the pnode

  • onode_nodal_matrix – The nodal matrix for the onode

~PhysicalModalBodyParams()#

Destructor.

inline PhysicalModalBodyParams &operator=(const PhysicalModalBodyParams &p) noexcept#

Assignment operator.

Parameters:

p – the input param

Returns:

the output

Public Members

size_t nmodes = 4#

the number of deformation modes

km::Vec stiffness = km::Vec::NullaryExpr(4, 1, [](int i, int j) {return .1 * (i + j + 1);})#

the stiffness vector (based on modal frequencies)

km::Vec damping = km::Vec::NullaryExpr(4, 1, [](int i, int j) { return .01 * (i + j + 1); })#

the damping coefficients

km::Mat pnode_nodal_matrix = km::Mat::NullaryExpr(6, 4, [](int i, int j) {return .1 * (i + j + 1);})#

the nodal matrix for the pnode

km::Mat onode_nodal_matrix = km::Mat::NullaryExpr(6, 4, [](int i, int j) {return .2 * (i + j + 1);})#

the nodal matrix for the onode