MBSim

Project Page
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
MBSim::Element Class Reference

basic class of MBSim mainly for plotting More...

#include <element.h>

Inheritance diagram for MBSim::Element:
MBSim::Contour MBSim::DynamicSystem MBSim::Frame MBSim::Link MBSim::Object MBSim::Observer MBSim::ContourContinuum< double > MBSim::ContourContinuum< fmatvec::Vec > MBSim::ContourContinuum< AT > MBSim::ContourInterpolation MBSim::RigidContour MBSim::Graph MBSim::Group MBSim::FixedRelativeFrame MBSim::ExternGeneralizedIO MBSim::LinkMechanics MBSim::Body MBSim::Constraint MBSim::CoordinatesObserver MBSim::FrameObserver MBSim::KinematicsObserver MBSim::RigidBodyGroupObserver MBSim::RigidBodyObserver

List of all members.

Public Types

enum  PlotFeatureStatus { enabled, disabled, unset }
 Plot feature status. More...
enum  PlotFeature {
  plotRecursive = 0, separateFilePerGroup, state, stateDerivative,
  notMinimalState, rightHandSide, globalPosition, globalVelocity,
  globalAcceleration, energy, openMBV, generalizedLinkForce,
  linkKinematics, stopVector, debug, LASTPLOTFEATURE
}
 Plot Features. More...
enum  InitStage {
  modelBuildup = 0, resolveXMLPath, preInit, resize,
  relativeFrameContourLocation, worldFrameContourLocation, plotting, reorganizeHierarchy,
  unknownStage, calculateLocalInitialValues, LASTINITSTAGE
}
 The stages of the initialization. More...

Public Member Functions

 Element (const std::string &name)
 constructor
virtual ~Element ()
 destructor
virtual void initDataInterfaceBase (DynamicSystemSolver *parentds)
 TODO.
virtual std::string getType () const
virtual void setDynamicSystemSolver (DynamicSystemSolver *sys)
 sets the used dynamics system solver to the element
virtual void plot (double t, double dt=1)
 plots time dependent data
virtual void plotAtSpecialEvent (double t, double dt=1)
 plots time dependent data at special events
virtual void closePlot ()
 closes plot file
const std::string & getName () const
const std::string getShortName () const
void setName (const std::string &str)
DynamicSystemSolver * getDynamicSystemSolver ()
virtual void init (InitStage stage)
 plots time series header
virtual void createPlotGroup ()
 creates the plotGroup for H5-output
H5::Group * getPlotGroup ()
virtual void setPlotFeature (PlotFeature pf, PlotFeatureStatus value)
 Set a plot feature.
void setPlotFeatureForChildren (PlotFeature pf, PlotFeatureStatus value)
 Set a plot feature for the children of this object.
void setPlotFeatureRecursive (PlotFeature pf, PlotFeatureStatus value)
 Set a plot feature for this object and the children of this object.
PlotFeatureStatus getPlotFeature (PlotFeature pf)
PlotFeatureStatus getPlotFeatureForChildren (PlotFeature pf)
virtual void initializeUsingXML (xercesc::DOMElement *element)
virtual xercesc::DOMElement * writeXMLFile (xercesc::DOMNode *element)
template<class T >
T * getByPath (std::string path)
 a general element access
virtual Element * getByPathSearch (std::string path)
 a general element search by path
virtual Element * getParent ()
virtual const Element * getParent () const
virtual void setParent (Element *parent_)
std::string getPath (char pathDelim='.')
std::string getXMLPath (MBSim::Element *ref=0, bool rel=false)

Static Public Member Functions

static double getDouble (xercesc::DOMElement *e)
static int getInt (xercesc::DOMElement *e)
static bool getBool (xercesc::DOMElement *e)
static fmatvec::Vec3 getVec3 (xercesc::DOMElement *e)
static fmatvec::Vec getVec (xercesc::DOMElement *e, int rows=0)
static fmatvec::Mat3xV getMat3xV (xercesc::DOMElement *e, int cols=0)
static fmatvec::Mat getMat (xercesc::DOMElement *e, int rows=0, int cols=0)
static fmatvec::SqrMat3 getSqrMat3 (xercesc::DOMElement *e)
static fmatvec::SqrMat getSqrMat (xercesc::DOMElement *e, int size=0)
static fmatvec::SymMat3 getSymMat3 (xercesc::DOMElement *e)
static fmatvec::SymMat getSymMat (xercesc::DOMElement *e, int size=0)

Protected Member Functions

void updatePlotFeatures ()

Protected Attributes

Element * parent
std::string name
 name of element
DynamicSystemSolver * ds
 dynamic system
H5::VectorSerie< double > * plotVectorSerie
 time series
std::vector< double > plotVector
 one entry of time series
std::vector< std::string > plotColumns
 columns of time series
H5::Group * plotGroup
 associated plot group

Private Attributes

PlotFeatureStatus plotFeature [LASTPLOTFEATURE]
 plot feature
PlotFeatureStatus plotFeatureForChildren [LASTPLOTFEATURE]

Detailed Description

basic class of MBSim mainly for plotting

Author:
Martin Foerg
Date:
2009-03-24 plot feature energy (Thorsten Schindler)
2009-07-28 splitted interfaces (Thorsten Schindler)

Member Enumeration Documentation

The stages of the initialization.

see also DynamicSystemSolver::init()

Enumerator:
resolveXMLPath 

resolve the path (given by the XML ref* attributes) to the corrosponding pointer

preInit 

Make some early initialization. TODO This should be split into detailed stages.

resize 

Do the resizing of all vectors, matrices and containers, ...

relativeFrameContourLocation 

Set the relative position and orientation of all Frame's/Contour's in all Group's/RigidBody's

worldFrameContourLocation 

Set the world position and orientation of all Frame's/Contour's in all Group's

plotting 

Build/initialize the plot structure

reorganizeHierarchy 

Reorganize the hierarchy (build invisible tree structur)

unknownStage 

Init all the rest. TODO This should be split into detailed stages.

calculateLocalInitialValues 

calculation of non-linear initial values in complex internal models

Plot Features.

Enumerator:
plotRecursive 

enables/disables all plotting beyond this hierarchy

separateFilePerGroup 

create a separate h5 file for the Group

state 

plot the state vector (x, q, u)

stateDerivative 

plot the derivative of the state vector (xd, qd, ud)

rightHandSide 

plot the smooth and non smooth right hand size (h, r=W*l)

globalPosition 

plot some global (world) positions/orientation

globalVelocity 

plot some global (world) velocities

globalAcceleration 

plot some global (world) accelerations

energy 

plot the energy

openMBV 

plot the OpenMBV part

generalizedLinkForce 

plot the smooth/non smooth generalized link force (l)

linkKinematics 

plot the kinematic of links (g, gd)

stopVector 

plot the stop vector (sv)

debug 

plot internal sizes

Plot feature status.

Enumerator:
enabled 

set the feature enabled

disabled 

set the feature disabled

unset 

use the default value for the feature


Member Function Documentation

Returns:
dynamic system solver

Reimplemented in MBSim::DynamicSystemSolver.

const std::string& MBSim::Element::getName ( ) const [inline]
Returns:
element name
std::string MBSim::Element::getPath ( char  pathDelim = '.')
Returns:
full path of the object
Parameters:
delimiterof the path

Reimplemented in MBSim::DynamicSystem.

Returns:
plot feature

Reimplemented in MBSim::DynamicSystem, and MBSim::Object.

Returns:
plot feature for derived classes

Reimplemented in MBSim::DynamicSystem, and MBSim::Object.

H5::Group* MBSim::Element::getPlotGroup ( ) [inline]
Returns:
associated plot group

Reimplemented in MBSim::DynamicSystem, and MBSim::Object.

const std::string MBSim::Element::getShortName ( ) const [inline]
Returns:
the short name of the element (without hierarchical structure)
virtual std::string MBSim::Element::getType ( ) const [inline, virtual]
virtual void MBSim::Element::init ( InitStage  stage) [virtual]
virtual void MBSim::Element::plot ( double  t,
double  dt = 1 
) [virtual]
virtual void MBSim::Element::plotAtSpecialEvent ( double  t,
double  dt = 1 
) [inline, virtual]

plots time dependent data at special events

Parameters:
simulationtime
simulationtime step size for derivative calculation

Reimplemented in MBSim::DynamicSystem.

virtual void MBSim::Element::setDynamicSystemSolver ( DynamicSystemSolver *  sys) [inline, virtual]

sets the used dynamics system solver to the element

Parameters:
pointerto the dynamic system solver of which the element is part of

Reimplemented in MBSim::DynamicSystem, MBSim::Body, and MBSim::Contact.

void MBSim::Element::setName ( const std::string &  str) [inline]
Parameters:
elementname
virtual void MBSim::Element::setPlotFeature ( PlotFeature  pf,
PlotFeatureStatus  value 
) [inline, virtual]

Set a plot feature.

Set the plot feature pf of this object to enabled, disabled or unset. If unset, this object uses the value of the plot feature pf of its parent object.

Set a plot feature for the children of this object.

Set the plot feature pf of all children which plot feature is unset to enabled, disabled or unset.

Set a plot feature for this object and the children of this object.

This is a convenience function. It simply calls setPlotFeature and setPlotFeatureForChildren.


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