Caribou
Public Member Functions | List of all members
SofaCaribou::visitor::MultiVecEqualVisitor Class Reference

Detailed Description

This visitor is used to compute a = b, where a and b are multi-vectors (MultiVecDeriv or MultiVecCoord).

The difference between this visitor and the sofa::simulation::MechanicalVOpVisitor is that here, the assignment from a MutliVecCoord to a MultiVecDeriv is allowed.

#include <MultiVecEqualVisitor.h>

Inheritance diagram for SofaCaribou::visitor::MultiVecEqualVisitor:

Public Member Functions

 MultiVecEqualVisitor (const sofa::core::ExecParams *params, sofa::core::TMultiVecId< sofa::core::V_ALL, sofa::core::V_WRITE > a, sofa::core::TMultiVecId< sofa::core::V_ALL, sofa::core::V_READ > b, bool mapped=false, bool only_mapped=false)
 Assign the values of the multi-vector b to the values of a (ie, a := b), no mather the type of a and b (VecDeriv or VecCoord). More...
 
bool stopAtMechanicalMapping (sofa::simulation::Node *, sofa::core::BaseMapping *map) override
 
Result fwdMechanicalState (VisitorContext *ctx, sofa::core::behavior::BaseMechanicalState *mm) override
 
Result fwdMappedMechanicalState (VisitorContext *ctx, sofa::core::behavior::BaseMechanicalState *mm) override
 
void copy (sofa::core::behavior::BaseMechanicalState *state) const
 
const char * getClassName () const override
 
std::string getInfos () const override
 

Constructor & Destructor Documentation

◆ MultiVecEqualVisitor()

SofaCaribou::visitor::MultiVecEqualVisitor::MultiVecEqualVisitor ( const sofa::core::ExecParams *  params,
sofa::core::TMultiVecId< sofa::core::V_ALL, sofa::core::V_WRITE >  a,
sofa::core::TMultiVecId< sofa::core::V_ALL, sofa::core::V_READ >  b,
bool  mapped = false,
bool  only_mapped = false 
)
inline

Assign the values of the multi-vector b to the values of a (ie, a := b), no mather the type of a and b (VecDeriv or VecCoord).

Parameters
paramsThe current execution parameters
aThe multi-vector a
bThe multi-vector b
mappedIf true, the values of the vectors from mapped mechanical objects are also copied.
only_mappedIf try, only the values of the vectors from mapped mechanical objects are copied.

The documentation for this class was generated from the following files: