sofa::simulation::MechanicalMatrixVisitor Class Reference

Base class for easily creating new actions for mechanical matrix manipulation. More...

#include <MechanicalMatrixVisitor.h>

Inheritance diagram for sofa::simulation::MechanicalMatrixVisitor:

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

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.

Data Fields

unsigned int offsetOnEnter
unsigned int offsetOnExit

Detailed Description

Base class for easily creating new actions for mechanical matrix manipulation.

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 MechanicalMatrixVisitor.h.


Member Typedef Documentation

Definition at line 67 of file MechanicalMatrixVisitor.h.


Member Function Documentation

virtual void sofa::simulation::MechanicalMatrixVisitor::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 MechanicalMatrixVisitor.h.

Referenced by processNodeBottomUp().

virtual void sofa::simulation::MechanicalMatrixVisitor::bwdMechanicalMapping ( simulation::Node *  ,
core::componentmodel::behavior::BaseMechanicalMapping *   
) [inline, virtual]

Process the BaseMechanicalMapping.

Definition at line 158 of file MechanicalMatrixVisitor.h.

Referenced by processNodeBottomUp().

virtual void sofa::simulation::MechanicalMatrixVisitor::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 MechanicalMatrixVisitor.h.

Referenced by processNodeBottomUp().

virtual void sofa::simulation::MechanicalMatrixVisitor::bwdOdeSolver ( simulation::Node *  ,
core::componentmodel::behavior::OdeSolver *   
) [inline, virtual]

Process the OdeSolver.

Definition at line 162 of file MechanicalMatrixVisitor.h.

Referenced by processNodeBottomUp().

virtual Result sofa::simulation::MechanicalMatrixVisitor::fwdConstraint ( simulation::Node *  ,
core::componentmodel::behavior::BaseConstraint *   
) [inline, virtual]

Process all the BaseConstraint.

Reimplemented in sofa::simulation::MechanicalAddMBK_ToMatrixVisitor.

Definition at line 124 of file MechanicalMatrixVisitor.h.

References sofa::simulation::Visitor::RESULT_CONTINUE.

Referenced by fwdInteractionConstraint(), and processNodeTopDown().

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

Process all the BaseForceField.

Reimplemented in sofa::simulation::MechanicalAddMBK_ToMatrixVisitor.

Definition at line 111 of file MechanicalMatrixVisitor.h.

References sofa::simulation::Visitor::RESULT_CONTINUE.

Referenced by fwdInteractionForceField(), and processNodeTopDown().

virtual Result sofa::simulation::MechanicalMatrixVisitor::fwdInteractionConstraint ( simulation::Node *  node,
core::componentmodel::behavior::InteractionConstraint *  c 
) [inline, virtual]

Process all the InteractionConstraint.

Definition at line 130 of file MechanicalMatrixVisitor.h.

References fwdConstraint().

virtual Result sofa::simulation::MechanicalMatrixVisitor::fwdInteractionForceField ( simulation::Node *  node,
core::componentmodel::behavior::InteractionForceField *  ff 
) [inline, virtual]

Process all the InteractionForceField.

Definition at line 118 of file MechanicalMatrixVisitor.h.

References fwdForceField().

Referenced by processNodeTopDown().

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

Process the BaseMechanicalState if it is mapped from the parent level.

Definition at line 93 of file MechanicalMatrixVisitor.h.

References sofa::simulation::Visitor::RESULT_PRUNE.

Referenced by processNodeTopDown().

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

Process the BaseMass.

Definition at line 105 of file MechanicalMatrixVisitor.h.

References sofa::simulation::Visitor::RESULT_CONTINUE.

Referenced by processNodeTopDown().

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

Process the BaseMechanicalMapping.

Definition at line 87 of file MechanicalMatrixVisitor.h.

References sofa::simulation::Visitor::RESULT_CONTINUE.

Referenced by processNodeTopDown().

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

virtual Result sofa::simulation::MechanicalMatrixVisitor::fwdOdeSolver ( simulation::Node *  ,
core::componentmodel::behavior::OdeSolver *   
) [inline, virtual]

Process the OdeSolver.

Definition at line 81 of file MechanicalMatrixVisitor.h.

References sofa::simulation::Visitor::RESULT_CONTINUE.

Referenced by processNodeTopDown().

virtual const char* sofa::simulation::MechanicalMatrixVisitor::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 170 of file MechanicalMatrixVisitor.h.

void sofa::simulation::MechanicalMatrixVisitor::processNodeBottomUp ( simulation::Node *  node  )  [virtual]

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


Field Documentation


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

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