#include <MechanicalParams.h>
Class gathering parameters use by mechanical components methods, and transmitted by mechanical visitors. More...
Class gathering parameters use by mechanical components methods, and transmitted by mechanical visitors.
Protected Attributes | |
SReal | m_dt |
Time step. More... | |
bool | m_implicit |
Is the time integration scheme implicit ? More... | |
bool | m_energy |
Should the kinematic and potential energies be computed ? More... | |
ConstMultiVecCoordId | m_x |
Ids of position vector. More... | |
ConstMultiVecDerivId | m_v |
Ids of velocity vector. More... | |
ConstMultiVecDerivId | m_f |
Ids of force vector. More... | |
ConstMultiVecDerivId | m_dx |
Ids of dx vector (for implicit schemes) More... | |
ConstMultiVecDerivId | m_df |
Ids of df vector (for implicit schemes) More... | |
SReal | m_mFactor |
Mass matrix contributions factor (for implicit schemes) More... | |
SReal | m_bFactor |
Damping matrix contributions factor (for implicit schemes) More... | |
SReal | m_kFactor |
Stiffness matrix contributions factor (for implicit schemes) More... | |
bool | m_supportOnlySymmetricMatrix |
True if a symmetric matrix is assumed in the left-hand term of the dynamics equations, for solvers specialized on symmetric matrices. More... | |
Public Member Functions | |
bool | symmetricMatrix () const =delete |
bool | supportOnlySymmetricMatrix () const |
Symmetric matrix flag, for solvers specialized on symmetric matrices. More... | |
bool | energy () const |
Should the kinematic and potential energies be computed ? More... | |
MechanicalParams (const sofa::core::ExecParams &p=sofa::core::ExecParams()) | |
Constructor, initializing all VecIds to default values, implicit and energy flags to false. More... | |
MechanicalParams (const MechanicalParams &mparams) | |
Copy Constructor. More... | |
MechanicalParams * | setExecParams (const core::ExecParams *params) |
MechanicalParams * | operator= (const MechanicalParams &mparams) |
Flags and parameters getters | |
SReal | dt () const |
Time step. More... | |
bool | implicit () const |
Is the time integration scheme implicit ? More... | |
SReal | mFactor () const |
Mass matrix contributions factor (for implicit schemes) More... | |
SReal | bFactor () const |
Damping matrix contributions factor (for implicit schemes) More... | |
SReal | kFactor () const |
Stiffness matrix contributions factor (for implicit schemes) More... | |
Rayleigh Damping D = rayleighStiffness*K - rayleighMass*M | |
SReal | kFactorIncludingRayleighDamping (SReal rayleighStiffness) const |
SReal | mFactorIncludingRayleighDamping (SReal rayleighMass) const |
Access to vectors from a given state container (i.e. State or MechanicalState) | |
template<class S > | |
const Data< typename S::VecCoord > * | readX (const S *state) const |
Read access to current position vector. More... | |
template<class S > | |
const Data< typename S::VecDeriv > * | readV (const S *state) const |
Read access to current velocity vector. More... | |
template<class S > | |
const Data< typename S::VecDeriv > * | readF (const S *state) const |
Read access to current force vector. More... | |
template<class S > | |
const Data< typename S::VecDeriv > * | readDx (const S *state) const |
Read access to current dx vector (for implicit schemes) More... | |
template<class S > | |
const Data< typename S::VecDeriv > * | readDf (const S *state) const |
Read access to current df vector (for implicit schemes) More... | |
Public Member Functions inherited from sofa::core::ExecParams | |
bool | checkValidStorage () const |
ExecMode | execMode () const |
Mode of execution requested. More... | |
int | threadID () const |
Index of current thread (0 corresponding to the only thread in sequential mode, or first thread in parallel mode) More... | |
int | nbThreads () const |
Number of threads currently known to Sofa. More... | |
ExecParams () | |
void | update () |
Make sure this instance is up-to-date relative to the current thread. More... | |
ExecParams & | setExecMode (ExecMode v) |
Request a specific mode of execution. More... | |
ExecParams & | setThreadID (int v) |
Specify the index of the current thread. More... | |
Static Public Member Functions | |
static const MechanicalParams * | defaultInstance () |
Get the default MechanicalParams, to be used to provide a default values for method parameters. More... | |
Static Public Member Functions inherited from sofa::core::ExecParams | |
static ExecParams * | defaultInstance () |
Get the default ExecParams, to be used to provide a default values for method parameters. More... | |
Setup methods | |
Called by the OdeSolver from which the mechanical computations originate. They all return a reference to this MechanicalParam instance, to ease chaining multiple setup calls. | |
bool | m_kFactorUsed |
Checks if the stiffness matrix contributions factor has been accessed. More... | |
MechanicalParams & | setDt (SReal v) |
Set time step. More... | |
MechanicalParams & | setImplicit (bool v) |
Specify if the time integration scheme is implicit. More... | |
MechanicalParams & | setMFactor (SReal v) |
Set Mass matrix contributions factor (for implicit schemes) More... | |
MechanicalParams & | setBFactor (SReal v) |
Set Damping matrix contributions factor (for implicit schemes) More... | |
MechanicalParams & | setKFactor (SReal v) |
Set Stiffness matrix contributions factor (for implicit schemes) More... | |
MechanicalParams & | setSymmetricMatrix (bool b)=delete |
MechanicalParams & | setSupportOnlySymmetricMatrix (bool b) |
Set the flag (for implicit schemes) specifying if solvers are only specialized for symmetric matrices. More... | |
void | setKFactorUsed (bool b) const |
Checks wether or nor kFactor is used in ForceFields. Temporary here for compatibility reasons. More... | |
bool | getKFactorUsed () const |
MechanicalParams & | setEnergy (bool v) |
Specify if the potential and kinematic energies should be computed ? More... | |
const ConstMultiVecCoordId & | x () const |
ConstMultiVecCoordId & | x () |
const ConstMultiVecDerivId & | v () const |
ConstMultiVecDerivId & | v () |
const ConstMultiVecDerivId & | f () const |
ConstMultiVecDerivId & | f () |
const ConstMultiVecDerivId & | dx () const |
ConstMultiVecDerivId & | dx () |
const ConstMultiVecDerivId & | df () const |
ConstMultiVecDerivId & | df () |
MechanicalParams & | setX (ConstVecCoordId v) |
Set the IDs of position vector. More... | |
MechanicalParams & | setX (ConstMultiVecCoordId v) |
template<class StateSet > | |
MechanicalParams & | setX (const StateSet &g, ConstVecCoordId v) |
MechanicalParams & | setV (ConstVecDerivId v) |
Set the IDs of velocity vector. More... | |
MechanicalParams & | setV (ConstMultiVecDerivId v) |
template<class StateSet > | |
MechanicalParams & | setV (const StateSet &g, ConstVecDerivId v) |
MechanicalParams & | setF (ConstVecDerivId v) |
Set the IDs of force vector. More... | |
MechanicalParams & | setF (ConstMultiVecDerivId v) |
template<class StateSet > | |
MechanicalParams & | setF (const StateSet &g, ConstVecDerivId v) |
MechanicalParams & | setDx (ConstVecDerivId v) |
Set the IDs of dx vector (for implicit schemes) More... | |
MechanicalParams & | setDx (ConstMultiVecDerivId v) |
template<class StateSet > | |
MechanicalParams & | setDx (const StateSet &g, ConstVecDerivId v) |
MechanicalParams & | setDf (ConstVecDerivId v) |
Set the IDs of df vector (for implicit schemes) More... | |
MechanicalParams & | setDf (ConstMultiVecDerivId v) |
template<class StateSet > | |
MechanicalParams & | setDf (const StateSet &g, ConstVecDerivId v) |
Experimental compliance API | |
SReal | m_implicitVelocity |
ratio of future and current force used for velocity update (1 is fully implicit, 0 is fully explicit) More... | |
SReal | m_implicitPosition |
ratio of future and current velocity used for position update (1 is fully implicit, 0 is fully explicit) More... | |
void | setImplicitVelocity (SReal i) |
const SReal & | implicitVelocity () const |
void | setImplicitPosition (SReal i) |
const SReal & | implicitPosition () const |
|
protected |
Damping matrix contributions factor (for implicit schemes)
|
protected |
Ids of df vector (for implicit schemes)
|
protected |
Time step.
|
protected |
Ids of dx vector (for implicit schemes)
|
protected |
Should the kinematic and potential energies be computed ?
|
protected |
Ids of force vector.
|
protected |
Is the time integration scheme implicit ?
|
protected |
ratio of future and current velocity used for position update (1 is fully implicit, 0 is fully explicit)
|
protected |
ratio of future and current force used for velocity update (1 is fully implicit, 0 is fully explicit)
|
protected |
Stiffness matrix contributions factor (for implicit schemes)
|
mutableprotected |
Checks if the stiffness matrix contributions factor has been accessed.
|
protected |
Mass matrix contributions factor (for implicit schemes)
|
protected |
True if a symmetric matrix is assumed in the left-hand term of the dynamics equations, for solvers specialized on symmetric matrices.
|
protected |
Ids of velocity vector.
|
protected |
Ids of position vector.
sofa::core::MechanicalParams::MechanicalParams | ( | const sofa::core::ExecParams & | p = sofa::core::ExecParams() | ) |
Constructor, initializing all VecIds to default values, implicit and energy flags to false.
sofa::core::MechanicalParams::MechanicalParams | ( | const MechanicalParams & | mparams | ) |
Copy Constructor.
|
inline |
Damping matrix contributions factor (for implicit schemes)
|
static |
Get the default MechanicalParams, to be used to provide a default values for method parameters.
|
inline |
|
inline |
|
inline |
Time step.
|
inline |
|
inline |
|
inline |
Should the kinematic and potential energies be computed ?
|
inline |
|
inline |
|
inline |
|
inline |
Is the time integration scheme implicit ?
|
inline |
|
inline |
|
inline |
Stiffness matrix contributions factor (for implicit schemes)
|
inline |
|
inline |
Mass matrix contributions factor (for implicit schemes)
|
inline |
MechanicalParams * sofa::core::MechanicalParams::operator= | ( | const MechanicalParams & | mparams | ) |
|
inline |
Read access to current df vector (for implicit schemes)
|
inline |
Read access to current dx vector (for implicit schemes)
|
inline |
Read access to current force vector.
|
inline |
Read access to current velocity vector.
|
inline |
Read access to current position vector.
|
inline |
Set Damping matrix contributions factor (for implicit schemes)
|
inline |
|
inline |
|
inline |
Set the IDs of df vector (for implicit schemes)
|
inline |
Set time step.
|
inline |
|
inline |
|
inline |
Set the IDs of dx vector (for implicit schemes)
|
inline |
Specify if the potential and kinematic energies should be computed ?
MechanicalParams * sofa::core::MechanicalParams::setExecParams | ( | const core::ExecParams * | params | ) |
|
inline |
|
inline |
|
inline |
Set the IDs of force vector.
|
inline |
Specify if the time integration scheme is implicit.
|
inline |
|
inline |
|
inline |
Set Stiffness matrix contributions factor (for implicit schemes)
|
inline |
Checks wether or nor kFactor is used in ForceFields. Temporary here for compatibility reasons.
|
inline |
Set Mass matrix contributions factor (for implicit schemes)
|
inline |
Set the flag (for implicit schemes) specifying if solvers are only specialized for symmetric matrices.
|
delete |
|
inline |
|
inline |
|
inline |
Set the IDs of velocity vector.
|
inline |
|
inline |
|
inline |
Set the IDs of position vector.
|
inline |
Symmetric matrix flag, for solvers specialized on symmetric matrices.
|
delete |
|
inline |
|
inline |
|
inline |
|
inline |