|
BeamAdapter
|
AdaptiveBeamForceFieldAndMass Class. More...
#include <AdaptiveBeamForceFieldAndMass.h>
Classes | |
| class | BeamLocalMatrices |
| BeamLocalMatrices Class. More... | |
Public Types | |
| using | Coord = typename DataTypes::Coord |
| using | VecCoord = typename DataTypes::VecCoord |
| using | Real = typename Coord::value_type |
| using | Deriv = typename DataTypes::Deriv |
| using | VecDeriv = typename DataTypes::VecDeriv |
| using | DataVecCoord = Data<VecCoord> |
| using | DataVecDeriv = Data<VecDeriv> |
| using | Vec3 = sofa::type::Vec<3, Real> |
| using | Vec6 = sofa::type::Vec<6, Real> |
| using | Vec6NoInit = sofa::type::VecNoInit<6, Real> |
| using | Matrix6x6 = sofa::type::Mat<6, 6, Real> |
| using | Matrix6x6NoInit = sofa::type::MatNoInit<6, 6, Real> |
| using | Transform = sofa::type::Transform<Real> |
| using | SpatialVector = sofa::type::SpatialVector<Real> |
| using | BInterpolation = BaseBeamInterpolation<DataTypes> |
Public Member Functions | |
| SOFA_CLASS (SOFA_TEMPLATE(AdaptiveBeamForceFieldAndMass, DataTypes), SOFA_TEMPLATE(core::behavior::Mass, DataTypes)) | |
| void | init () override |
| This is inhereted from BaseComponent. | |
| void | reinit () override |
| void | draw (const sofa::core::visual::VisualParams *vparams) override |
| Visualization. | |
| void | addMDx (const sofa::core::MechanicalParams *mparams, DataVecDeriv &f, const DataVecDeriv &dx, SReal factor) override |
| Mass Interface. | |
| void | addMToMatrix (const sofa::core::MechanicalParams *mparams, const sofa::core::behavior::MultiMatrixAccessor *matrix) override |
| void | addMBKToMatrix (const sofa::core::MechanicalParams *mparams, const sofa::core::behavior::MultiMatrixAccessor *matrix) override |
| void | buildMassMatrix (sofa::core::behavior::MassMatrixAccumulator *matrices) override |
| void | buildStiffnessMatrix (core::behavior::StiffnessMatrix *matrix) override |
| void | buildDampingMatrix (core::behavior::DampingMatrix *matrices) override |
| void | accFromF (const sofa::core::MechanicalParams *mparams, DataVecDeriv &, const DataVecDeriv &) override |
| SReal | getKineticEnergy (const sofa::core::MechanicalParams *mparams, const DataVecDeriv &) const override |
| < vMv/2 using dof->getV() | |
| void | addGravityToV (const sofa::core::MechanicalParams *mparams, DataVecDeriv &) override |
| bool | isDiagonal () const override |
| void | addForce (const sofa::core::MechanicalParams *mparams, DataVecDeriv &f, const DataVecCoord &x, const DataVecDeriv &v) override |
| ForceField Interface. | |
| void | addDForce (const sofa::core::MechanicalParams *mparams, DataVecDeriv &datadF, const DataVecDeriv &datadX) override |
| SReal | getPotentialEnergy (const sofa::core::MechanicalParams *mparams, const DataVecCoord &) const override |
| void | addKToMatrix (const sofa::core::MechanicalParams *mparams, const sofa::core::behavior::MultiMatrixAccessor *matrix) override |
| void | computeStiffness (const sofa::Index beamID, BeamLocalMatrices &beamLocalMatrices) |
| void | computeMass (const sofa::Index beamID, BeamLocalMatrices &beamMatrices) |
Protected Member Functions | |
| void | applyMassLarge (VecDeriv &df, const VecDeriv &dx, const sofa::Index beamID, const sofa::Index nd0Id, const sofa::Index nd1Id, const SReal factor) |
| void | applyGravityLarge (VecDeriv &df, const sofa::Index beamID, const sofa::Index nd0Id, const sofa::Index nd1Id, const SReal factor) |
| void | applyStiffnessLarge (VecDeriv &df, const VecDeriv &dx, const sofa::Index beamID, const sofa::Index nd0Id, const sofa::Index nd1Id, const SReal factor) |
| void | computeGravityVector () |
Protected Attributes | |
| SingleLink< AdaptiveBeamForceFieldAndMass< DataTypes >, BInterpolation, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK > | l_interpolation |
AdaptiveBeamForceFieldAndMass Class.
More informations about SOFA components: https://www.sofa-framework.org/community/doc/programming-with-sofa/create-your-component/ https://www.sofa-framework.org/community/doc/programming-with-sofa/components-api/components-and-datas/
|
override |
ForceField Interface.
TODO:
find the indices of the nodes
find the beamMatrices:
compute Adjoint Matrices:
Update Interpolation & geometrical parameters with current positions
material parameters
compute the local mass matrices
IF RIGIDIFICATION: no stiffness forces:
compute the local stiffness matrices
COMPUTATION OF THE STIFFNESS FORCE compute the current local displacement of the beam (6dofs)
TEST ////////////////////// test: correction due to spline computation;
compute the force in the local frame:
compute the force in the global frame
Add this force to vector f
add the gravity force M*g directly using m_gravity:
|
override |
matrices in global frame
|
protected |
gravity acceleration expressed in the beam local frame
gravity force in local frame
force in global frame
put the result in df
|
protected |
Real mass-vector product: df += factor * M * dx (in the beam local frame).
displacement in local frame
inertial force in local frame
force in global frame
put the result in df
|
protected |
Return in case of rigidification
displacement in local frame
internal force in local frame
force in global frame
put the result in df
|
override |
matrices in global frame
| void computeMass | ( | const sofa::Index | beamID, |
| BeamLocalMatrices & | beamMatrices ) |
diagonal values
diagonal blocks
lower non-diagonal blocks
Make a symetric matrix with diagonal blocks
upper non-diagonal block : set k_loc10 as the transposed matrix of k_loc01
| void computeStiffness | ( | const sofa::Index | beamID, |
| BeamLocalMatrices & | beamLocalMatrices ) |
material parameters
Find shear-deformation parameters
diagonal values
diagonal blocks
lower non-diagonal blocks
Make a symetric matrix with diagonal blocks
upper non-diagonal block : set k_loc10 as the transposed matrix of k_loc01
|
override |
Visualization.
rigidification case