AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agx::NlMixedCp Class Reference

Class that implements a method to solve linear- or nonlinear complementary problems. More...

#include <MixedLCP.h>

+ Inheritance diagram for agx::NlMixedCp:

Classes

class  McpAlgorithm
 Interface class for algorithm to solve general mixed complementarity problem. More...
 

Public Types

typedef agx::ref_ptr< McpAlgorithm > McpAlgorithmRef
 

Public Member Functions

 NlMixedCp (agx::NlMixedCp::McpAlgorithm *mcpAlgorithm)
 
const agx::NlMixedCp::McpAlgorithm * getAlgorithm () const
 
agx::SparseMatrix & getMatrix ()
 
const agx::SparseMatrix & getMatrix () const
 
agx::RealValarray & getQ ()
 
const agx::RealValarray & getQ () const
 
agx::RealValarray & getSigns ()
 
const agx::RealValarray & getSigns () const
 
agx::RealValarray & getSolution ()
 
const agx::RealValarray & getSolution () const
 
agx::SparseRangeReal & getSparseBounds ()
 
const agx::SparseRangeReal & getSparseBounds () const
 
virtual void setSize (agx::UInt numEquations)
 Set the size of the system.
 
virtual agx::UInt solve (agx::Bool warm=false, agx::StabilityReport *stabilityReport=nullptr, agx::INlSolveDataH5 *nlSolveDataH5=nullptr)
 Solves the system, returns the total number of iterations made in the inner (mcp) loop.
 
- 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 NlMixedCpRef create (agx::Solver::NlMcpConfig config, bool gatherStatistics)
 Creates default solver assuming symmetric-, sparse- and lower triangle matrix.
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

virtual ~NlMixedCp ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

Solver::NlMcpConfig m_config
 
agx::IndexSet m_indexSet
 
agx::SparseInverse m_inv
 
agx::SparseMatrix m_matrix
 
agx::UInt m_maxNumOuterIterations
 
agx::NlMixedCp::McpAlgorithmRef m_mcp
 
agx::Real m_outerGlobalTolerance
 
agx::RealValarray m_q
 
agx::RealValarray m_signs
 
agx::SparseRangeReal m_sparseBounds
 
agx::RealValarray m_z
 
agx::RealValarray m_z0
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

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.
 

Detailed Description

Class that implements a method to solve linear- or nonlinear complementary problems.

Definition at line 107 of file MixedLCP.h.

Member Typedef Documentation

◆ McpAlgorithmRef

Constructor & Destructor Documentation

◆ NlMixedCp()

agx::NlMixedCp::NlMixedCp ( agx::NlMixedCp::McpAlgorithm *  mcpAlgorithm)

◆ ~NlMixedCp()

virtual agx::NlMixedCp::~NlMixedCp ( )
protectedvirtual

Member Function Documentation

◆ create()

static NlMixedCpRef agx::NlMixedCp::create ( agx::Solver::NlMcpConfig  config,
bool  gatherStatistics 
)
static

Creates default solver assuming symmetric-, sparse- and lower triangle matrix.

◆ getAlgorithm()

const agx::NlMixedCp::McpAlgorithm * agx::NlMixedCp::getAlgorithm ( ) const

◆ getMatrix() [1/2]

agx::SparseMatrix & agx::NlMixedCp::getMatrix ( )
Returns
the matrix

◆ getMatrix() [2/2]

const agx::SparseMatrix & agx::NlMixedCp::getMatrix ( ) const
Returns
the matrix

◆ getQ() [1/2]

agx::RealValarray & agx::NlMixedCp::getQ ( )
Returns
the negative right hand side q (Hx + q = w)

◆ getQ() [2/2]

const agx::RealValarray & agx::NlMixedCp::getQ ( ) const
Returns
the negative right hand side q (Hx + q = w)

◆ getSigns() [1/2]

agx::RealValarray & agx::NlMixedCp::getSigns ( )
Returns
the signs, should be -1 for constraints +1 for bodies

◆ getSigns() [2/2]

const agx::RealValarray & agx::NlMixedCp::getSigns ( ) const
Returns
the signs, should be -1 for constraints +1 for bodies

◆ getSolution() [1/2]

agx::RealValarray & agx::NlMixedCp::getSolution ( )
Returns
the current solution

◆ getSolution() [2/2]

const agx::RealValarray & agx::NlMixedCp::getSolution ( ) const
Returns
the current solution

◆ getSparseBounds() [1/2]

agx::SparseRangeReal & agx::NlMixedCp::getSparseBounds ( )
Returns
sparse bounds object used by the NLMCP

◆ getSparseBounds() [2/2]

const agx::SparseRangeReal & agx::NlMixedCp::getSparseBounds ( ) const
Returns
sparse bounds object used by the NLMCP

◆ setSize()

virtual void agx::NlMixedCp::setSize ( agx::UInt  numEquations)
virtual

Set the size of the system.

Calling this method will clear all data.

◆ solve()

virtual agx::UInt agx::NlMixedCp::solve ( agx::Bool  warm = false,
agx::StabilityReport *  stabilityReport = nullptr,
agx::INlSolveDataH5 *  nlSolveDataH5 = nullptr 
)
virtual

Solves the system, returns the total number of iterations made in the inner (mcp) loop.

Member Data Documentation

◆ m_config

Solver::NlMcpConfig agx::NlMixedCp::m_config
protected

Definition at line 443 of file MixedLCP.h.

◆ m_indexSet

agx::IndexSet agx::NlMixedCp::m_indexSet
protected

Definition at line 451 of file MixedLCP.h.

◆ m_inv

agx::SparseInverse agx::NlMixedCp::m_inv
protected

Definition at line 452 of file MixedLCP.h.

◆ m_matrix

agx::SparseMatrix agx::NlMixedCp::m_matrix
protected

Definition at line 445 of file MixedLCP.h.

◆ m_maxNumOuterIterations

agx::UInt agx::NlMixedCp::m_maxNumOuterIterations
protected

Definition at line 453 of file MixedLCP.h.

◆ m_mcp

agx::NlMixedCp::McpAlgorithmRef agx::NlMixedCp::m_mcp
protected

Definition at line 444 of file MixedLCP.h.

◆ m_outerGlobalTolerance

agx::Real agx::NlMixedCp::m_outerGlobalTolerance
protected

Definition at line 454 of file MixedLCP.h.

◆ m_q

agx::RealValarray agx::NlMixedCp::m_q
protected

Definition at line 446 of file MixedLCP.h.

◆ m_signs

agx::RealValarray agx::NlMixedCp::m_signs
protected

Definition at line 450 of file MixedLCP.h.

◆ m_sparseBounds

agx::SparseRangeReal agx::NlMixedCp::m_sparseBounds
protected

Definition at line 449 of file MixedLCP.h.

◆ m_z

agx::RealValarray agx::NlMixedCp::m_z
protected

Definition at line 447 of file MixedLCP.h.

◆ m_z0

agx::RealValarray agx::NlMixedCp::m_z0
protected

Definition at line 448 of file MixedLCP.h.


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