AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agx::NlmcpCallback Class Referenceabstract

Interface class for solver callbacks. More...

#include <NlmcpCallback.h>

+ Inheritance diagram for agx::NlmcpCallback:

Classes

struct  Args
 

Public Member Functions

virtual Real calculateResidual (const NlmcpCallback::Args &args) const =0
 Calculate residual given current solution.
 
UInt getDirectRow () const
 
UInt getIterativeRow () const
 
UInt getNumRows () const
 
UInt getSparseBoundsIndex () const
 
virtual Bool initialize (const NlmcpCallback::Args &args)=0
 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 &args) const =0
 Before direct solve, after iterative solve.
 
void setDirectRow (UInt directRow)
 
void setIterativeRow (UInt iterativeRow)
 
void setNumRows (UInt numRows)
 
void setSparseBoundsIndex (UInt sparseBoundsIndex)
 
virtual void update (const NlmcpCallback::Args &args) const =0
 Update call when bounds and/or q may be updated given the current solution z.
 
- 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.
 

Protected Member Functions

 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 Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- 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

Interface class for solver callbacks.

Definition at line 42 of file NlmcpCallback.h.

Constructor & Destructor Documentation

◆ NlmcpCallback()

agx::NlmcpCallback::NlmcpCallback ( )
protected

Default constructor.

◆ ~NlmcpCallback()

virtual agx::NlmcpCallback::~NlmcpCallback ( )
protectedvirtual

Protected destructor, reference counted object.

Member Function Documentation

◆ calculateResidual()

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

Calculate residual given current solution.

Implemented in agx::FrictionControllerNlCallback.

◆ getDirectRow()

UInt agx::NlmcpCallback::getDirectRow ( ) const
Returns
the permuted start row in global matrix

Definition at line 167 of file NlmcpCallback.h.

◆ getIterativeRow()

UInt agx::NlmcpCallback::getIterativeRow ( ) const
Returns
the row used in iterative buffers

Definition at line 172 of file NlmcpCallback.h.

◆ getNumRows()

UInt agx::NlmcpCallback::getNumRows ( ) const
Returns
the number of rows this callback handles

Definition at line 182 of file NlmcpCallback.h.

◆ getSparseBoundsIndex()

UInt agx::NlmcpCallback::getSparseBoundsIndex ( ) const
Returns
the index in sparse bounds (argument in update method)

Definition at line 177 of file NlmcpCallback.h.

◆ initialize()

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

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

Implemented in agx::FrictionControllerNlCallback.

◆ postIterativeSolve()

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

Before direct solve, after iterative solve.

Implemented in agx::FrictionControllerNlCallback.

◆ setDirectRow()

void agx::NlmcpCallback::setDirectRow ( UInt  directRow)

◆ setIterativeRow()

void agx::NlmcpCallback::setIterativeRow ( UInt  iterativeRow)

◆ setNumRows()

void agx::NlmcpCallback::setNumRows ( UInt  numRows)

◆ setSparseBoundsIndex()

void agx::NlmcpCallback::setSparseBoundsIndex ( UInt  sparseBoundsIndex)

◆ update()

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

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

Implemented in agx::FrictionControllerNlCallback.


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