MBSim

Project Page
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
MBSim::MaxwellUnilateralConstraint Class Reference

A force law that computes the normal force of many contact kinematics based on the Maxwell-Force-Law. More...

#include <constitutive_laws.h>

Inheritance diagram for MBSim::MaxwellUnilateralConstraint:
MBSim::GeneralizedForceLaw

List of all members.

Classes

struct  xmlInfo

Public Member Functions

 MaxwellUnilateralConstraint (const double &damping=0, const double &gapLimit=0)
 constructor
virtual ~MaxwellUnilateralConstraint ()
 destructor
virtual bool isActive (double g, double gTol)
virtual bool remainsActive (double s, double sTol)
virtual bool isSetValued () const
virtual void computeSmoothForces (std::vector< std::vector< SingleContact > > &contacts)
 computes the normal forces for smooth constitutive law on every contact point
virtual void initializeUsingXML (MBXMLUtils::TiXmlElement *element)
 initialize the force law using XML
virtual void initializeContourCouplings (Contact *parent)
 initialize all saved contour couplings in the map
void setDebuglevel (int debuglevel)
void setLCPSolvingStrategy (LCPSolvingStrategy strategy)
void addContourCoupling (Contour *contour1, Contour *contour2, InfluenceFunction *fct)
 add a function that represents the coupling between two contours

Protected Member Functions

virtual void updatePossibleContactPoints (const std::vector< std::vector< SingleContact > > &contacts)
 saves all possible contacts in a vector
virtual void updateInfluenceMatrix (std::vector< std::vector< SingleContact > > &contacts)
 updates the influence matrix C
void updateRigidBodyGap (const std::vector< std::vector< SingleContact > > &contacts)
 update the rigid body distances (gaps) for the single contacts
virtual double computeInfluenceCoefficient (std::vector< std::vector< SingleContact > > &contacts, const std::pair< int, int > &contactIndex)
 computes the coupling factor for the influence matrix on one contact point (two contours)
virtual double computeInfluenceCoefficient (std::vector< std::vector< SingleContact > > &contacts, const std::pair< int, int > &contactIndex, const std::pair< int, int > &couplingContactIndex)
 computes the coupling factor for the influence matrix between two contact points (four contours)
virtual void computeMaterialConstant ()

Protected Attributes

std::vector< std::pair< int,
int > > 
possibleContactPoints
 saves the indices of all active contacts in pairs
LinearComplementarityProblem LCP
 variable for the LCP
fmatvec::SymMat C
 Influence matrix between contact points.
fmatvec::Vec rigidBodyGap
std::map< std::pair< Contour
*, Contour * >
, InfluenceFunction * > 
influenceFunctions
 saves the influence functions for a pair of contours.
fmatvec::Vec solution0
 Solution of the last time, where contact has to be solved (can be used as starting guess for the next algorithm)
double dampingCoefficient
 coefficient for possible contact damping
double gLim
 relative contact point distance limit under which damping is active
double matConst
 parameter for guessing starting values of contact force (average eigenvalue of influence-matrix)
bool matConstSetted
 parameter to save if matConst has been computed already
int DEBUGLEVEL
 print INFO output?
std::vector< xmlInfo > referenceXML

Detailed Description

A force law that computes the normal force of many contact kinematics based on the Maxwell-Force-Law.

Author:
Kilian Grundl
Date:
30-07-2012 start of development

Member Function Documentation

add a function that represents the coupling between two contours

Parameters:
nameof first contour
nameof second contour
Functionto describe coupling between contours

Remark: The parameters (LagrangeParameterPositions) of the function have to be in the same order as it was given the add(...)-method

virtual double MBSim::MaxwellUnilateralConstraint::computeInfluenceCoefficient ( std::vector< std::vector< SingleContact > > &  contacts,
const std::pair< int, int > &  contactIndex 
) [protected, virtual]

computes the coupling factor for the influence matrix on one contact point (two contours)

Parameters:
contoursvector of contours that are part of the contact
cpDatavector of ContourPointDatas
contactIndexindex pair of contact point
virtual double MBSim::MaxwellUnilateralConstraint::computeInfluenceCoefficient ( std::vector< std::vector< SingleContact > > &  contacts,
const std::pair< int, int > &  contactIndex,
const std::pair< int, int > &  couplingContactIndex 
) [protected, virtual]

computes the coupling factor for the influence matrix between two contact points (four contours)

Parameters:
contoursvector of contours that are part of the contact
cpDatavector of ContourPointDatas
contactIndexindex pair of contact point
coupledContactIndexindex pair of coupling contact point
virtual void MBSim::MaxwellUnilateralConstraint::computeSmoothForces ( std::vector< std::vector< SingleContact > > &  contact) [virtual]

computes the normal forces for smooth constitutive law on every contact point

Parameters:
contactsvector of contacts that are part of the contact law

Reimplemented from MBSim::GeneralizedForceLaw.

initialize all saved contour couplings in the map

Todo:
: pointer to parent class is probably not optimal (friend class maybe?)
virtual void MBSim::MaxwellUnilateralConstraint::initializeUsingXML ( MBXMLUtils::TiXmlElement *  element) [virtual]

initialize the force law using XML

Parameters:
XMLelement

Reimplemented from MBSim::GeneralizedForceLaw.

virtual bool MBSim::MaxwellUnilateralConstraint::isActive ( double  g,
double  gTol 
) [inline, virtual]
Parameters:
relativedistance
tolerance
Returns:
flag, if force law is active

Reimplemented from MBSim::GeneralizedForceLaw.

virtual bool MBSim::MaxwellUnilateralConstraint::isSetValued ( ) const [inline, virtual]
Returns:
flag if the force law is setvalued

Implements MBSim::GeneralizedForceLaw.

virtual void MBSim::MaxwellUnilateralConstraint::updateInfluenceMatrix ( std::vector< std::vector< SingleContact > > &  contacts) [protected, virtual]

updates the influence matrix C

Parameters:
contoursvector of contours that are part of the contact
cpDatavector of ContourPointDatas

Member Data Documentation

print INFO output?

0 = no DEBUGOutput 1 = most important information 2 = ... 5 = Matrices and Vectors

Todo:
wouldn't a logger for MBSim be nice

saves the influence functions for a pair of contours.

The key is the pair of contour names

std::vector<std::pair<int, int> > MBSim::MaxwellUnilateralConstraint::possibleContactPoints [protected]

saves the indices of all active contacts in pairs

pair.first: number of contact kinematics pair.second: number of subcontact point of contact kinematics


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