sofa::simulation::MechanicalVisitor Class Reference

Base class for easily creating new actions for mechanical simulation. More...

#include <MechanicalVisitor.h>

Inheritance diagram for sofa::simulation::MechanicalVisitor:

Inheritance graph
[legend]
Collaboration diagram for sofa::simulation::MechanicalVisitor:

Collaboration graph
[legend]

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.

Detailed Description

Base class for easily creating new actions for mechanical simulation.

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.


Member Typedef Documentation

Definition at line 67 of file MechanicalVisitor.h.


Member Function Documentation

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]

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]

virtual Result sofa::simulation::MechanicalVisitor::fwdForceField ( simulation::Node *  ,
core::componentmodel::behavior::BaseForceField *   
) [inline, virtual]

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]

virtual Result sofa::simulation::MechanicalVisitor::fwdMass ( simulation::Node *  ,
core::componentmodel::behavior::BaseMass *   
) [inline, virtual]

virtual Result sofa::simulation::MechanicalVisitor::fwdMechanicalMapping ( simulation::Node *  ,
core::componentmodel::behavior::BaseMechanicalMapping *   
) [inline, virtual]

virtual Result sofa::simulation::MechanicalVisitor::fwdMechanicalState ( simulation::Node *  ,
core::componentmodel::behavior::BaseMechanicalState *   
) [inline, virtual]

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]

Visitor::Result sofa::simulation::MechanicalVisitor::processNodeTopDown ( simulation::Node *  node  )  [virtual]


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

Generated on Sun Nov 23 04:24:25 2008 for Sofa by  doxygen 1.5.7.1