AGX Dynamics  2.37.3.2
agx::DirectMultiTangentsFrictionModel Class Reference

Friction model with an arbitrary number of tangents in the friction plane. More...

#include <DirectMultiTangentsFrictionModel.h>

+ Inheritance diagram for agx::DirectMultiTangentsFrictionModel:

Public Member Functions

 DirectMultiTangentsFrictionModel (UInt numTangents)
 Construct given number of tangents. More...
 
const char * getClassName () const override
 
UInt getNumTangents () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual void matchForCustomContactImplementation (agxCollide::GeometryContact *geometryContact, agxSDK::Simulation *simulation) override
 Matching the given geometry contact, if match, the geometry contact will be solved using agx::GeometryContactConstraint in the given simulation. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
void setNumTangents (UInt numTangents)
 Set number of tangents in the friction plane. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
- Public Member Functions inherited from agx::ScaleBoxFrictionModel
 ScaleBoxFrictionModel (agx::FrictionModel::SolveType solveType=agx::FrictionModel::SPLIT)
 Default constructor with default (preferred) solve type SPLIT. More...
 
const char * getClassName () const override
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual void initialize (const Physics::GeometryContactPtr geometryContact, size_t pointIndex, Real dt, RangeReal &ret_boundU, RangeReal &ret_boundV) const override
 Initializes the bounds to 0. More...
 
- Public Member Functions inherited from agx::FrictionModel
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agx::FrictionModel)
 
virtual void calculateTangentPlane (const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2, const agx::Vec3 &point, const agx::Vec3 &normal, const agx::Real depth, agx::Vec3 &ret_u, agx::Vec3 &ret_v) const
 Calculates friction plane given normal. More...
 
int getCallbackMask () const
 
bool getEnableCallbackMask (FrictionCallbackType mask) const
 
SolveType getSolveType () const
 
bool hasCustomContactImplementation () const
 
bool needsNlmcpCallbacks () const
 
void setSolveType (SolveType solveType)
 Solve type for a friction model can be either DIRECT (all equations to the direct solver), ITERATIVE (all equations to the iterative solver), SPLIT (normal equations both direct and iterative and tangential equations only iterative) and DIRECT_AND_ITERATIVE (both normal and tangential equations are solved both direct and iterative). More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
void setEnableSerialization (bool flag)
 Set to false to disable serialization of this object. More...
 
void setFinished ()
 Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agx::ScaleBoxFrictionModel
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Member Functions

 DirectMultiTangentsFrictionModel ()
 Default constructor used if restored. More...
 
virtual ~DirectMultiTangentsFrictionModel ()
 Reference counted object, protected destructor. More...
 
- Protected Member Functions inherited from agx::ScaleBoxFrictionModel
 ScaleBoxFrictionModel (int callbackMask, SolveType preferredSolveType)
 
virtual ~ScaleBoxFrictionModel ()
 
- Protected Member Functions inherited from agx::FrictionModel
 FrictionModel (int callbackMask, SolveType preferredSolveType)
 Protected constructor given callback bask and preferred solve type. More...
 
virtual ~FrictionModel ()
 Destructor. More...
 
void restore (agxStream::InputArchive &in) override
 Restore. More...
 
void setEnableCallbackMask (FrictionCallbackType mask, bool enable)
 Enable/disable the given callback mask. More...
 
void store (agxStream::OutputArchive &out) const override
 Store. More...
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Additional Inherited Members

- Public Types inherited from agx::FrictionModel
enum  FrictionCallbackType {
  NONE = 0, INITIALIZE = 1 << 0, SCALE_BOUNDS = 1 << 1, ITERATIVE_PROJECTION = 1 << 2,
  HAS_CUSTOM_CONTACT_IMPLEMENTATION = 1 << 3, ACCURATE_CONE_NL_DIRECT = 1 << 4
}
 
enum  SolveType {
  NOT_DEFINED, DIRECT, ITERATIVE, SPLIT,
  DIRECT_AND_ITERATIVE
}
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Friction model with an arbitrary number of tangents in the friction plane.

This model is only valid with solve type: agx::FrictionModel::DIRECT.

Friction is non-linear where the friction force depends on the normal force and the normal force depends on the friction force. During the non-linear update in the direct solver, this model is selecting two active tangent directions given the current direction of the friction force such that the active tangents aligns with and is orthogonal to the current friction force.

Definition at line 41 of file DirectMultiTangentsFrictionModel.h.

Constructor & Destructor Documentation

◆ DirectMultiTangentsFrictionModel() [1/2]

agx::DirectMultiTangentsFrictionModel::DirectMultiTangentsFrictionModel ( UInt  numTangents)

Construct given number of tangents.

Parameters
numTangents- number of tangents in the friction plane

◆ DirectMultiTangentsFrictionModel() [2/2]

agx::DirectMultiTangentsFrictionModel::DirectMultiTangentsFrictionModel ( )
protected

Default constructor used if restored.

◆ ~DirectMultiTangentsFrictionModel()

virtual agx::DirectMultiTangentsFrictionModel::~DirectMultiTangentsFrictionModel ( )
protectedvirtual

Reference counted object, protected destructor.

Member Function Documentation

◆ create() [1/2]

static agxStream::Serializable* agx::DirectMultiTangentsFrictionModel::create ( )
inlinestatic

Definition at line 71 of file DirectMultiTangentsFrictionModel.h.

◆ create() [2/2]

static agxStream::Serializable* agx::DirectMultiTangentsFrictionModel::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 71 of file DirectMultiTangentsFrictionModel.h.

◆ getClassName()

const char* agx::DirectMultiTangentsFrictionModel::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 71 of file DirectMultiTangentsFrictionModel.h.

◆ getConstructClassId()

static const char* agx::DirectMultiTangentsFrictionModel::getConstructClassId ( )
inlinestatic

Definition at line 71 of file DirectMultiTangentsFrictionModel.h.

◆ getNumTangents()

UInt agx::DirectMultiTangentsFrictionModel::getNumTangents ( ) const
Returns
number of tangents in the friction plane

◆ getStorageAgent()

agxStream::StorageAgent* agx::DirectMultiTangentsFrictionModel::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 71 of file DirectMultiTangentsFrictionModel.h.

◆ matchForCustomContactImplementation()

virtual void agx::DirectMultiTangentsFrictionModel::matchForCustomContactImplementation ( agxCollide::GeometryContact *  geometryContact,
agxSDK::Simulation *  simulation 
)
overridevirtual

Matching the given geometry contact, if match, the geometry contact will be solved using agx::GeometryContactConstraint in the given simulation.

Parameters
geometryContact- geometry contact to match
simulation- simulation the geometry contact is part of

Reimplemented from agx::FrictionModel.

◆ restore()

virtual void agx::DirectMultiTangentsFrictionModel::restore ( agxStream::InputArchive &  in)
overridevirtual

Reimplemented from agx::ScaleBoxFrictionModel.

◆ setNumTangents()

void agx::DirectMultiTangentsFrictionModel::setNumTangents ( UInt  numTangents)

Set number of tangents in the friction plane.

Parameters
numTangents- number of tangents

◆ store()

virtual void agx::DirectMultiTangentsFrictionModel::store ( agxStream::OutputArchive &  out) const
overridevirtual

Reimplemented from agx::ScaleBoxFrictionModel.


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