AGX Dynamics 2.41.3.2
Loading...
Searching...
No Matches
agx::DirectSolverData Class Reference

#include <DirectSolverData.h>

+ Inheritance diagram for agx::DirectSolverData:

Classes

class  ContactGroups
 Class that handles the grouping. More...
 

Public Types

typedef agx::ref_ptr< ContactGroupsContactGroupsRef
 
typedef agx::HashTable< agx::UInt, agx::UIntVectorStrongInteractionTable
 

Public Member Functions

 DirectSolverData (agx::UInt numEquations, agx::UInt numBlockRows, agx::UInt numBlocks, agx::Solver::NlMcpConfig nlMcpConfig, agx::Bool gatherStatistics, INlSolveDataH5 *nlSolveDataH5)
 Construct given total number of equations in the direct system, number of block rows and the total number of blocks in the matrix.
 
void buildStrongInteractionTable (agx::Physics::InteractionGroupPtr islandGroup, agx::Physics::StrongInteractionData &strongInteractions, const agxData::IndexArray &globalToLocalIndexArray)
 Builds table that maps a rigid body to the other bodies it interacts with.
 
DirectSolverDataclone ()
 Clones solver data.
 
void commitVelocities (const agxData::IndexArray &indices, agxData::Array< agx::Vec3 > &linearVelocities, agxData::Array< agx::Vec3 > &angularVelocities, const agxData::Array< agx::RigidBodyState > &states) const
 Copy solution to velocity buffers.
 
const agx::NlMixedCp::McpAlgorithmgetAlgorithm () const
 
agx::DirectSolverData::ContactGroupsgetContactGroups () const
 
agx::IndexSetgetIndexSet ()
 
agx::LogicalStructuregetLogicalStructure ()
 
const agx::LogicalStructuregetLogicalStructure () const
 
agx::SparseMatrixgetMatrix ()
 
const agx::SparseMatrixgetMatrix () const
 
agx::UInt getNumBlockRows () const
 
agx::RealValarraygetQ ()
 
const agx::RealValarraygetQ () const
 
agx::RealValarraygetSigns ()
 
const agx::RealValarraygetSigns () const
 
agx::RealValarraygetSolution ()
 
const agx::RealValarraygetSolution () const
 
agx::SparseRangeRealgetSparseBounds ()
 
const agx::SparseRangeRealgetSparseBounds () const
 
agx::StabilityReportgetStabilityReport () const
 
const agx::DirectSolverData::StrongInteractionTablegetStrongInteractionTable () const
 
void initialize ()
 Initialize for a new solve.
 
void setContactGroups (agx::DirectSolverData::ContactGroups *contactGroups)
 Assign new contact groups object.
 
const agx::RealValarraysolve ()
 Solve the current configuration of the matrix, right hand side and bounds.
 
- 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.
 
Referencedoperator= (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

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

Protected Attributes

ContactGroupsRef m_contactGroups
 
LogicalStructure m_logicalStructure
 
NlMixedCpRef m_nlmcp
 
INlSolveDataH5m_nlSolveDataH5
 
UInt m_numBlockRows
 
UInt m_numBlocks
 
UInt m_numEquations
 
UInt m_numSolves
 
StabilityReportRef m_stabilityReport
 
StrongInteractionTable m_strongInteractionTable
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

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 DeleteHandlergetDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
 

Detailed Description

Definition at line 92 of file DirectSolverData.h.

Member Typedef Documentation

◆ ContactGroupsRef

◆ StrongInteractionTable

Constructor & Destructor Documentation

◆ DirectSolverData() [1/2]

agx::DirectSolverData::DirectSolverData ( agx::UInt  numEquations,
agx::UInt  numBlockRows,
agx::UInt  numBlocks,
agx::Solver::NlMcpConfig  nlMcpConfig,
agx::Bool  gatherStatistics,
INlSolveDataH5 nlSolveDataH5 
)

Construct given total number of equations in the direct system, number of block rows and the total number of blocks in the matrix.

Parameters
numEquations- total number of equations
numBlockRows- total number of block rows in matrix
numBlocks- total number of blocks in matrix
nlMcpConfig- direct solver configuration

◆ DirectSolverData() [2/2]

agx::DirectSolverData::DirectSolverData ( )
protecteddelete

◆ ~DirectSolverData()

virtual agx::DirectSolverData::~DirectSolverData ( )
protectedvirtual

Member Function Documentation

◆ buildStrongInteractionTable()

void agx::DirectSolverData::buildStrongInteractionTable ( agx::Physics::InteractionGroupPtr  islandGroup,
agx::Physics::StrongInteractionData &  strongInteractions,
const agxData::IndexArray globalToLocalIndexArray 
)

Builds table that maps a rigid body to the other bodies it interacts with.

Parameters
strongInteractions- strong interactions
globalToLocalIndexArray- index array that maps global body indices to island indices

◆ clone()

DirectSolverData * agx::DirectSolverData::clone ( )

Clones solver data.

◆ commitVelocities()

void agx::DirectSolverData::commitVelocities ( const agxData::IndexArray indices,
agxData::Array< agx::Vec3 > &  linearVelocities,
agxData::Array< agx::Vec3 > &  angularVelocities,
const agxData::Array< agx::RigidBodyState > &  states 
) const

Copy solution to velocity buffers.

Parameters
indices- direct body local to global indices
linearVelocities- linear velocity buffer
angularVelocities- angular velocity buffer
states- states

◆ getAlgorithm()

const agx::NlMixedCp::McpAlgorithm * agx::DirectSolverData::getAlgorithm ( ) const
Returns
The McpAlgorithm used by this solver.

◆ getContactGroups()

agx::DirectSolverData::ContactGroups * agx::DirectSolverData::getContactGroups ( ) const
Returns
the contact grouping, if present (assigned externally)

◆ getIndexSet()

agx::IndexSet & agx::DirectSolverData::getIndexSet ( )
Returns
the current IndexSet

◆ getLogicalStructure() [1/2]

agx::LogicalStructure & agx::DirectSolverData::getLogicalStructure ( )
Returns
the logical structure of the matrix (used to permute the matrix)

◆ getLogicalStructure() [2/2]

const agx::LogicalStructure & agx::DirectSolverData::getLogicalStructure ( ) const

◆ getMatrix() [1/2]

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

◆ getMatrix() [2/2]

const agx::SparseMatrix & agx::DirectSolverData::getMatrix ( ) const

◆ getNumBlockRows()

agx::UInt agx::DirectSolverData::getNumBlockRows ( ) const
Returns
the total number of block rows

◆ getQ() [1/2]

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

◆ getQ() [2/2]

const agx::RealValarray & agx::DirectSolverData::getQ ( ) const

◆ getSigns() [1/2]

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

◆ getSigns() [2/2]

const agx::RealValarray & agx::DirectSolverData::getSigns ( ) const

◆ getSolution() [1/2]

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

◆ getSolution() [2/2]

const agx::RealValarray & agx::DirectSolverData::getSolution ( ) const

◆ getSparseBounds() [1/2]

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

◆ getSparseBounds() [2/2]

const agx::SparseRangeReal & agx::DirectSolverData::getSparseBounds ( ) const

◆ getStabilityReport()

agx::StabilityReport * agx::DirectSolverData::getStabilityReport ( ) const
Returns
the stability report

◆ getStrongInteractionTable()

const agx::DirectSolverData::StrongInteractionTable & agx::DirectSolverData::getStrongInteractionTable ( ) const
Returns
the strong interaction table that maps body to other strong interaction bodies (on the same row)

◆ initialize()

void agx::DirectSolverData::initialize ( )

Initialize for a new solve.

This method can be called many times, e.g., if this object is stored between time steps.

◆ setContactGroups()

void agx::DirectSolverData::setContactGroups ( agx::DirectSolverData::ContactGroups contactGroups)

Assign new contact groups object.

◆ solve()

const agx::RealValarray & agx::DirectSolverData::solve ( )

Solve the current configuration of the matrix, right hand side and bounds.

The solution is stored and is accessible through getSolution().

Returns
the solution of the solve

Member Data Documentation

◆ m_contactGroups

ContactGroupsRef agx::DirectSolverData::m_contactGroups
protected

Definition at line 265 of file DirectSolverData.h.

◆ m_logicalStructure

LogicalStructure agx::DirectSolverData::m_logicalStructure
protected

Definition at line 264 of file DirectSolverData.h.

◆ m_nlmcp

NlMixedCpRef agx::DirectSolverData::m_nlmcp
protected

Definition at line 263 of file DirectSolverData.h.

◆ m_nlSolveDataH5

INlSolveDataH5* agx::DirectSolverData::m_nlSolveDataH5
protected

Definition at line 269 of file DirectSolverData.h.

◆ m_numBlockRows

UInt agx::DirectSolverData::m_numBlockRows
protected

Definition at line 261 of file DirectSolverData.h.

◆ m_numBlocks

UInt agx::DirectSolverData::m_numBlocks
protected

Definition at line 262 of file DirectSolverData.h.

◆ m_numEquations

UInt agx::DirectSolverData::m_numEquations
protected

Definition at line 260 of file DirectSolverData.h.

◆ m_numSolves

UInt agx::DirectSolverData::m_numSolves
protected

Definition at line 266 of file DirectSolverData.h.

◆ m_stabilityReport

StabilityReportRef agx::DirectSolverData::m_stabilityReport
protected

Definition at line 267 of file DirectSolverData.h.

◆ m_strongInteractionTable

StrongInteractionTable agx::DirectSolverData::m_strongInteractionTable
protected

Definition at line 268 of file DirectSolverData.h.


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