basic class of MBSim mainly for plotting More...
#include <element.h>
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... | |
![]() | |
enum | MsgType |
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 More... | |
virtual void | plot (double t, double dt=1) |
plots time dependent data More... | |
virtual void | plotAtSpecialEvent (double t, double dt=1) |
plots time dependent data at special events More... | |
virtual void | closePlot () |
closes plot file | |
const std::string & | getName () const |
void | setName (const std::string &str) |
void | setPath (const std::string &str) |
DynamicSystemSolver * | getDynamicSystemSolver () |
virtual void | init (InitStage stage) |
plots time series header More... | |
virtual void | createPlotGroup () |
creates the plotGroup for H5-output | |
H5::GroupBase * | getPlotGroup () |
virtual void | setPlotFeature (PlotFeature pf, PlotFeatureStatus value) |
Set a plot feature. More... | |
void | setPlotFeatureForChildren (PlotFeature pf, PlotFeatureStatus value) |
Set a plot feature for the children of this object. More... | |
void | setPlotFeatureRecursive (PlotFeature pf, PlotFeatureStatus value) |
Set a plot feature for this object and the children of this object. More... | |
PlotFeatureStatus | getPlotFeature (PlotFeature pf) |
PlotFeatureStatus | getPlotFeatureForChildren (PlotFeature pf) |
virtual void | initializeUsingXML (xercesc::DOMElement *element) |
virtual xercesc::DOMElement * | writeXMLFile (xercesc::DOMNode *element) |
const std::vector < MBXMLUtils::EmbedDOMLocator > & | getLocationStack () const |
template<class T > | |
T * | getByPath (const std::string &path, bool initialCaller=true) const |
Get the object of type T represented by the path path. Do not set any argurment other than path! | |
std::string | getPath (const Element *relTo=NULL, std::string sep="/") const |
Return the path of this object. If relativeTo is not NULL return a relative path to relativeTo. Do not set any argurment other than relTo and sep! | |
virtual Element * | getChildByContainerAndName (const std::string &container, const std::string &name) const |
Get the Element named name in the container named container. | |
virtual Element * | getParent () |
virtual const Element * | getParent () const |
virtual void | setParent (Element *parent_) |
std::vector< Element * > | getElementsDependingOn () const |
checks dependency on other elements. More... | |
void | addDependency (Element *ele) |
int | computeLevel () |
computes the length of the pathes in the graph that represents the dependencies between all elements. More... | |
![]() | |
Atom & | operator= (const Atom &) |
void | setMessageStreamActive (MsgType type, bool active) |
void | getMessageStream (MsgType type, boost::shared_ptr< bool > &a, boost::shared_ptr< std::ostream > &s) |
void | adoptMessageStreams (const Atom *src=NULL) |
std::ostream & | msg (MsgType type) |
bool | msgAct (MsgType type) |
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) |
![]() | |
static void | setCurrentMessageStream (MsgType type, const boost::shared_ptr< bool > &a=boost::make_shared< bool >(true), const boost::shared_ptr< std::ostream > &s=boost::make_shared< std::ostream >(std::cout.rdbuf())) |
static std::ostream & | msgStatic (MsgType type) |
static bool | msgActStatic (MsgType type) |
Protected Member Functions | |
void | updatePlotFeatures () |
![]() | |
Atom (const Atom &src) | |
Protected Attributes | |
Element * | parent |
std::string | name |
name of element | |
std::string | path |
The path of this object. Is set during the init stage reorganizeHierarchy. Before this the path is calculated dynamically using getPath() after this stage getPath just returns this value. | |
std::vector < MBXMLUtils::EmbedDOMLocator > | locationStack |
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::GroupBase * | plotGroup |
associated plot group | |
std::vector< Element * > | dependency |
vector containing all dependencies. | |
Private Attributes | |
PlotFeatureStatus | plotFeature [LASTPLOTFEATURE] |
plot feature | |
PlotFeatureStatus | plotFeatureForChildren [LASTPLOTFEATURE] |
basic class of MBSim mainly for plotting
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 |
int MBSim::Element::computeLevel | ( | ) |
computes the length of the pathes in the graph that represents the dependencies between all elements.
|
inline |
|
inline |
checks dependency on other elements.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in MBSim::RegularizedBilateralConstraint, MBSim::SpatialStribeckImpact, MBSim::PlanarStribeckImpact, MBSim::SpatialCoulombImpact, MBSim::PlanarCoulombImpact, MBSim::FrictionImpactLaw, MBSim::SpatialStribeckFriction, MBSim::PlanarStribeckFriction, MBSim::SpatialCoulombFriction, MBSim::PlanarCoulombFriction, MBSim::FrictionForceLaw, MBSim::BilateralImpact, MBSim::JointConstraint, MBSim::UnilateralNewtonImpact, MBSim::RigidContour, MBSim::GeneralizedAccelerationConstraint, MBSim::GeneralizedImpactLaw, MBSim::BilateralConstraint, MBSim::GeneralizedVelocityConstraint, MBSim::FixedRelativeFrame, MBSim::GeneralizedSpringDamper, MBSim::UnilateralConstraint, MBSim::DynamicSystemSolver, MBSim::GeneralizedPositionConstraint, MBSim::Contact, MBSim::GeneralizedAccelerationExcitation, MBSim::Joint, MBSim::DynamicSystem, MBSim::GeneralizedVelocityExcitation, MBSim::KineticExcitation, MBSim::DirectionalSpringDamper, MBSim::SingleContact, MBSim::GeneralizedForceLaw, MBSim::RigidBody, MBSim::GeneralizedPositionExcitation, MBSim::Link, MBSim::Object, MBSim::Body, MBSim::GearConstraint, MBSim::LinkMechanics, MBSim::Contour, MBSim::Graph, MBSim::Group, MBSim::SpringDamper, MBSim::Frame, MBSim::Gear, MBSim::ExternGeneralizedIO, MBSim::Gearing, and MBSim::GeneralizedFriction.
|
virtual |
plots time series header
invocing | parent class |
Reimplemented in MBSim::SpatialStribeckImpact, MBSim::PlanarStribeckImpact, MBSim::SpatialStribeckFriction, MBSim::PlanarStribeckFriction, MBSim::FrictionForceLaw, MBSim::RigidContour, MBSim::JointConstraint, MBSim::InverseKineticsJoint, MBSim::GeneralizedAccelerationConstraint, MBSim::Object, MBSim::FixedRelativeFrame, MBSim::GeneralizedSpringDamper, MBSim::Contour, MBSim::GeneralizedVelocityConstraint, MBSim::GeneralizedAccelerationExcitation, MBSim::GeneralizedPositionConstraint, MBSim::DynamicSystem, MBSim::DynamicSystemSolver, MBSim::DirectionalSpringDamper, MBSim::KinematicConstraint, MBSim::GeneralizedPositionExcitation, MBSim::Contact, MBSim::RigidBody, MBSim::SingleContact, MBSim::Link, MBSim::Frame, MBSim::Body, MBSim::Joint, MBSim::LinkMechanics, MBSim::GearConstraint, MBSim::SpringDamper, MBSim::KineticExcitation, MBSim::Gear, MBSim::IsotropicRotationalSpringDamper, MBSim::GeneralizedForceLaw, MBSim::ExternGeneralizedIO, MBSim::Gearing, MBSim::GeneralizedFriction, MBSim::KinematicExcitation, and MBSim::Observer.
|
virtual |
plots time dependent data
simulation | time |
simulation | time step size for derivative calculation |
Reimplemented in MBSim::RigidContour, MBSim::GeneralizedSpringDamper, MBSim::Contact, MBSim::DirectionalSpringDamper, MBSim::DynamicSystem, MBSim::SingleContact, MBSim::Joint, MBSim::RigidBody, MBSim::Link, MBSim::Object, MBSim::Body, MBSim::SpringDamper, MBSim::Gear, MBSim::KineticExcitation, MBSim::LinkMechanics, MBSim::Gearing, MBSim::Contour, MBSim::GeneralizedFriction, MBSim::ExternGeneralizedIO, MBSim::KinematicExcitation, MBSim::Frame, and MBSim::Observer.
|
inlinevirtual |
plots time dependent data at special events
simulation | time |
simulation | time step size for derivative calculation |
Reimplemented in MBSim::DynamicSystem.
|
inlinevirtual |
sets the used dynamics system solver to the element
pointer | to the dynamic system solver of which the element is part of |
Reimplemented in MBSim::DynamicSystem, MBSim::Body, and MBSim::Contact.
|
inline |
element | name |
|
inlinevirtual |
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.
|
inline |
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.
|
inline |
Set a plot feature for this object and the children of this object.
This is a convenience function. It simply calls setPlotFeature and setPlotFeatureForChildren.