#include <MechanicalVisitor.h>


Public Types | |
| typedef sofa::core::componentmodel::behavior::BaseMechanicalState::VecId | VecId |
Public Member Functions | |
| virtual const char * | getCategoryName () const |
| Return a category name for this action. | |
Forward processing | |
Methods called during the forward (top-down) traversal of the data structure.
Method processNodeTopDown(simulation::Node*) calls the fwd* methods in the order given here. When there is a mapping, it is processed first, then method fwdMappedMechanicalState is applied to the BaseMechanicalState. When there is no mapping, the BaseMechanicalState is processed first using method fwdMechanicalState. Then, the other fwd* methods are applied in the given order. | |
| virtual Result | processNodeTopDown (simulation::Node *node) |
| This method calls the fwd* methods during the forward traversal. You typically do not overload it. | |
| virtual Result | fwdOdeSolver (simulation::Node *, core::componentmodel::behavior::OdeSolver *) |
| Process the OdeSolver. | |
| virtual Result | fwdMechanicalMapping (simulation::Node *, core::componentmodel::behavior::BaseMechanicalMapping *) |
| Process the BaseMechanicalMapping. | |
| virtual Result | fwdMappedMechanicalState (simulation::Node *, core::componentmodel::behavior::BaseMechanicalState *) |
| Process the BaseMechanicalState if it is mapped from the parent level. | |
| virtual Result | fwdMechanicalState (simulation::Node *, core::componentmodel::behavior::BaseMechanicalState *) |
| Process the BaseMechanicalState if it is not mapped from the parent level. | |
| virtual Result | fwdMass (simulation::Node *, core::componentmodel::behavior::BaseMass *) |
| Process the BaseMass. | |
| virtual Result | fwdForceField (simulation::Node *, core::componentmodel::behavior::BaseForceField *) |
| Process all the BaseForceField. | |
| virtual Result | fwdInteractionForceField (simulation::Node *node, core::componentmodel::behavior::InteractionForceField *ff) |
| Process all the InteractionForceField. | |
| virtual Result | fwdConstraint (simulation::Node *, core::componentmodel::behavior::BaseConstraint *) |
| Process all the BaseConstraint. | |
| virtual Result | fwdInteractionConstraint (simulation::Node *node, core::componentmodel::behavior::InteractionConstraint *c) |
| Process all the InteractionConstraint. | |
Backward processing | |
Methods called during the backward (bottom-up) traversal of the data structure.
Method processNodeBottomUp(simulation::Node*) calls the bwd* methods. When there is a mapping, method bwdMappedMechanicalState is applied to the BaseMechanicalState. When there is no mapping, the BaseMechanicalState is processed using method bwdMechanicalState. Finally, the mapping (if any) is processed using method bwdMechanicalMapping. | |
| virtual void | processNodeBottomUp (simulation::Node *node) |
| This method calls the bwd* methods during the backward traversal. You typically do not overload it. | |
| virtual void | bwdMechanicalState (simulation::Node *, core::componentmodel::behavior::BaseMechanicalState *) |
| Process the BaseMechanicalState when it is not mapped from parent level. | |
| virtual void | bwdMappedMechanicalState (simulation::Node *, core::componentmodel::behavior::BaseMechanicalState *) |
| Process the BaseMechanicalState when it is mapped from parent level. | |
| virtual void | bwdMechanicalMapping (simulation::Node *, core::componentmodel::behavior::BaseMechanicalMapping *) |
| Process the BaseMechanicalMapping. | |
| virtual void | bwdOdeSolver (simulation::Node *, core::componentmodel::behavior::OdeSolver *) |
| Process the OdeSolver. | |
| virtual void | bwdConstraint (simulation::Node *, core::componentmodel::behavior::BaseConstraint *) |
| Process all the BaseConstraint. | |
During the first traversal (top-down), method processNodeTopDown(simulation::Node*) is applied to each simulation::Node. Each component attached to this node is processed using the appropriate method, prefixed by fwd.
During the second traversal (bottom-up), method processNodeBottomUp(simulation::Node*) is applied to each simulation::Node. Each component attached to this node is processed using the appropriate method, prefixed by bwd.
The default behavior of the fwd* and bwd* is to do nothing. Derived actions typically overload these methods to implement the desired processing.
Definition at line 64 of file MechanicalVisitor.h.
| typedef sofa::core::componentmodel::behavior::BaseMechanicalState::VecId sofa::simulation::MechanicalVisitor::VecId |
Definition at line 67 of file MechanicalVisitor.h.
| virtual void sofa::simulation::MechanicalVisitor::bwdConstraint | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseConstraint * | ||||
| ) | [inline, virtual] |
Process all the BaseConstraint.
Reimplemented in sofa::simulation::MechanicalApplyConstraintsVisitor.
Definition at line 167 of file MechanicalVisitor.h.
Referenced by processNodeBottomUp().
| virtual void sofa::simulation::MechanicalVisitor::bwdMappedMechanicalState | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseMechanicalState * | ||||
| ) | [inline, virtual] |
Process the BaseMechanicalState when it is mapped from parent level.
Definition at line 154 of file MechanicalVisitor.h.
Referenced by processNodeBottomUp().
| virtual void sofa::simulation::MechanicalVisitor::bwdMechanicalMapping | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseMechanicalMapping * | ||||
| ) | [inline, virtual] |
Process the BaseMechanicalMapping.
Reimplemented in sofa::simulation::MechanicalAddMDxVisitor, sofa::simulation::MechanicalComputeForceVisitor, sofa::simulation::MechanicalComputeDfVisitor, sofa::simulation::MechanicalAddMBKdxVisitor, sofa::simulation::MechanicalAccumulateConstraint, and sofa::simulation::MechanicalComputeContactForceVisitor.
Definition at line 158 of file MechanicalVisitor.h.
Referenced by processNodeBottomUp().
| virtual void sofa::simulation::MechanicalVisitor::bwdMechanicalState | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseMechanicalState * | ||||
| ) | [inline, virtual] |
Process the BaseMechanicalState when it is not mapped from parent level.
Definition at line 150 of file MechanicalVisitor.h.
Referenced by processNodeBottomUp().
| virtual void sofa::simulation::MechanicalVisitor::bwdOdeSolver | ( | simulation::Node * | , | |
| core::componentmodel::behavior::OdeSolver * | ||||
| ) | [inline, virtual] |
Process the OdeSolver.
Reimplemented in sofa::simulation::MechanicalIntegrationVisitor.
Definition at line 162 of file MechanicalVisitor.h.
Referenced by processNodeBottomUp().
| virtual Result sofa::simulation::MechanicalVisitor::fwdConstraint | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseConstraint * | ||||
| ) | [inline, virtual] |
Process all the BaseConstraint.
Reimplemented in sofa::component::odesolver::MechanicalGetConstraintValueVisitor, sofa::component::odesolver::MechanicalGetContactIDVisitor, sofa::simulation::MechanicalPropagatePositionAndVelocityVisitor, sofa::simulation::MechanicalPropagateFreePositionVisitor, and sofa::simulation::MechanicalAccumulateConstraint.
Definition at line 124 of file MechanicalVisitor.h.
References sofa::simulation::Visitor::RESULT_CONTINUE.
Referenced by fwdInteractionConstraint(), and processNodeTopDown().
| virtual Result sofa::simulation::MechanicalVisitor::fwdForceField | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseForceField * | ||||
| ) | [inline, virtual] |
Process all the BaseForceField.
Reimplemented in sofa::simulation::MechanicalComputeEnergyVisitor, sofa::simulation::MechanicalComputeForceVisitor, sofa::simulation::MechanicalComputeDfVisitor, and sofa::simulation::MechanicalAddMBKdxVisitor.
Definition at line 111 of file MechanicalVisitor.h.
References sofa::simulation::Visitor::RESULT_CONTINUE.
Referenced by fwdInteractionForceField(), and processNodeTopDown().
| virtual Result sofa::simulation::MechanicalVisitor::fwdInteractionConstraint | ( | simulation::Node * | node, | |
| core::componentmodel::behavior::InteractionConstraint * | c | |||
| ) | [inline, virtual] |
Process all the InteractionConstraint.
Definition at line 130 of file MechanicalVisitor.h.
References fwdConstraint().
| virtual Result sofa::simulation::MechanicalVisitor::fwdInteractionForceField | ( | simulation::Node * | node, | |
| core::componentmodel::behavior::InteractionForceField * | ff | |||
| ) | [inline, virtual] |
Process all the InteractionForceField.
Definition at line 118 of file MechanicalVisitor.h.
References fwdForceField().
Referenced by processNodeTopDown().
| virtual Result sofa::simulation::MechanicalVisitor::fwdMappedMechanicalState | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseMechanicalState * | ||||
| ) | [inline, virtual] |
Process the BaseMechanicalState if it is mapped from the parent level.
Reimplemented in sofa::component::odesolver::MechanicalResetContactForceVisitor, sofa::component::odesolver::MechanicalApplyContactForceVisitor, sofa::simulation::MechanicalVOpVisitor, sofa::simulation::MechanicalVMultiOpVisitor, sofa::simulation::MechanicalPropagateDxAndResetForceVisitor, sofa::simulation::MechanicalPropagateAndAddDxVisitor, sofa::simulation::MechanicalAddMDxVisitor, sofa::simulation::MechanicalResetForceVisitor, sofa::simulation::MechanicalComputeForceVisitor, sofa::simulation::MechanicalComputeDfVisitor, sofa::simulation::MechanicalAddMBKdxVisitor, sofa::simulation::MechanicalResetConstraintVisitor, sofa::simulation::MechanicalApplyConstraintsVisitor, sofa::simulation::MechanicalBeginIntegrationVisitor, sofa::simulation::MechanicalEndIntegrationVisitor, sofa::simulation::MechanicalComputeComplianceVisitor, and sofa::simulation::MechanicalComputeContactForceVisitor.
Definition at line 93 of file MechanicalVisitor.h.
References sofa::simulation::Visitor::RESULT_CONTINUE.
Referenced by processNodeTopDown().
| virtual Result sofa::simulation::MechanicalVisitor::fwdMass | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseMass * | ||||
| ) | [inline, virtual] |
Process the BaseMass.
Reimplemented in sofa::simulation::MechanicalComputeEnergyVisitor, sofa::simulation::MechanicalAddMDxVisitor, sofa::simulation::MechanicalAccFromFVisitor, and sofa::simulation::MechanicalAddSeparateGravityVisitor.
Definition at line 105 of file MechanicalVisitor.h.
References sofa::simulation::Visitor::RESULT_CONTINUE.
Referenced by processNodeTopDown().
| virtual Result sofa::simulation::MechanicalVisitor::fwdMechanicalMapping | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseMechanicalMapping * | ||||
| ) | [inline, virtual] |
Process the BaseMechanicalMapping.
Reimplemented in sofa::simulation::MechanicalPropagateDxVisitor, sofa::simulation::MechanicalPropagateDxAndResetForceVisitor, sofa::simulation::MechanicalPropagateAndAddDxVisitor, sofa::simulation::MechanicalAddMDxVisitor, sofa::simulation::MechanicalPropagatePositionAndVelocityVisitor, and sofa::simulation::MechanicalPropagateFreePositionVisitor.
Definition at line 87 of file MechanicalVisitor.h.
References sofa::simulation::Visitor::RESULT_CONTINUE.
Referenced by processNodeTopDown().
| virtual Result sofa::simulation::MechanicalVisitor::fwdMechanicalState | ( | simulation::Node * | , | |
| core::componentmodel::behavior::BaseMechanicalState * | ||||
| ) | [inline, virtual] |
Process the BaseMechanicalState if it is not mapped from the parent level.
Reimplemented in sofa::component::odesolver::MechanicalResetContactForceVisitor, sofa::component::odesolver::MechanicalApplyContactForceVisitor, sofa::simulation::MechanicalVAvailVisitor, sofa::simulation::MechanicalVAllocVisitor, sofa::simulation::MechanicalVFreeVisitor, sofa::simulation::MechanicalVOpVisitor, sofa::simulation::MechanicalVMultiOpVisitor, sofa::simulation::MechanicalVDotVisitor, sofa::simulation::MechanicalPropagateDxVisitor, sofa::simulation::MechanicalPropagateDxAndResetForceVisitor, sofa::simulation::MechanicalAddMDxVisitor, sofa::simulation::MechanicalAccFromFVisitor, sofa::simulation::MechanicalPropagatePositionAndVelocityVisitor, sofa::simulation::MechanicalPropagateFreePositionVisitor, sofa::simulation::MechanicalResetForceVisitor, sofa::simulation::MechanicalComputeForceVisitor, sofa::simulation::MechanicalComputeDfVisitor, sofa::simulation::MechanicalAddMBKdxVisitor, sofa::simulation::MechanicalResetConstraintVisitor, sofa::simulation::MechanicalApplyConstraintsVisitor, sofa::simulation::MechanicalBeginIntegrationVisitor, sofa::simulation::MechanicalEndIntegrationVisitor, sofa::simulation::MechanicalComputeComplianceVisitor, and sofa::simulation::MechanicalComputeContactForceVisitor.
Definition at line 99 of file MechanicalVisitor.h.
References sofa::simulation::Visitor::RESULT_CONTINUE.
Referenced by processNodeTopDown().
| virtual Result sofa::simulation::MechanicalVisitor::fwdOdeSolver | ( | simulation::Node * | , | |
| core::componentmodel::behavior::OdeSolver * | ||||
| ) | [inline, virtual] |
Process the OdeSolver.
Reimplemented in sofa::simulation::MechanicalIntegrationVisitor.
Definition at line 81 of file MechanicalVisitor.h.
References sofa::simulation::Visitor::RESULT_CONTINUE.
Referenced by processNodeTopDown().
| virtual const char* sofa::simulation::MechanicalVisitor::getCategoryName | ( | ) | const [inline, virtual] |
Return a category name for this action.
Only used for debugging / profiling purposes
Reimplemented from sofa::simulation::Visitor.
Definition at line 175 of file MechanicalVisitor.h.
| void sofa::simulation::MechanicalVisitor::processNodeBottomUp | ( | simulation::Node * | node | ) | [virtual] |
This method calls the bwd* methods during the backward traversal. You typically do not overload it.
Reimplemented from sofa::simulation::Visitor.
Reimplemented in sofa::simulation::MechanicalPropagatePositionAndVelocityVisitor.
Definition at line 95 of file MechanicalVisitor.cpp.
References sofa::simulation::Visitor::begin(), bwdConstraint(), bwdMappedMechanicalState(), bwdMechanicalMapping(), bwdMechanicalState(), bwdOdeSolver(), sofa::simulation::Node::constraint, sofa::simulation::Visitor::end(), sofa::simulation::Visitor::for_each(), sofa::simulation::Node::mechanicalMapping, sofa::simulation::Node::mechanicalState, and sofa::simulation::Node::solver.
| Visitor::Result sofa::simulation::MechanicalVisitor::processNodeTopDown | ( | simulation::Node * | node | ) | [virtual] |
This method calls the fwd* methods during the forward traversal. You typically do not overload it.
Reimplemented from sofa::simulation::Visitor.
Reimplemented in sofa::simulation::MechanicalPropagatePositionAndVelocityVisitor, and sofa::simulation::MechanicalPropagateFreePositionVisitor.
Definition at line 38 of file MechanicalVisitor.cpp.
References sofa::simulation::Visitor::begin(), sofa::simulation::Node::constraint, sofa::simulation::Visitor::end(), sofa::simulation::Visitor::for_each_r(), sofa::simulation::Node::forceField, fwdConstraint(), fwdForceField(), fwdInteractionForceField(), fwdMappedMechanicalState(), fwdMass(), fwdMechanicalMapping(), fwdMechanicalState(), fwdOdeSolver(), sofa::simulation::Node::interactionForceField, sofa::simulation::Node::mass, sofa::simulation::Node::mechanicalMapping, sofa::simulation::Node::mechanicalState, sofa::simulation::Visitor::RESULT_CONTINUE, sofa::simulation::Visitor::RESULT_PRUNE, and sofa::simulation::Node::solver.
1.5.7.1