17#ifndef AGX_DIRECTSOLVERDATA_H
18#define AGX_DIRECTSOLVERDATA_H
31#define to_permuted_matrix_index( lId ) matrix.getBlockPermutedStartRowIndex( lId )
40 LogicalStructure() : m_riCounter( 0 ), m_riIndex( 0 ), m_ciIndex( 0 ), m_dimIndex( 0 ) {}
42 void resize(
size_t riSize,
size_t ciSize,
size_t dimSize )
44 m_ri.resize( riSize, UIntContainer::value_type(-1) );
45 m_ci.resize( ciSize, UIntContainer::value_type(-1) );
46 m_dim.resize( dimSize, UIntContainer::value_type(-1) );
56 m_ri[ m_riIndex ] = (UIntContainer::value_type)m_riCounter;
57 m_dim[ m_dimIndex ] = (UIntContainer::value_type)dim;
65 m_ci[ m_ciIndex ] = (UIntContainer::value_type)colIndex;
72 agxAssert( m_riIndex == m_ri.size() - 1 );
74 m_ri[ m_riIndex ] = (UIntContainer::value_type)m_riCounter;
77 unsigned int*
riPtr() {
return &( m_ri[0]); }
78 unsigned int*
ciPtr() {
return &( m_ci[0]); }
79 unsigned int*
dimPtr() {
return &(m_dim[0]); }
105 enum Buffers { SPLIT, DIRECT, DIRECT_AND_ITERATIVE, NUM_BUFFERS };
123 GroupsContainer m_buffers[ NUM_BUFFERS ];
140 agx::Solver::NlMcpConfig nlMcpConfig,
161 agx::Physics::StrongInteractionData& strongInteractions,
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXPHYSICS_EXPORT
agx::IndexSet & getIndexSet()
StrongInteractionTable m_strongInteractionTable
agx::RealValarray & getQ()
const agx::NlMixedCp::McpAlgorithm * getAlgorithm() const
const agx::SparseMatrix & getMatrix() const
const agx::SparseRangeReal & getSparseBounds() const
agx::SparseRangeReal & getSparseBounds()
agx::HashTable< agx::UInt, agx::UIntVector > StrongInteractionTable
DirectSolverData()=delete
DirectSolverData * clone()
Clones solver data.
void setContactGroups(agx::DirectSolverData::ContactGroups *contactGroups)
Assign new contact groups object.
const agx::RealValarray & getSigns() const
const agx::RealValarray & solve()
Solve the current configuration of the matrix, right hand side and bounds.
const agx::RealValarray & getSolution() const
agx::DirectSolverData::ContactGroups * getContactGroups() const
agx::StabilityReport * getStabilityReport() const
const agx::DirectSolverData::StrongInteractionTable & getStrongInteractionTable() const
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.
void initialize()
Initialize for a new solve.
LogicalStructure m_logicalStructure
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::LogicalStructure & getLogicalStructure() const
virtual ~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 nu...
agx::RealValarray & getSolution()
agx::ref_ptr< ContactGroups > ContactGroupsRef
agx::LogicalStructure & getLogicalStructure()
agx::SparseMatrix & getMatrix()
INlSolveDataH5 * m_nlSolveDataH5
agx::UInt getNumBlockRows() const
StabilityReportRef m_stabilityReport
ContactGroupsRef m_contactGroups
agx::RealValarray & getSigns()
const agx::RealValarray & getQ() const
Inheritance with partial specialization due to bug with ref_ptr containers.
std::valarray< unsigned int > UIntContainer
bool operator==(const LogicalStructure &rhs) const
void insertBlock(size_t colIndex)
void resize(size_t riSize, size_t ciSize, size_t dimSize)
Interface class for algorithm to solve general mixed complementarity problem.
Pointer to a entity instance of type Physics.InteractionGroup.
Pointer to a entity instance of type Physics.SolveIsland.
Base class providing referencing counted objects.
agx::SparseMatrix holds a matrix representation which contains the data.
Essentially a sparse array of bounds.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
std::valarray< agx::Real > RealValarray
For this module, vectors are defined using valarray.