28 class SparseRangeReal;
29 class ConstraintImplementation;
30 class DirectSolverData;
50 const Real* iterativeSolutionContacts,
51 const Real* iterativeSolutionBinaryConstraints,
52 const Real* iterativeSolutionManyBodyConstraints,
57 , iterativeSolutionContacts( iterativeSolutionContacts )
58 , iterativeSolutionBinaryConstraints( iterativeSolutionBinaryConstraints )
59 , iterativeSolutionManyBodyConstraints( iterativeSolutionManyBodyConstraints )
60 , solveDataH5( solveDataH5 )
102 UInt getDirectRow()
const;
114 UInt getIterativeRow()
const;
126 UInt getSparseBoundsIndex()
const;
138 UInt getNumRows()
const;
161 UInt m_sparseBoundsIndex;
174 return m_iterativeRow;
179 return m_sparseBoundsIndex;
277 UInt contextDirectRow,
278 UInt contextIterativeRow,
283 UInt m_contextDirectRow;
284 UInt m_contextIterativeRow;
#define AGXPHYSICS_EXPORT
Constraint solver callback interface with context and start rows for context.
virtual void onSetContext(const NlmcpCallbackSolverData &solverData)
Called when context constraint has been set and all data is valid.
UInt getContextDirectRow() const
const ConstraintImplementation * getContext() const
ConstraintNlmcpCallback()
virtual ~ConstraintNlmcpCallback()
UInt getContextIterativeRow() const
Interface class for solver callbacks.
UInt getDirectRow() 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.
virtual void update(const NlmcpCallback::Args &args) const =0
Update call when bounds and/or q may be updated given the current solution z.
UInt getIterativeRow() const
void setDirectRow(UInt directRow)
void setSparseBoundsIndex(UInt sparseBoundsIndex)
virtual Real calculateResidual(const NlmcpCallback::Args &args) const =0
Calculate residual given current solution.
virtual ~NlmcpCallback()
Protected destructor, reference counted object.
void setNumRows(UInt numRows)
NlmcpCallback()
Default constructor.
UInt getSparseBoundsIndex() const
void setIterativeRow(UInt iterativeRow)
Pointer to a entity instance of type Physics.RigidBody.
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
Essentially a sparse array of bounds.
Smart pointer for handling referenced counted objects.
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.
Data from the solver the ConstraintNlmcpCallback is part of.
UInt32 getRigidBodyNumRows(Index globalIndex) const
Finds number of rows the given rigid body index has allocated in the solver.
UInt32 getPermutedDirectStartRow(const RigidBody *rb) const
const Physics::RigidBodyData & rigidBody
Global rigid body data.
UInt32 getNumRows(const RigidBody *rb) const
Finds number of rows the given rigid body has allocated in the solver.
NlmcpCallbackSolverData(const NlmcpCallbackSolverData &)=delete
UInt32 getPermutedDirectStartRow(const Physics::RigidBodyPtr &entity) const
UInt32 getNumRows(const Physics::RigidBodyPtr &entity) const
Finds number of rows the given rigid body entity has allocated in the solver.
const DirectSolverData & directSolverData
Direct solver data the ConstraintNlmcpCallback constraint is part of.
UInt32 getRigidBodyPermutedDirectStartRow(Index globalIndex) const
const Real * iterativeSolutionContacts
const SparseRangeReal & bounds
const Real * iterativeSolutionBinaryConstraints
Args(const Args &)=delete
Args(RealValarray &q, const RealValarray &z, const SparseRangeReal &bounds, const Real *iterativeSolutionContacts, const Real *iterativeSolutionBinaryConstraints, const Real *iterativeSolutionManyBodyConstraints, INlSolveDataH5 *solveDataH5)
INlSolveDataH5 * solveDataH5
const Real * iterativeSolutionManyBodyConstraints