sofa::component::misc::CompareState Class Reference

Compare State vectors from file at each timestep. More...

#include <CompareState.h>

Inheritance diagram for sofa::component::misc::CompareState:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::misc::CompareState:

Collaboration graph
[legend]

Public Member Functions

 CompareState ()
 Default constructor.
void handleEvent (sofa::core::objectmodel::Event *event)
 Handle an event.
void processCompareState ()
 Compute the total errors (positions and velocities).
double getError ()
 Return the total errors (position and velocity).

Static Public Member Functions

template<class T >
static bool canCreate (T *&obj, core::objectmodel::BaseContext *context, core::objectmodel::BaseObjectDescription *arg)
 Pre-construction check method called by ObjectFactory.

Protected Attributes

double totalError_X
 total error for positions
double totalError_V
 total error for velocities

Detailed Description

Compare State vectors from file at each timestep.

Definition at line 47 of file CompareState.h.


Constructor & Destructor Documentation

sofa::component::misc::CompareState::CompareState (  ) 

Default constructor.

Definition at line 50 of file CompareState.cpp.

References totalError_V, and totalError_X.


Member Function Documentation

template<class T >
static bool sofa::component::misc::CompareState::canCreate ( T *&  obj,
core::objectmodel::BaseContext *  context,
core::objectmodel::BaseObjectDescription *  arg 
) [inline, static]

Pre-construction check method called by ObjectFactory.

Check that DataTypes matches the MechanicalState.

Reimplemented from sofa::component::misc::ReadState.

Definition at line 63 of file CompareState.h.

References sofa::core::objectmodel::BaseContext::getMechanicalState().

double sofa::component::misc::CompareState::getError (  )  [inline]

Return the total errors (position and velocity).

Definition at line 71 of file CompareState.h.

References totalError_V, and totalError_X.

Referenced by sofa::component::misc::CompareStateResult::processNodeTopDown().

void sofa::component::misc::CompareState::handleEvent ( sofa::core::objectmodel::Event *  e  )  [virtual]

Handle an event.

Reimplemented from sofa::component::misc::ReadState.

Definition at line 58 of file CompareState.cpp.

References processCompareState().

void sofa::component::misc::CompareState::processCompareState (  ) 


Field Documentation

total error for velocities

Definition at line 78 of file CompareState.h.

Referenced by CompareState(), getError(), and processCompareState().

total error for positions

Definition at line 76 of file CompareState.h.

Referenced by CompareState(), getError(), and processCompareState().


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

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