mbsim  4.0.0
MBSim Kernel
Public Member Functions | Public Attributes | Protected Attributes | List of all members
MBSim::Joint Class Reference

class for connections: constraints on frames More...

#include <joint.h>

Inheritance diagram for MBSim::Joint:
[legend]

Public Member Functions

 Joint (const std::string &name="")
 constructor More...
 
 ~Joint () override
 destructor
 
void updatelaF () override
 
void updatelaM () override
 
void updatelaF0 ()
 
void updatelaFS ()
 
void updatelaFM ()
 
void updatelaM0 ()
 
void updatelaMS ()
 
void updatelaMM ()
 
void updateh (int i=0) override
 
void updateW (int i=0) override
 
void updateg () override
 
void updategd () override
 
void updatewb () override
 
void updatexd () override
 
void calclaSize (int j) override
 calculates size of contact force parameters
 
void calcgSize (int j) override
 calculates size of relative distances
 
void calcgdSize (int j) override
 calculates size of gap velocities More...
 
void calcrFactorSize (int j) override
 calculates size of rfactors
 
void calccorrSize (int j) override
 
void calcxSize () override
 
void init (InitStage stage, const InitConfigSet &config) override
 plots time series header More...
 
bool isSetValued () const override
 asks the link if it contains force laws that contribute to the lagrange multiplier and is therefore set valued More...
 
bool isSingleValued () const override
 asks the link if it contains single valued force laws that contribute to the right-hand side vector h More...
 
bool isActive () const override
 
bool gActiveChanged () override
 
void solveImpactsFixpointSingle () override
 
void solveConstraintsFixpointSingle () override
 
void solveImpactsGaussSeidel () override
 
void solveConstraintsGaussSeidel () override
 
void solveImpactsRootFinding () override
 
void solveConstraintsRootFinding () override
 
void jacobianConstraints () override
 computes JACOBIAN and mass action matrix of nonlinear contact equations
 
void jacobianImpacts () override
 computes JACOBIAN and mass action matrix of nonlinear contact equations on velocity level
 
void updaterFactors () override
 update relaxation factors for contact equations
 
void checkImpactsForTermination () override
 verify underlying force laws on velocity level concerning given tolerances
 
void checkConstraintsForTermination () override
 verify underlying force laws concerning given tolerances
 
void setForceLaw (GeneralizedForceLaw *rc)
 
void setMomentLaw (GeneralizedForceLaw *rc)
 
void setForceDirection (const fmatvec::Mat3xV &fd)
 
void setMomentDirection (const fmatvec::Mat3xV &md)
 
void setIntegrateGeneralizedRelativeVelocityOfRotation (bool integrateGeneralizedRelativeVelocityOfRotation_)
 
fmatvec::VecV evalGeneralizedRelativePositionOfRotation () override
 
fmatvec::Vec3 evalGlobalRelativeAngle ()
 
void initializeUsingXML (xercesc::DOMElement *element) override
 
- Public Member Functions inherited from MBSim::Element
 Element (const std::string &name)
 constructor
 
 ~Element () override=default
 destructor
 
void throwError (const std::string &msg) const
 
virtual void setDynamicSystemSolver (DynamicSystemSolver *sys)
 sets the used dynamics system solver to the element More...
 
virtual void plotAtSpecialEvent ()
 plots time dependent data at special events More...
 
const std::string & getName () const
 
void setName (const std::string &str)
 
void setPath (const std::string &str)
 
DynamicSystemSolver * getDynamicSystemSolver ()
 
virtual void createPlotGroup ()
 creates the plotGroup for H5-output
 
H5::GroupBase * getPlotGroup ()
 
bool getPlotFeature (const PlotFeatureEnum &pf)
 
virtual void setPlotFeature (const PlotFeatureEnum &pf, bool value)
 Set a plot feature. More...
 
void setPlotFeatureForChildren (const PlotFeatureEnum &pf, bool value)
 Set a plot feature for the children of this object. More...
 
void setPlotFeatureRecursive (const PlotFeatureEnum &pf, bool value)
 Set a plot feature for this object and the children of this object. More...
 
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=nullptr, 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 std::shared_ptr< OpenMBV::Group > getOpenMBVGrp ()
 
virtual Element * getParent ()
 
virtual const Element * getParent () const
 
virtual void setParent (Element *parent_)
 
std::vector< Element * > getDependencies () 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...
 
virtual void updateVelocities (Frame *frame)
 
virtual void updateAccelerations (Frame *frame)
 
virtual void updateJacobians (Frame *frame, int j=0)
 
virtual void updateGyroscopicAccelerations (Frame *frame)
 
const double & getTime () const
 
double getStepSize () const
 
const MBXMLUtils::DOMEvalException & getDOMEvalError () const
 
- Public Member Functions inherited from fmatvec::Atom
Atom & operator= (const Atom &)
 
void setMessageStreamActive (MsgType type, bool activeFlag)
 
void getMessageStream (MsgType type, std::shared_ptr< bool > &a, std::shared_ptr< std::ostream > &s) const
 
void adoptMessageStreams (const Atom *src=nullptr)
 
std::ostream & msg (MsgType type) const
 
bool msgAct (MsgType type) const
 

Public Attributes

void(Joint::* updatelaF_ )()
 
void(Joint::* updatelaM_ )()
 

Protected Attributes

GeneralizedForceLaw * ffl {nullptr}
 
GeneralizedForceLaw * fml {nullptr}
 
GeneralizedImpactLaw * fifl {nullptr}
 
GeneralizedImpactLaw * fiml {nullptr}
 
fmatvec::Vec gdn
 relative velocity and acceleration after an impact for event driven scheme summarizing all possible contacts
 
fmatvec::Vec gdd
 
fmatvec::Vec3 WphiK0K1
 
fmatvec::Vec3 eR
 
size_t iR {2}
 
bool integrateGeneralizedRelativeVelocityOfRotation {false}
 
fmatvec::Mat3xV RF
 
fmatvec::Mat3xV RM
 
fmatvec::RangeV iFM
 
fmatvec::RangeV iMM
 
- Protected Attributes inherited from MBSim::Element
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.
 
MBXMLUtils::DOMEvalException domEvalError
 Special XML helper variable.
 
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.
 
PlotFeatureMap plotFeature
 plot feature
 
PlotFeatureMap plotFeatureForChildren
 

Additional Inherited Members

- Public Types inherited from MBSim::Element
enum  InitStage {
  resolveStringRef =0, preInit, plotting, unknownStage,
  LASTINITSTAGE
}
 The stages of the initialization. More...
 
- Public Types inherited from fmatvec::Atom
enum  MsgType
 
- Static Public Member Functions inherited from fmatvec::Atom
static void setCurrentMessageStream (MsgType type, const std::shared_ptr< bool > &a=std::make_shared< bool >(true), const std::shared_ptr< std::ostream > &s=std::make_shared< std::ostream >(std::cout.rdbuf()))
 
static std::ostream & msgStatic (MsgType type)
 
static bool msgActStatic (MsgType type)
 
- Protected Member Functions inherited from MBSim::Element
void updatePlotFeatures ()
 
- Protected Member Functions inherited from fmatvec::Atom
 Atom (const Atom &src)
 

Detailed Description

class for connections: constraints on frames

Author
Martin Foerg
Date
2009-04-06 MechanicalLink added (Thorsten Schindler)
2009-07-16 splitted link / object right hand side (Thorsten Schindler)
2009-08-21 one force direction (Thorsten Schindler)
2014-09-16 contact forces are calculated on acceleration level (Thorsten Schindler)
Todo:
hSize Frame C

Constructor & Destructor Documentation

◆ Joint()

MBSim::Joint::Joint ( const std::string &  name = "")
inline

constructor

Parameters
name

Member Function Documentation

◆ calcgdSize()

void MBSim::Joint::calcgdSize ( int  j)
overridevirtual

calculates size of gap velocities

Parameters
flagto decide which contacts are included in the calculation

see SingleContact for the implementation and DynamicSystem for explanation

Reimplemented from MBSim::FloatingFrameLink.

◆ gActiveChanged()

bool MBSim::Joint::gActiveChanged ( )
inlineoverridevirtual
Returns
has the relative distance vector changed?

Implements MBSim::Link.

◆ init()

void MBSim::Joint::init ( InitStage  stage,
const InitConfigSet &  config 
)
overridevirtual

plots time series header

Parameters
invocingparent class

Reimplemented from MBSim::FloatingFrameLink.

Reimplemented in MBSim::InverseKineticsJoint.

◆ isActive()

bool MBSim::Joint::isActive ( ) const
inlineoverridevirtual
Returns
are link equations active?

Implements MBSim::Link.

◆ isSetValued()

bool MBSim::Joint::isSetValued ( ) const
overridevirtual

asks the link if it contains force laws that contribute to the lagrange multiplier and is therefore set valued

Returns
set valued force laws used within the link?

Reimplemented from MBSim::Link.

Reimplemented in MBSim::InverseKineticsJoint.

◆ isSingleValued()

bool MBSim::Joint::isSingleValued ( ) const
overridevirtual

asks the link if it contains single valued force laws that contribute to the right-hand side vector h

Returns
single valued force laws used within link?

Reimplemented from MBSim::Link.

◆ setForceDirection()

void MBSim::Joint::setForceDirection ( const fmatvec::Mat3xV &  fd)
inline
Parameters
localforce direction represented in first frame

◆ setMomentDirection()

void MBSim::Joint::setMomentDirection ( const fmatvec::Mat3xV &  md)
inline
Parameters
localmoment direction represented in first frame

◆ solveConstraintsFixpointSingle()

void MBSim::Joint::solveConstraintsFixpointSingle ( )
overridevirtual

solve contact equations of motion with single step fixed point scheme

Reimplemented from MBSim::Link.

◆ solveConstraintsGaussSeidel()

void MBSim::Joint::solveConstraintsGaussSeidel ( )
overridevirtual

solve contact equations of motion with Gauss-Seidel scheme

Reimplemented from MBSim::Link.

◆ solveConstraintsRootFinding()

void MBSim::Joint::solveConstraintsRootFinding ( )
overridevirtual

solve contact equations of motion with Newton scheme

Reimplemented from MBSim::Link.

◆ solveImpactsFixpointSingle()

void MBSim::Joint::solveImpactsFixpointSingle ( )
overridevirtual

solve impact equations of motion with single step fixed point scheme on velocity level

Parameters
timestep-size

Reimplemented from MBSim::Link.

◆ solveImpactsGaussSeidel()

void MBSim::Joint::solveImpactsGaussSeidel ( )
overridevirtual

solve impact equations of motion with Gauss-Seidel scheme on velocity level

Parameters
timestep-size

Reimplemented from MBSim::Link.

◆ solveImpactsRootFinding()

void MBSim::Joint::solveImpactsRootFinding ( )
overridevirtual

solve impact equations of motion with Newton scheme on velocity level

Parameters
timestep-size

Reimplemented from MBSim::Link.

Member Data Documentation

◆ ffl

GeneralizedForceLaw* MBSim::Joint::ffl {nullptr}
protected

constitutive law on acceleration level for forces and torques (f?-force-law)

◆ fifl

GeneralizedImpactLaw* MBSim::Joint::fifl {nullptr}
protected

constitutive law on velocity level for forces and torques (f?-impact-force-law)

◆ fiml

GeneralizedImpactLaw* MBSim::Joint::fiml {nullptr}
protected

constitutive law on velocity level for moments/torques (f?-impact-moment-law)

◆ fml

GeneralizedForceLaw* MBSim::Joint::fml {nullptr}
protected

constitutive law on acceleration level for moments/torques (f?-moment-law)


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