#include <BaseMechanicalMapping.h>


Public Member Functions | |
| virtual | ~BaseMechanicalMapping () |
| virtual BaseMechanicalState * | getMechFrom ()=0 |
| Get the source (upper) model. | |
| virtual BaseMechanicalState * | getMechTo ()=0 |
| Get the destination (lower, mapped) model. | |
| virtual bool | isMechanical ()=0 |
| Return false if this mapping should only be used as a regular mapping instead of a mechanical mapping. | |
| virtual bool | sameTopology () const |
| Return true if the destination model has the same topology as the source model. | |
| virtual void | propagateX ()=0 |
| Propagate position from the source model to the destination model. | |
| virtual void | propagateXfree ()=0 |
| Propagate free-motion position from the source model to the destination model. | |
| virtual void | propagateV ()=0 |
| Propagate velocity from the source model to the destination model. | |
| virtual void | propagateDx () |
| Propagate displacement from the source model to the destination model. | |
| virtual void | accumulateForce () |
| Accumulate forces from the destination model back to the source model. | |
| virtual void | accumulateDf () |
| Accumulate force deltas from the destination model back to the source model. | |
| virtual void | accumulateConstraint () |
| Accumulate constraint from the destination model back to the source model. | |
| virtual void | disable () |
| Disable the mapping to get the original coordinates of the mapped model. | |
A MechanicalMapping is a mapping between two MechanicalState. Position, velocity and displacement are propagated from the source (upper) model to the destination (lower, or mapped) model, while forces and constraints are accumulated back from the destination model to the source model.
If the mapping is linear, then it can be represented by a matrix J, and most computations correspond to multiply this matrix or its transpose to the given vectors.
Definition at line 64 of file BaseMechanicalMapping.h.
| virtual sofa::core::componentmodel::behavior::BaseMechanicalMapping::~BaseMechanicalMapping | ( | ) | [inline, virtual] |
Definition at line 67 of file BaseMechanicalMapping.h.
| virtual void sofa::core::componentmodel::behavior::BaseMechanicalMapping::accumulateConstraint | ( | ) | [inline, virtual] |
Accumulate constraint from the destination model back to the source model.
If the MechanicalMapping can be represented as a matrix J, this method computes $ C_in += J^t C_out $
Reimplemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >.
Definition at line 122 of file BaseMechanicalMapping.h.
Referenced by sofa::simulation::MechanicalAccumulateConstraint::bwdMechanicalMapping().
| virtual void sofa::core::componentmodel::behavior::BaseMechanicalMapping::accumulateDf | ( | ) | [inline, virtual] |
Accumulate force deltas from the destination model back to the source model.
If the MechanicalMapping can be represented as a matrix J, this method computes $ df_in += J^t df_out $
Reimplemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >.
Definition at line 116 of file BaseMechanicalMapping.h.
Referenced by sofa::simulation::MechanicalAddMBKdxVisitor::bwdMechanicalMapping(), and sofa::simulation::MechanicalComputeDfVisitor::bwdMechanicalMapping().
| virtual void sofa::core::componentmodel::behavior::BaseMechanicalMapping::accumulateForce | ( | ) | [inline, virtual] |
Accumulate forces from the destination model back to the source model.
If the MechanicalMapping can be represented as a matrix J, this method computes $ f_in += J^t f_out $
Reimplemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >.
Definition at line 110 of file BaseMechanicalMapping.h.
Referenced by sofa::simulation::MechanicalAddMDxVisitor::bwdMechanicalMapping(), sofa::simulation::MechanicalComputeContactForceVisitor::bwdMechanicalMapping(), and sofa::simulation::MechanicalComputeForceVisitor::bwdMechanicalMapping().
| virtual void sofa::core::componentmodel::behavior::BaseMechanicalMapping::disable | ( | ) | [inline, virtual] |
Disable the mapping to get the original coordinates of the mapped model.
It is for instance used in RigidMapping to get the local coordinates of the object.
Reimplemented in sofa::component::mapping::VoidMapping.
Definition at line 127 of file BaseMechanicalMapping.h.
| virtual BaseMechanicalState* sofa::core::componentmodel::behavior::BaseMechanicalMapping::getMechFrom | ( | ) | [pure virtual] |
Get the source (upper) model.
Implemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >, and sofa::component::mapping::VoidMapping.
| virtual BaseMechanicalState* sofa::core::componentmodel::behavior::BaseMechanicalMapping::getMechTo | ( | ) | [pure virtual] |
Get the destination (lower, mapped) model.
Implemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >, and sofa::component::mapping::VoidMapping.
| virtual bool sofa::core::componentmodel::behavior::BaseMechanicalMapping::isMechanical | ( | ) | [pure virtual] |
Return false if this mapping should only be used as a regular mapping instead of a mechanical mapping.
Implemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >, and sofa::component::mapping::VoidMapping.
Referenced by sofa::simulation::UpdateMappingVisitor::processMechanicalMapping().
| virtual void sofa::core::componentmodel::behavior::BaseMechanicalMapping::propagateDx | ( | ) | [inline, virtual] |
Propagate displacement from the source model to the destination model.
If the MechanicalMapping can be represented as a matrix J, this method computes $ dx_out = J dx_in $
Reimplemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >.
Definition at line 104 of file BaseMechanicalMapping.h.
Referenced by sofa::simulation::MechanicalAddMDxVisitor::fwdMechanicalMapping(), sofa::simulation::MechanicalPropagateAndAddDxVisitor::fwdMechanicalMapping(), sofa::simulation::MechanicalPropagateDxAndResetForceVisitor::fwdMechanicalMapping(), and sofa::simulation::MechanicalPropagateDxVisitor::fwdMechanicalMapping().
| virtual void sofa::core::componentmodel::behavior::BaseMechanicalMapping::propagateV | ( | ) | [pure virtual] |
Propagate velocity from the source model to the destination model.
If the MechanicalMapping can be represented as a matrix J, this method computes $ v_out = J v_in $
Implemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >, and sofa::component::mapping::VoidMapping.
Referenced by sofa::simulation::MechanicalPropagatePositionAndVelocityVisitor::fwdMechanicalMapping(), and sofa::simulation::UpdateMappingVisitor::processMechanicalMapping().
| virtual void sofa::core::componentmodel::behavior::BaseMechanicalMapping::propagateX | ( | ) | [pure virtual] |
Propagate position from the source model to the destination model.
If the MechanicalMapping can be represented as a matrix J, this method computes $ x_out = J x_in $
Implemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >, and sofa::component::mapping::VoidMapping.
Referenced by sofa::simulation::MechanicalPropagatePositionAndVelocityVisitor::fwdMechanicalMapping(), and sofa::simulation::UpdateMappingVisitor::processMechanicalMapping().
| virtual void sofa::core::componentmodel::behavior::BaseMechanicalMapping::propagateXfree | ( | ) | [pure virtual] |
Propagate free-motion position from the source model to the destination model.
If the MechanicalMapping can be represented as a matrix J, this method computes $ xfree_out = J xfree_in $
Implemented in sofa::core::componentmodel::behavior::MechanicalMapping< In, Out >, and sofa::component::mapping::VoidMapping.
Referenced by sofa::simulation::MechanicalPropagateFreePositionVisitor::fwdMechanicalMapping().
| virtual bool sofa::core::componentmodel::behavior::BaseMechanicalMapping::sameTopology | ( | ) | const [inline, virtual] |
Return true if the destination model has the same topology as the source model.
This is the case for mapping keeping a one-to-one correspondance between input and output DOFs (mostly identity or data-conversion mappings).
Definition at line 80 of file BaseMechanicalMapping.h.
1.5.7.1