All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Attributes | List of all members
MBSim::Link Class Referenceabstract

general link to one or more objects More...

#include <link.h>

Inheritance diagram for MBSim::Link:
MBSim::Element fmatvec::Atom MBSim::ExternGeneralizedIO MBSim::LinkMechanics MBSim::Contact MBSim::DirectionalSpringDamper MBSim::Gear MBSim::Gearing MBSim::GeneralizedFriction MBSim::GeneralizedSpringDamper MBSim::IsotropicRotationalSpringDamper MBSim::Joint MBSim::KinematicExcitation MBSim::KineticExcitation MBSim::SingleContact MBSim::SpringDamper

Public Member Functions

 Link (const std::string &name)
 constructor More...
 
virtual ~Link ()
 destructor
 
virtual void updateg (double t)=0
 
virtual void updategd (double t)=0
 
virtual void updatewb (double t, int i=0)
 
virtual void updateW (double t, int i=0)
 
virtual void updateV (double t, int i=0)
 
virtual void updateh (double t, int i=0)
 
virtual void updateStopVector (double t)
 
virtual void updateLinkStatus (double t)
 
virtual void updateLinkStatusReg (double t)
 
virtual void updateJacobians (double t, int j=0)
 
virtual void updateb (double t)
 
virtual void updatedx (double t, double dt)
 
virtual void updatexd (double t)
 
virtual void calcxSize ()
 
virtual const fmatvec::Vecgetx () const
 
virtual fmatvec::Vecgetx ()
 
virtual void setxInd (int xInd_)
 
virtual int getxSize () const
 
virtual void updatexRef (const fmatvec::Vec &ref)
 
virtual void updatexdRef (const fmatvec::Vec &ref)
 
virtual void updatebRef (const fmatvec::Mat &hRef)
 
virtual void init (InitStage stage)
 plots time series header More...
 
virtual void initz ()
 
virtual void writez (H5::GroupBase *group)
 
virtual void readz0 (H5::GroupBase *group)
 
virtual void setbInd (int bInd_)
 
std::string getType () const
 
virtual void plot (double t, double dt=1)
 plots time dependent data More...
 
virtual void closePlot ()
 closes plot file
 
virtual void updateWRef (const fmatvec::Mat &ref, int i=0)=0
 references to contact force direction matrix of dynamic system parent
 
virtual void updateVRef (const fmatvec::Mat &ref, int i=0)=0
 references to condensed contact force direction matrix of dynamic system parent
 
virtual void updatehRef (const fmatvec::Vec &hRef, int i=0)=0
 references to complete and link smooth force vector of dynamic system parent
 
virtual void updaterRef (const fmatvec::Vec &ref, int i=0)=0
 references to nonsmooth force vector of dynamic system parent
 
virtual void updatewbRef (const fmatvec::Vec &ref)
 references to TODO of dynamic system parent
 
virtual void updatelaRef (const fmatvec::Vec &ref)
 references to contact force parameter of dynamic system parent
 
virtual void deletelaRef ()
 delete reference to contact force parameter of dynamic system parent
 
virtual void updategRef (const fmatvec::Vec &ref)
 references to contact relative distances of dynamic system parent
 
virtual void updategdRef (const fmatvec::Vec &ref)
 references to contact relative velocities of dynamic system parent
 
virtual void updateresRef (const fmatvec::Vec &ref)
 references to residuum of nonlinear contact equations of dynamic system parent
 
virtual void updaterFactorRef (const fmatvec::Vec &ref)
 references to rfactors of dynamic system parent
 
virtual void updatesvRef (const fmatvec::Vec &sv)
 references to stopvector of dynamic system parent (root function for event driven integration)
 
virtual void updatejsvRef (const fmatvec::VecInt &jsvParent)
 references to stopvector evaluation of dynamic system parent (root detection with corresponding bool array by event driven integrator)
 
virtual void updateLinkStatusRef (const fmatvec::VecInt &LinkStatusParent)
 reference to vector of link status (for set valued links with piecewise link equations)
 
virtual void updateLinkStatusRegRef (const fmatvec::VecInt &LinkStatusRegParent)
 reference to vector of link status (for single-valued links)
 
virtual void calclaSize (int j)
 calculates size of contact force parameters
 
virtual void calcgSize (int j)
 calculates size of relative distances
 
virtual void calcgdSize (int j)
 calculates size of gap velocities More...
 
virtual void calcrFactorSize (int j)
 calculates size of rfactors
 
virtual void calcbSize ()
 calculates size of rfactors
 
virtual void calcsvSize ()
 calculates size of stopvector (root function for event driven integration)
 
virtual void calcLinkStatusSize ()
 calculates size of vector LinkStatus
 
virtual void calcLinkStatusRegSize ()
 calculates size of vector LinkStatusReg
 
virtual bool isSetValued () const
 asks the link if it contains force laws that contribute to the lagrange multiplier and is therefore set valued More...
 
virtual bool isSingleValued () const
 asks the link if it contains single valued force laws that contribute to the right-hand side vector h More...
 
virtual bool hasSmoothPart () const
 
virtual bool isActive () const =0
 
virtual bool gActiveChanged ()=0
 
virtual bool detectImpact ()
 
virtual void solveImpactsFixpointSingle (double dt)
 
virtual void solveConstraintsFixpointSingle ()
 
virtual void solveImpactsGaussSeidel (double dt)
 
virtual void solveConstraintsGaussSeidel ()
 
virtual void solveImpactsRootFinding (double dt)
 
virtual void solveConstraintsRootFinding ()
 
virtual void jacobianConstraints ()
 computes JACOBIAN and mass action matrix of nonlinear contact equations
 
virtual void jacobianImpacts ()
 computes JACOBIAN and mass action matrix of nonlinear contact equations on velocity level
 
virtual void updaterFactors ()
 update relaxation factors for contact equations
 
virtual void checkImpactsForTermination (double dt)
 verify underlying force laws on velocity level concerning given tolerances
 
virtual void checkConstraintsForTermination ()
 verify underlying force laws concerning given tolerances
 
virtual void checkActive (int j)
 check if set-valued contacts are active and set corresponding attributes More...
 
virtual double computePotentialEnergy ()
 compute potential energy
 
virtual void setlaTol (double tol)
 
virtual void setLaTol (double tol)
 
virtual void setgTol (double tol)
 
virtual void setgdTol (double tol)
 
virtual void setgddTol (double tol)
 
virtual void setrMax (double rMax_)
 
virtual void setLinkStatusInd (int LinkStatusInd_)
 
virtual void setLinkStatusRegInd (int LinkStatusRegInd_)
 
virtual void setlaInd (int laInd_)
 
virtual void setgInd (int gInd_)
 
virtual void setgdInd (int gdInd_)
 
virtual void setrFactorInd (int rFactorInd_)
 
virtual void LinearImpactEstimation (fmatvec::Vec &gInActive_, fmatvec::Vec &gdInActive_, int *IndInActive_, fmatvec::Vec &gAct_, int *IndActive_)
 get gap distance and calculate gap velocity of unilateral links to estimate impacts within the next step More...
 
virtual void SizeLinearImpactEstimation (int *sizeInActive_, int *sizeActive_)
 calculates the number of active and inactive unilateral constraints and increments sizeActive/sizeInActive
 
virtual void updatecorr (int j)
 
virtual void updatecorrRef (const fmatvec::Vec &ref)
 
virtual void calccorrSize (int j)
 
virtual void setcorrInd (int corrInd_)
 
virtual void checkRoot ()
 
const std::vector< fmatvec::Mat > & getW (int i=0) const
 
const std::vector< fmatvec::Mat > & getV (int i=0) const
 
const std::vector< fmatvec::Vec > & geth (int i=0) const
 
void setx (const fmatvec::Vec &x_)
 
const fmatvec::Vecgetxd () const
 
virtual void setsvInd (int svInd_)
 
int getsvSize () const
 
int getLinkStatusSize () const
 
int getLinkStatusRegSize () const
 
const fmatvec::Vecgetla () const
 
fmatvec::Vecgetla ()
 
int getlaInd () const
 
int getlaSize () const
 
int getbSize () const
 
const fmatvec::IndexgetlaIndex () const
 
const fmatvec::Vecgetg () const
 
fmatvec::Vecgetg ()
 
const fmatvec::Vecgetgd () const
 
fmatvec::Vecgetgd ()
 
const fmatvec::Vecgetwb () const
 
fmatvec::Vecgetwb ()
 
int getgdInd () const
 
int getgSize () const
 
int getgdSize () const
 
const fmatvec::IndexgetgIndex () const
 
int getrFactorSize () const
 
const fmatvec::VecInt & getrFactorUnsure () const
 
void savela (double dt=1.0)
 saves contact force parameters for use as starting value in next time step
 
void initla (double dt=1.0)
 load contact force parameters for use as starting value
 
void decreaserFactors ()
 decrease rfactor if mass action matrix is not diagonal dominant (cf. Foerg: Dissertation, page 80 et seq.)
 
int getcorrSize () const
 
- Public Member Functions inherited from MBSim::Element
 Element (const std::string &name)
 constructor
 
virtual ~Element ()
 destructor
 
virtual void initDataInterfaceBase (DynamicSystemSolver *parentds)
 TODO.
 
virtual void setDynamicSystemSolver (DynamicSystemSolver *sys)
 sets the used dynamics system solver to the element More...
 
virtual void plotAtSpecialEvent (double t, double dt=1)
 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)
 
DynamicSystemSolvergetDynamicSystemSolver ()
 
virtual void createPlotGroup ()
 creates the plotGroup for H5-output
 
H5::GroupBasegetPlotGroup ()
 
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 ElementgetChildByContainerAndName (const std::string &container, const std::string &name) const
 Get the Element named name in the container named container.
 
virtual ElementgetParent ()
 
virtual const ElementgetParent () 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...
 
- Public Member Functions inherited from fmatvec::Atom
Atomoperator= (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)
 

Protected Attributes

fmatvec::Vec x
 order one parameters
 
fmatvec::Vec xd
 differentiated order one parameters
 
fmatvec::Vec x0
 order one initial value
 
int xSize
 size and local index of order one parameters
 
int xInd
 
fmatvec::Vec sv
 stop vector for event driven integration (root function)
 
fmatvec::VecInt jsv
 evaluation of roots of stop vector with a boolean vector
 
int svSize
 size and local index of stop vector
 
int svInd
 
fmatvec::VecInt LinkStatus
 status of link (default 0) describing which piece of the equation is valid (e.g. stick or slip) More...
 
int LinkStatusSize
 size and local index of link status vector (set-valued)
 
int LinkStatusInd
 
fmatvec::VecInt LinkStatusReg
 status of link More...
 
int LinkStatusRegSize
 size and local index of single-valued link status vector
 
int LinkStatusRegInd
 
fmatvec::Vec g
 relative distance, relative velocity, contact force parameters
 
fmatvec::Vec gd
 
fmatvec::Vec la
 
fmatvec::Vec laS
 contact forces of smooth contact laws
 
int gSize
 size and local index of relative distances
 
int gInd
 
int gdSize
 size and local index of relative velocities
 
int gdInd
 
int laSize
 size and local index of contact force parameters
 
int laInd
 
int bSize
 size and local index of contact force parameters
 
int bInd
 
fmatvec::Index Ig
 local index of relative distances and contact force parameters
 
fmatvec::Index Ila
 
double gTol
 tolerance for relative velocity, relative acceleration, force and impact
 
double gdTol
 
double gddTol
 
double laTol
 
double LaTol
 
fmatvec::Vec la0
 attribute to save contact force parameter of previous time step
 
fmatvec::Vec rFactor
 vector of rfactors for relaxation of contact equations
 
fmatvec::VecInt rFactorUnsure
 boolean vector defining if rfactor belongs to not diagonal dominant mass action matrix (cf. Foerg Dissertation, page 80 et seq.)
 
int rFactorSize
 size and local index of rfactors
 
int rFactorInd
 
double rMax
 maximum r-factor
 
fmatvec::Vec res
 
std::vector< fmatvec::MatW [2]
 force direction matrix for nonsmooth right hand side
 
std::vector< fmatvec::MatV [2]
 reduced force direction matrix for nonsmooth right hand side
 
std::vector< fmatvec::Vech [2]
 smooth complete and link right hand side
 
std::vector< fmatvec::Matdhdq
 smooth Jacobians for implicit integration
 
std::vector< fmatvec::Matdhdu
 
std::vector< fmatvec::Vecdhdt
 
std::vector< fmatvec::Vecr [2]
 nonsmooth right hand side
 
fmatvec::Vec wb
 TODO.
 
fmatvec::Mat b
 TODO.
 
int corrSize
 
int corrInd
 
fmatvec::Vec corr
 
- Protected Attributes inherited from MBSim::Element
Elementparent
 
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
 
DynamicSystemSolverds
 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::GroupBaseplotGroup
 associated plot group
 
std::vector< Element * > dependency
 vector containing all dependencies.
 

Additional Inherited Members

- Public Types inherited from MBSim::Element
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 Types inherited from fmatvec::Atom
enum  MsgType
 
- Static Public Member Functions inherited from MBSim::Element
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 Public Member Functions inherited from fmatvec::Atom
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 inherited from MBSim::Element
void updatePlotFeatures ()
 
- Protected Member Functions inherited from fmatvec::Atom
 Atom (const Atom &src)
 

Detailed Description

general link to one or more objects

Author
Martin Foerg
Date
2009-03-26 some comments (Thorsten Schindler)
2009-04-06 ExtraDynamicInterface included / LinkMechanics added (Thorsten Schindler)
2009-07-16 splitted link / object right hand side (Thorsten Schindler)
2009-07-27 enhanced structure for implicit integration (Thorsten Schindler)
2009-07-28 splitted interfaces (Thorsten Schindler)
2009-12-14 revised inverse kinetics (Martin Foerg)
2010-07-06 added LinkStatus and LinearImpactEstimation for timestepper ssc (Robert Huber)
2012-05-08 added LinkStatusReg for AutoTimeSteppingSSCIntegrator (Jan Clauberg)
2014-09-16 contact forces are calculated on acceleration level (Thorsten Schindler)

Constructor & Destructor Documentation

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

constructor

Parameters
nameof link

Member Function Documentation

virtual void MBSim::Link::calcgdSize ( int  j)
inlinevirtual

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 in MBSim::Contact, MBSim::SingleContact, MBSim::Joint, MBSim::Gear, MBSim::Gearing, and MBSim::KinematicExcitation.

virtual void MBSim::Link::checkActive ( int  j)
inlinevirtual

check if set-valued contacts are active and set corresponding attributes

Parameters
flagto decide which criteria are used to define 'activity'

see SingleContact for the implementation and DynamicSystem for explanation

Reimplemented in MBSim::Contact, and MBSim::SingleContact.

virtual bool MBSim::Link::detectImpact ( )
inlinevirtual
Returns
has an impact occured?

Reimplemented in MBSim::Contact, and MBSim::SingleContact.

virtual bool MBSim::Link::gActiveChanged ( )
pure virtual
std::string MBSim::Link::getType ( ) const
inlinevirtual
virtual bool MBSim::Link::hasSmoothPart ( ) const
inlinevirtual
Returns
updateh is needed if set valued force law is not active?
Todo:
: is this used anyhow?
void MBSim::Link::init ( InitStage  stage)
virtual
virtual bool MBSim::Link::isActive ( ) const
pure virtual
virtual bool MBSim::Link::isSetValued ( ) const
inlinevirtual

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 in MBSim::InverseKineticsJoint, MBSim::Contact, MBSim::SingleContact, MBSim::Joint, MBSim::Gear, MBSim::Gearing, and MBSim::KinematicExcitation.

virtual bool MBSim::Link::isSingleValued ( ) const
inlinevirtual

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 in MBSim::GeneralizedSpringDamper, MBSim::DirectionalSpringDamper, MBSim::Contact, MBSim::SingleContact, MBSim::Joint, MBSim::IsotropicRotationalSpringDamper, MBSim::KineticExcitation, MBSim::Gear, MBSim::SpringDamper, MBSim::ExternGeneralizedIO, and MBSim::GeneralizedFriction.

virtual void MBSim::Link::LinearImpactEstimation ( fmatvec::Vec gInActive_,
fmatvec::Vec gdInActive_,
int *  IndInActive_,
fmatvec::Vec gAct_,
int *  IndActive_ 
)
inlinevirtual

get gap distance and calculate gap velocity of unilateral links to estimate impacts within the next step

Parameters
gInActivegap distance of inactive links (return)
gdInActivegap velocities of inactive links (return)
IndInActiveindex for gInActive/gdInActive; incremented with size after storage (return and input)
gActgap distance of active links (return)
IndActiveindex for gActive; incremented with size after storage (return and input)

Reimplemented in MBSim::Contact, and MBSim::SingleContact.

void MBSim::Link::plot ( double  t,
double  dt = 1 
)
virtual
virtual void MBSim::Link::solveConstraintsFixpointSingle ( )
inlinevirtual

solve contact equations of motion with single step fixed point scheme

Reimplemented in MBSim::Contact, MBSim::SingleContact, and MBSim::Joint.

virtual void MBSim::Link::solveConstraintsGaussSeidel ( )
inlinevirtual

solve contact equations of motion with Gauss-Seidel scheme

Reimplemented in MBSim::Contact, MBSim::SingleContact, and MBSim::Joint.

virtual void MBSim::Link::solveConstraintsRootFinding ( )
inlinevirtual

solve contact equations of motion with Newton scheme

Reimplemented in MBSim::Contact, MBSim::SingleContact, and MBSim::Joint.

virtual void MBSim::Link::solveImpactsFixpointSingle ( double  dt)
inlinevirtual

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

Parameters
timestep-size

Reimplemented in MBSim::Contact, MBSim::SingleContact, and MBSim::Joint.

virtual void MBSim::Link::solveImpactsGaussSeidel ( double  dt)
inlinevirtual

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

Parameters
timestep-size

Reimplemented in MBSim::Contact, MBSim::SingleContact, and MBSim::Joint.

virtual void MBSim::Link::solveImpactsRootFinding ( double  dt)
inlinevirtual

solve impact equations of motion with Newton scheme on velocity level

Parameters
timestep-size

Reimplemented in MBSim::Contact, MBSim::SingleContact, and MBSim::Joint.

Member Data Documentation

fmatvec::VecInt MBSim::Link::LinkStatus
protected

status of link (default 0) describing which piece of the equation is valid (e.g. stick or slip)

for set valued links with piecewise link equation (e.g. unilateral contacts or coulomb friction)

fmatvec::VecInt MBSim::Link::LinkStatusReg
protected

status of link

for single valued links

fmatvec::Vec MBSim::Link::res
protected

residuum of nonlinear contact equations


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

Impressum / Disclaimer / Datenschutz Generated by doxygen 1.8.5 Valid HTML