MBSim |
Project Page |
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... | |
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 |
| void | setName (const std::string &str) |
| void | setPath (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::GroupBase * | 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 (const std::string &path, bool initialCaller=true) const |
| Get the object of type T represented by the path path. | |
| std::string | getPath (const Element *relTo=NULL, std::string sep="/") const |
| Return the path of this object. | |
| 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_) |
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 | |
| std::string | path |
| The path of this object. | |
| 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 | |
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()
| 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.
| 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 |
| T * MBSim::Element::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!
| DynamicSystemSolver* MBSim::Element::getDynamicSystemSolver | ( | ) | [inline] |
Reimplemented in MBSim::DynamicSystemSolver.
| const std::string& MBSim::Element::getName | ( | ) | const [inline] |
| std::string MBSim::Element::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!
| PlotFeatureStatus MBSim::Element::getPlotFeature | ( | PlotFeature | pf | ) | [inline] |
Reimplemented in MBSim::DynamicSystem, and MBSim::Object.
Reimplemented in MBSim::DynamicSystem, and MBSim::Object.
| H5::GroupBase* MBSim::Element::getPlotGroup | ( | ) | [inline] |
Reimplemented in MBSim::DynamicSystem, and MBSim::Object.
| virtual std::string MBSim::Element::getType | ( | ) | const [inline, virtual] |
Reimplemented in MBSim::SymbolicFunction3< Ret, Arg1, Arg2, Arg3 >, MBSim::SymbolicFunction< Ret(Arg1, Arg2)>, MBSim::JointConstraint, MBSim::RigidContour, MBSim::GeneralizedAccelerationConstraint, MBSim::GeneralizedVelocityConstraint, MBSim::LinearRegularizedBilateralConstraint, MBSim::FixedRelativeFrame, MBSim::GeneralizedSpringDamper, MBSim::DynamicSystemSolver, MBSim::SymbolicFunction< Ret(Arg)>, MBSim::GeneralizedPositionConstraint, MBSim::Contact, MBSim::GeneralizedAccelerationExcitation, MBSim::Joint, MBSim::DynamicSystem, MBSim::KineticExcitation, MBSim::GeneralizedVelocityExcitation, MBSim::DirectionalSpringDamper, MBSim::SingleContact, MBSim::RigidBody, MBSim::GeneralizedPositionExcitation, MBSim::Link, MBSim::Object, MBSim::Body, MBSim::GearConstraint, MBSim::LinkMechanics, MBSim::Circle, MBSim::Contour, MBSim::Graph, MBSim::Group, MBSim::SpringDamper, MBSim::Frame, MBSim::Contour1sAnalytical, MBSim::Gear, MBSim::PolynomialFrustum, MBSim::ExternGeneralizedIO, MBSim::Gearing, MBSim::Sphere, MBSim::PlaneWithFrustum, MBSim::LineSegment, MBSim::Rectangle, MBSim::GeneralizedFriction, MBSim::CircleHollow, MBSim::CircleSolid, MBSim::Frustum, MBSim::Plane, MBSim::CompoundContour, MBSim::Line, MBSim::Contour1s, MBSim::Cuboid, MBSim::Frustum2D, MBSim::Edge, MBSim::Point, MBSim::ContourContinuum< AT >, MBSim::Room, MBSim::ContourContinuum< double >, and MBSim::ContourContinuum< fmatvec::Vec >.
| virtual void MBSim::Element::init | ( | InitStage | stage | ) | [virtual] |
plots time series header
| invocing | parent class |
Reimplemented in MBSim::PiecewiseDefinedFunction< Ret(Arg)>, MBSim::NestedFunction< Ret(Argo(Argi))>, MBSim::NestedFunction< Ret(Argo(double))>, MBSim::VectorValuedFunction< Ret(Arg)>, MBSim::VectorValuedFunction< Ret(double)>, MBSim::MultiplicationFunction< Ret(Arg)>, MBSim::AdditionFunction< Ret(Arg)>, MBSim::LinearRegularizedStribeckFriction, MBSim::RigidContour, MBSim::JointConstraint, MBSim::InverseKineticsJoint, MBSim::GeneralizedAccelerationConstraint, MBSim::Object, MBSim::FixedRelativeFrame, MBSim::GeneralizedSpringDamper, MBSim::Contour, MBSim::GeneralizedVelocityConstraint, MBSim::GeneralizedPositionConstraint, MBSim::DynamicSystem, MBSim::DynamicSystemSolver, MBSim::DirectionalSpringDamper, MBSim::NaturalCoordinatesObserver, MBSim::KinematicConstraint, MBSim::Contact, MBSim::GeneralizedPositionExcitation, MBSim::RigidBody, MBSim::CylinderCoordinatesObserver, MBSim::RelativeKinematicsObserver, MBSim::NonlinearSpringDamperForce, MBSim::SingleContact, MBSim::Link, MBSim::Frame, MBSim::Body, MBSim::Room, MBSim::TimeDependentFunction< Ret >, MBSim::CartesianCoordinatesObserver, MBSim::Joint, MBSim::Circle, MBSim::Cuboid, MBSim::CompoundContour, MBSim::LinkMechanics, MBSim::Contour1sAnalytical, MBSim::GearConstraint, MBSim::SpringDamper, MBSim::KineticExcitation, MBSim::Gear, MBSim::PolynomialFrustum, MBSim::IsotropicRotationalSpringDamper, MBSim::ExternGeneralizedIO, MBSim::Gearing, MBSim::Rectangle, MBSim::Sphere, MBSim::LineSegment, MBSim::GeneralizedFriction, MBSim::StateDependentFunction< Ret >, MBSim::Frustum, MBSim::KinematicExcitation, MBSim::RigidBodyGroupObserver, MBSim::Contour1s, MBSim::Frustum2D, MBSim::RigidBodyObserver, MBSim::Edge, MBSim::CoordinatesObserver, MBSim::FrameObserver, MBSim::KinematicsObserver, MBSim::ContourQuad, and MBSim::Observer.
| virtual void MBSim::Element::plot | ( | double | t, |
| double | dt = 1 |
||
| ) | [virtual] |
plots time dependent data
| simulation | time |
| simulation | time step size for derivative calculation |
Reimplemented in MBSim::RigidContour, MBSim::GeneralizedSpringDamper, MBSim::Contact, MBSim::DynamicSystem, MBSim::DirectionalSpringDamper, MBSim::SingleContact, MBSim::NaturalCoordinatesObserver, MBSim::RigidBody, MBSim::Joint, MBSim::Link, MBSim::CylinderCoordinatesObserver, MBSim::RelativeKinematicsObserver, MBSim::Object, MBSim::CartesianCoordinatesObserver, MBSim::Body, MBSim::SpringDamper, MBSim::Gear, MBSim::KineticExcitation, MBSim::LinkMechanics, MBSim::Gearing, MBSim::Contour, MBSim::ExternGeneralizedIO, MBSim::GeneralizedFriction, MBSim::KinematicExcitation, MBSim::Frame, MBSim::Contour1sAnalytical, MBSim::Cuboid, MBSim::Room, MBSim::RigidBodyGroupObserver, MBSim::CompoundContour, MBSim::Contour1s, MBSim::RigidBodyObserver, MBSim::CoordinatesObserver, MBSim::FrameObserver, MBSim::KinematicsObserver, and MBSim::Observer.
| virtual void MBSim::Element::plotAtSpecialEvent | ( | double | t, |
| double | dt = 1 |
||
| ) | [inline, virtual] |
plots time dependent data at special events
| simulation | time |
| simulation | time 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
| pointer | to 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] |
| element | name |
| 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.
| void MBSim::Element::setPlotFeatureForChildren | ( | PlotFeature | pf, |
| PlotFeatureStatus | value | ||
| ) | [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.
| void MBSim::Element::setPlotFeatureRecursive | ( | PlotFeature | pf, |
| PlotFeatureStatus | value | ||
| ) | [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.
std::string MBSim::Element::path [protected] |
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.
1.8.0