Description

Base class for contact between two generic ChContactable objects.

#include <ChContact.h>

Inheritance diagram for chrono::ChContact:
Collaboration diagram for chrono::ChContact:

Public Member Functions

void Reset_cinfo (ChContactable *obj_A, ChContactable *obj_B, const ChCollisionInfo &cinfo)
 Reinitialize geometric information for this contact for reuse. More...
 
ChContactableGetObjA ()
 Get the colliding object A, with point P1.
 
ChContactableGetObjB ()
 Get the colliding object B, with point P2.
 
ChCoordsys GetContactCoords () const
 Get the contact coordinate system, expressed in absolute frame. More...
 
const ChMatrix33GetContactPlane () const
 Returns the pointer to a contained 3x3 matrix representing the UV and normal directions of the contact. More...
 
const ChVector3dGetContactP1 () const
 Get the contact point 1, in absolute coordinates.
 
const ChVector3dGetContactP2 () const
 Get the contact point 2, in absolute coordinates.
 
const ChVector3dGetContactNormal () const
 Get the contact normal, in absolute coordinates.
 
double GetContactDistance () const
 Get the contact distance.
 
double GetEffectiveCurvatureRadius () const
 Get the effective radius of curvature.
 
virtual ChVector3d GetContactForce () const
 Get the contact force, if computed, in contact coordinate system.
 
virtual ChVector3d GetContactTorque () const
 Get the contact torque, if computed, in contact coordinate system.
 
virtual void ContIntStateGatherReactions (const unsigned int off_L, ChVectorDynamic<> &L)
 
virtual void ContIntStateScatterReactions (const unsigned int off_L, const ChVectorDynamic<> &L)
 
virtual void ContIntLoadResidual_CqL (const unsigned int off_L, ChVectorDynamic<> &R, const ChVectorDynamic<> &L, const double c)
 
virtual void ContIntLoadConstraint_C (const unsigned int off_L, ChVectorDynamic<> &Qc, const double c, bool do_clamp, double recovery_clamp)
 
virtual void ContIntLoadResidual_F (ChVectorDynamic<> &R, const double c)
 
virtual void ContInjectKRMmatrices (ChSystemDescriptor &mdescriptor)
 
virtual void ContKRMmatricesLoad (double Kfactor, double Rfactor)
 
virtual void ContIntToDescriptor (const unsigned int off_L, const ChVectorDynamic<> &L, const ChVectorDynamic<> &Qc)
 
virtual void ContIntFromDescriptor (const unsigned int off_L, ChVectorDynamic<> &L)
 
virtual void InjectConstraints (ChSystemDescriptor &descriptor)
 
virtual void ConstraintsBiReset ()
 
virtual void ConstraintsBiLoad_C (double factor=1., double recovery_clamp=0.1, bool do_clamp=false)
 
virtual void ConstraintsFetch_react (double factor)
 

Protected Member Functions

 ChContact (ChContactContainer *contact_container, ChContactable *obj_A, ChContactable *obj_B)
 

Protected Attributes

ChContactContainercontainer
 associated contact container
 
ChContactableobjA
 first ChContactable object in the pair
 
ChContactableobjB
 second ChContactable object in the pair
 
ChVector3d p1
 max penetration point on geo1, after refining, in abs space
 
ChVector3d p2
 max penetration point on geo2, after refining, in abs space
 
ChVector3d normal
 normal, on surface of master reference (geo1)
 
ChMatrix33 contact_plane
 the plane of contact (X is normal direction)
 
double norm_dist
 penetration distance (negative if going inside) after refining
 
double eff_radius
 effective radius of curvature at contact
 

Member Function Documentation

◆ ContIntFromDescriptor()

virtual void chrono::ChContact::ContIntFromDescriptor ( const unsigned int  off_L,
ChVectorDynamic<> &  L 
)
inlinevirtual
Parameters
off_Loffset in L
Lthe L vector

◆ ContIntLoadConstraint_C()

virtual void chrono::ChContact::ContIntLoadConstraint_C ( const unsigned int  off_L,
ChVectorDynamic<> &  Qc,
const double  c,
bool  do_clamp,
double  recovery_clamp 
)
inlinevirtual
Parameters
off_Loffset in Qc residual
Qcresult: the Qc residual, Qc += c*C
ca scaling factor
do_clampapply clamping to c*C?
recovery_clampvalue for min/max clamping of c*C

◆ ContIntLoadResidual_CqL()

virtual void chrono::ChContact::ContIntLoadResidual_CqL ( const unsigned int  off_L,
ChVectorDynamic<> &  R,
const ChVectorDynamic<> &  L,
const double  c 
)
inlinevirtual
Parameters
off_Loffset in L multipliers
Rresult: the R residual, R += c*Cq'*L
Lthe L vector
ca scaling factor

◆ ContIntToDescriptor()

virtual void chrono::ChContact::ContIntToDescriptor ( const unsigned int  off_L,
const ChVectorDynamic<> &  L,
const ChVectorDynamic<> &  Qc 
)
inlinevirtual
Parameters
off_Loffset in L, Qc
Lthe L vector
Qcthe Qc vector

◆ GetContactCoords()

ChCoordsys chrono::ChContact::GetContactCoords ( ) const

Get the contact coordinate system, expressed in absolute frame.

This represents the 'main' reference of the link: reaction forces are expressed in this coordinate system. Its origin is point P2. (It is the coordinate system of the contact plane and normal)

◆ GetContactPlane()

const ChMatrix33& chrono::ChContact::GetContactPlane ( ) const
inline

Returns the pointer to a contained 3x3 matrix representing the UV and normal directions of the contact.

In detail, the X versor (the 1s column of the matrix) represents the direction of the contact normal.

◆ Reset_cinfo()

void chrono::ChContact::Reset_cinfo ( ChContactable obj_A,
ChContactable obj_B,
const ChCollisionInfo cinfo 
)

Reinitialize geometric information for this contact for reuse.

Parameters
obj_Acontactable object A
obj_Bcontactable object B
cinfodata for the contact pair

The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/physics/ChContact.h
  • /builds/uwsbel/chrono/src/chrono/physics/ChContact.cpp