AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
agx::FrictionControllerNlCallback Class Reference

Solver callback class for elementary FrictionController. More...

#include <FrictionControllerNlCallback.h>

+ Inheritance diagram for agx::FrictionControllerNlCallback:

Classes

struct  ContextData
 

Public Member Functions

 FrictionControllerNlCallback (const FrictionController *frictionController)
 Default constructor.
 
Real calculateNormalForce () const
 
Real calculateNormalForce (const ConstraintImplementation *context) const
 
virtual Real calculateResidual (const NlmcpCallback::Args &args) const override
 Calculate residual given current solution.
 
virtual Bool initialize (const NlmcpCallback::Args &args) override
 This method is a test for the non-linear solver if this callback is active for non-linear solve.
 
virtual void postIterativeSolve (const NlmcpCallback::Args &) const override
 Before direct solve, after iterative solve.
 
virtual void update (const NlmcpCallback::Args &args) const override
 Update call when bounds and/or q may be updated given the current solution z.
 
- Public Member Functions inherited from agx::ConstraintNlmcpCallback
const ConstraintImplementation * getContext () const
 
UInt getContextDirectRow () const
 
UInt getContextIterativeRow () const
 
- Public Member Functions inherited from agx::NlmcpCallback
UInt getDirectRow () const
 
UInt getIterativeRow () const
 
UInt getNumRows () const
 
UInt getSparseBoundsIndex () const
 
void setDirectRow (UInt directRow)
 
void setIterativeRow (UInt iterativeRow)
 
void setNumRows (UInt numRows)
 
void setSparseBoundsIndex (UInt sparseBoundsIndex)
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 

Static Public Member Functions

static RangeReal calculateBound (Real normalImpact, Real frictionCoefficient, RangeReal minBound=RangeReal{ 0.0 })
 
static Real calculateNormalForce (const ConstraintImplementation *context, ContextData contextData)
 
static ContextData findContextData (const FrictionController *frictionController, const ConstraintImplementation *context)
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

virtual ~FrictionControllerNlCallback ()
 
Real calculateNormalImpact (const RealValarray &z) const
 
virtual void onSetContext (const NlmcpCallbackSolverData &) override
 Called when context constraint has been set and all data is valid.
 
- Protected Member Functions inherited from agx::ConstraintNlmcpCallback
 ConstraintNlmcpCallback ()
 
virtual ~ConstraintNlmcpCallback ()
 
- Protected Member Functions inherited from agx::NlmcpCallback
 NlmcpCallback ()
 Default constructor.
 
virtual ~NlmcpCallback ()
 Protected destructor, reference counted object.
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Additional Inherited Members

- 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.
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Solver callback class for elementary FrictionController.

Definition at line 28 of file FrictionControllerNlCallback.h.

Constructor & Destructor Documentation

◆ FrictionControllerNlCallback()

agx::FrictionControllerNlCallback::FrictionControllerNlCallback ( const FrictionController *  frictionController)

Default constructor.

◆ ~FrictionControllerNlCallback()

virtual agx::FrictionControllerNlCallback::~FrictionControllerNlCallback ( )
protectedvirtual

Member Function Documentation

◆ calculateBound()

static RangeReal agx::FrictionControllerNlCallback::calculateBound ( Real  normalImpact,
Real  frictionCoefficient,
RangeReal  minBound = RangeReal{ 0.0 } 
)
static

◆ calculateNormalForce() [1/3]

Real agx::FrictionControllerNlCallback::calculateNormalForce ( ) const

◆ calculateNormalForce() [2/3]

Real agx::FrictionControllerNlCallback::calculateNormalForce ( const ConstraintImplementation *  context) const

◆ calculateNormalForce() [3/3]

static Real agx::FrictionControllerNlCallback::calculateNormalForce ( const ConstraintImplementation *  context,
ContextData  contextData 
)
static

◆ calculateNormalImpact()

Real agx::FrictionControllerNlCallback::calculateNormalImpact ( const RealValarray &  z) const
protected

◆ calculateResidual()

virtual Real agx::FrictionControllerNlCallback::calculateResidual ( const NlmcpCallback::Args &  args) const
overridevirtual

Calculate residual given current solution.

Implements agx::NlmcpCallback.

◆ findContextData()

static ContextData agx::FrictionControllerNlCallback::findContextData ( const FrictionController *  frictionController,
const ConstraintImplementation *  context 
)
static

◆ initialize()

virtual Bool agx::FrictionControllerNlCallback::initialize ( const NlmcpCallback::Args &  args)
overridevirtual

This method is a test for the non-linear solver if this callback is active for non-linear solve.

Returns
true if active and should receive update calls from inner loop of the non-linear solver, false if this callback isn't interested in updates

Implements agx::NlmcpCallback.

◆ onSetContext()

virtual void agx::FrictionControllerNlCallback::onSetContext ( const NlmcpCallbackSolverData &  solverData)
overrideprotectedvirtual

Called when context constraint has been set and all data is valid.

Parameters
solverData- solver related data our context is part of

Reimplemented from agx::ConstraintNlmcpCallback.

◆ postIterativeSolve()

virtual void agx::FrictionControllerNlCallback::postIterativeSolve ( const NlmcpCallback::Args &  args) const
overridevirtual

Before direct solve, after iterative solve.

Implements agx::NlmcpCallback.

◆ update()

virtual void agx::FrictionControllerNlCallback::update ( const NlmcpCallback::Args &  args) const
overridevirtual

Update call when bounds and/or q may be updated given the current solution z.

Implements agx::NlmcpCallback.


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