chrono::ChContactDVIrolling< Ta, Tb > Class Template Reference

Description

template<class Ta, class Tb>
class chrono::ChContactDVIrolling< Ta, Tb >

Class for DVI contact between two generic ChContactable objects.

It inherits ChContactDVI, that has three reaction forces (N,U,V), but also adds three rolling reaction torques. This means that it requires about 2x the memory required by the ChContactDVI. Ta and Tb are of ChContactable sub classes.

#include <ChContactDVIrolling.h>

Inheritance diagram for chrono::ChContactDVIrolling< Ta, Tb >:
Collaboration diagram for chrono::ChContactDVIrolling< Ta, Tb >:

Public Types

typedef ChContactTuple< Ta, Tb >
::typecarr_a 
typecarr_a
 
typedef ChContactTuple< Ta, Tb >
::typecarr_b 
typecarr_b
 
- Public Types inherited from chrono::ChContactDVI< Ta, Tb >
typedef ChContactTuple< Ta, Tb >
::typecarr_a 
typecarr_a
 
typedef ChContactTuple< Ta, Tb >
::typecarr_b 
typecarr_b
 
- Public Types inherited from chrono::ChContactTuple< Ta, Tb >
typedef
Ta::type_variable_tuple_carrier 
typecarr_a
 
typedef
Tb::type_variable_tuple_carrier 
typecarr_b
 

Public Member Functions

 ChContactDVIrolling (ChContactContainerBase *mcontainer, Ta *mobjA, Tb *mobjB, const collision::ChCollisionInfo &cinfo)
 
virtual void Reset (Ta *mobjA, Tb *mobjB, const collision::ChCollisionInfo &cinfo)
 Initialize again this constraint. More...
 
virtual ChVector GetContactTorque ()
 Get the contact force, if computed, in contact coordinate system.
 
virtual float GetRollingFriction ()
 Get the contact rolling friction coefficient.
 
virtual void SetRollingFriction (float mf)
 Set the contact rolling friction coefficient.
 
virtual float GetSpinningFriction ()
 Get the contact spinning friction coefficient.
 
virtual void SetSpinningFriction (float mf)
 Set the contact spinning friction coefficient.
 
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 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 &mdescriptor)
 
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)
 
- Public Member Functions inherited from chrono::ChContactDVI< Ta, Tb >
 ChContactDVI (ChContactContainerBase *mcontainer, Ta *mobjA, Tb *mobjB, const collision::ChCollisionInfo &cinfo)
 
virtual ChVector GetContactForce () const override
 Get the contact force, if computed, in contact coordinate system.
 
virtual double GetFriction ()
 Get the contact friction coefficient.
 
virtual void SetFriction (double mf)
 Set the contact friction coefficient.
 
- Public Member Functions inherited from chrono::ChContactTuple< Ta, Tb >
 ChContactTuple (ChContactContainerBase *mcontainer, Ta *mobjA, Tb *mobjB, const collision::ChCollisionInfo &cinfo)
 
Ta * GetObjA ()
 Get the colliding object A, with point P1.
 
Tb * GetObjB ()
 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 ChVectorGetContactP1 () const
 Get the contact point 1, in absolute coordinates.
 
const ChVectorGetContactP2 () const
 Get the contact point 2, in absolute coordinates.
 
const ChVectorGetContactNormal () const
 Get the contact normal, in absolute coordinates.
 
double GetContactDistance () const
 Get the contact distance.
 
virtual void ContIntLoadResidual_F (ChVectorDynamic<> &R, const double c)
 
virtual void ContInjectKRMmatrices (ChSystemDescriptor &mdescriptor)
 
virtual void ContKRMmatricesLoad (double Kfactor, double Rfactor)
 

Protected Attributes

ChConstraintTwoTuplesRollingN
< typecarr_a, typecarr_b > 
Rx
 
ChConstraintTwoTuplesRollingT
< typecarr_a, typecarr_b > 
Ru
 
ChConstraintTwoTuplesRollingT
< typecarr_a, typecarr_b > 
Rv
 
ChVector react_torque
 
float complianceRoll
 
float complianceSpin
 
- Protected Attributes inherited from chrono::ChContactDVI< Ta, Tb >
float * reactions_cache
 N,U,V reactions which might be stored in a persistent contact manifold.
 
ChConstraintTwoTuplesContactN
< typecarr_a, typecarr_b > 
Nx
 The three scalar constraints, to be fed into the system solver. More...
 
ChConstraintTwoTuplesFrictionT
< typecarr_a, typecarr_b > 
Tu
 
ChConstraintTwoTuplesFrictionT
< typecarr_a, typecarr_b > 
Tv
 
ChVector react_force
 
double compliance
 
double complianceT
 
double restitution
 
double dampingf
 
- Protected Attributes inherited from chrono::ChContactTuple< Ta, Tb >
ChContactContainerBasecontainer
 associated contact container
 
Ta * objA
 first ChContactable object in the pair
 
Tb * objB
 second ChContactable object in the pair
 
ChVector p1
 max penetration point on geo1, after refining, in abs space
 
ChVector p2
 max penetration point on geo2, after refining, in abs space
 
ChVector 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
 

Constructor & Destructor Documentation

template<class Ta , class Tb >
chrono::ChContactDVIrolling< Ta, Tb >::ChContactDVIrolling ( ChContactContainerBase mcontainer,
Ta *  mobjA,
Tb *  mobjB,
const collision::ChCollisionInfo cinfo 
)
Parameters
mobjAcollidable object A
mobjBcollidable object B

Member Function Documentation

template<class Ta , class Tb >
virtual void chrono::ChContactDVIrolling< Ta, Tb >::ContIntFromDescriptor ( const unsigned int  off_L,
ChVectorDynamic<> &  L 
)
virtual
Parameters
off_Loffset in L

Reimplemented from chrono::ChContactDVI< Ta, Tb >.

template<class Ta , class Tb >
virtual void chrono::ChContactDVIrolling< Ta, Tb >::ContIntLoadConstraint_C ( const unsigned int  off_L,
ChVectorDynamic<> &  Qc,
const double  c,
bool  do_clamp,
double  recovery_clamp 
)
virtual
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

Reimplemented from chrono::ChContactDVI< Ta, Tb >.

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

Reimplemented from chrono::ChContactDVI< Ta, Tb >.

template<class Ta , class Tb >
virtual void chrono::ChContactDVIrolling< Ta, Tb >::ContIntToDescriptor ( const unsigned int  off_L,
const ChVectorDynamic<> &  L,
const ChVectorDynamic<> &  Qc 
)
virtual
Parameters
off_Loffset in L, Qc

Reimplemented from chrono::ChContactDVI< Ta, Tb >.

template<class Ta , class Tb >
virtual void chrono::ChContactDVIrolling< Ta, Tb >::Reset ( Ta *  mobjA,
Tb *  mobjB,
const collision::ChCollisionInfo cinfo 
)
virtual

Initialize again this constraint.

Parameters
mobjAcollidable object A
mobjBcollidable object B

Reimplemented from chrono::ChContactDVI< Ta, Tb >.