MBSim

Project Page
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
MBSim::Body Class Reference

base class for all mechanical bodies with mass and generalised coordinates More...

#include <body.h>

Inheritance diagram for MBSim::Body:
MBSim::Object MBSim::Element MBSim::RigidBody

List of all members.

Public Member Functions

 Body (const std::string &name)
 constructor
virtual ~Body ()
 destructor
void setInitialGeneralizedPosition (const fmatvec::Vec &q0_)
void setInitialGeneralizedVelocity (const fmatvec::Vec &u0_)
void setInitialGeneralizedPosition (double q0_)
void setInitialGeneralizedVelocity (double u0_)
void sethSize (int hSize_, int i=0)
void sethInd (int hInd_, int i=0)
virtual void plot (double t, double dt=1)
 plots time dependent data
virtual void closePlot ()
 closes plot file
virtual std::string getType () const
virtual void setDynamicSystemSolver (DynamicSystemSolver *sys)
 sets the used dynamics system solver to the element
virtual void init (InitStage stage)
 initialize object at start of simulation with respect to contours and frames
virtual Contour * getContour (const std::string &name, bool check=true) const
virtual Frame * getFrame (const std::string &name, bool check=true) const
virtual Frame * getFrameOfReference ()
virtual const Frame * getFrameOfReference () const
virtual void setFrameOfReference (Frame *frame)
const std::vector< Frame * > & getFrames () const
const std::vector< Contour * > & getContours () const
int frameIndex (const Frame *frame_) const
int contourIndex (const Contour *contour_) const
virtual void initializeUsingXML (xercesc::DOMElement *element)
virtual xercesc::DOMElement * writeXMLFile (xercesc::DOMNode *element)
virtual Element * getChildByContainerAndName (const std::string &container, const std::string &name) const
 Get the Element named name in the container named container.

Protected Member Functions

virtual void addFrame (Frame *frame)
virtual void addContour (Contour *contour)

Protected Attributes

std::vector< Frame * > frame
 vector of frames and contours
std::vector< Contour * > contour
Frame * R
 frame of reference of the object

Private Attributes

std::string saved_frameOfReference

Detailed Description

base class for all mechanical bodies with mass and generalised coordinates

Author:
Martin Foerg
Date:
2009-04-06 object and body divided (Markus Schneider)

The following part is only a test for equation and image output for the XML documentation. A not inline equation

\[ \int_a^b\sin(x)dx +5 \]

And a inline equation $x_a+\cos(x)$. And a image

mbsim.png
The image caption
End of the test.


Constructor & Destructor Documentation

MBSim::Body::Body ( const std::string &  name)

constructor

Parameters:
nameof body

Member Function Documentation

virtual void MBSim::Body::addContour ( Contour *  contour) [protected, virtual]
Parameters:
contourto add
virtual void MBSim::Body::addFrame ( Frame *  frame) [protected, virtual]
Parameters:
frameto add
int MBSim::Body::contourIndex ( const Contour *  contour_) const
Parameters:
contour
Returns:
index of contour
int MBSim::Body::frameIndex ( const Frame *  frame_) const
Parameters:
frame
Returns:
index of frame
virtual Contour* MBSim::Body::getContour ( const std::string &  name,
bool  check = true 
) const [virtual]
Parameters:
nameof the contour
flagfor checking existence
Returns:
contour
virtual Frame* MBSim::Body::getFrame ( const std::string &  name,
bool  check = true 
) const [virtual]
Parameters:
nameof the frame
flagfor checking existence
Returns:
frame
virtual Frame* MBSim::Body::getFrameOfReference ( ) [inline, virtual]
Returns:
frame of reference
virtual const Frame* MBSim::Body::getFrameOfReference ( ) const [inline, virtual]
Returns:
frame of reference
virtual std::string MBSim::Body::getType ( ) const [inline, virtual]
Returns:
std::string representation

Reimplemented from MBSim::Object.

Reimplemented in MBSim::RigidBody.

virtual void MBSim::Body::plot ( double  t,
double  dt = 1 
) [virtual]

plots time dependent data

Parameters:
simulationtime
simulationtime step size for derivative calculation

Reimplemented from MBSim::Object.

Reimplemented in MBSim::RigidBody.

virtual void MBSim::Body::setDynamicSystemSolver ( DynamicSystemSolver *  sys) [virtual]

sets the used dynamics system solver to the element

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

Reimplemented from MBSim::Element.

virtual void MBSim::Body::setFrameOfReference ( Frame *  frame) [inline, virtual]
Parameters:
frameof reference

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