A description of a physical mixed LCP system to be solved. More...
#include <SurgSim/Physics/MlcpPhysicsProblem.h>
Public Member Functions  
virtual  ~MlcpPhysicsProblem () override 
Destructor. More...  
template<typename SubCDerivedType >  
void  updateConstraint (const Eigen::SparseVector< double > &newSubH, const Eigen::MatrixBase< SubCDerivedType > &subC, size_t indexSubC, size_t indexNewSubH) 
Applies a new constraint to a specific Representation. More...  
virtual void  setZero (size_t numDof, size_t numConstraintDof, size_t numConstraints) override 
Resize an MlcpPhysicsProblem and set to zero. More...  
Public Member Functions inherited from SurgSim::Math::MlcpProblem  
virtual  ~MlcpProblem () 
Destructor. More...  
size_t  getSize () const 
Gets the size of the system. More...  
bool  isConsistent () const 
Checks if the sizes of various elements of the system are consistent with each other. More...  
Static Public Member Functions  
static MlcpPhysicsProblem  Zero (size_t numDof, size_t numConstraintDof, size_t numConstraints) 
Initialize an MlcpPhysicsProblem with zero values. More...  
Static Public Member Functions inherited from SurgSim::Math::MlcpProblem  
static MlcpProblem  Zero (size_t numDof, size_t numConstraintDof, size_t numConstraints) 
Initialize an MlcpProblem with zero values. More...  
Public Attributes  
Matrix  H 
The matrix \(\mathbf{H}\), which is a matrix of size \(c\times n\) that converts from the \(n\) degrees of freedom in the system (i.e., the sum of all the DOF over all the representations in the scene), to the \(c\) degrees of freedom summed over all the constraints being applied to the system. More...  
Matrix  CHt 
The matrix \(\mathbf{C\;H^T}\), which is a matrix of size \(n\times c\) that is used to convert the vector of \(c\) constraint forces to the \(n\) displacements of each degree of freedom of the system. More...  
Public Attributes inherited from SurgSim::Math::MlcpProblem  
Matrix  A 
Matrix \(\mathbf{A}\) used to describe the mixed LCP problem. More...  
Vector  b 
Vector \(b\) used to describe the mixed LCP problem. More...  
Vector  mu 
A vector of friction coefficients used to describe the mixed LCP problem. More...  
std::vector< MlcpConstraintType >  constraintTypes 
A vector of constraint types used to describe the mixed LCP problem. More...  
Additional Inherited Members  
Public Types inherited from SurgSim::Math::MlcpProblem  
typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >  Matrix 
typedef Eigen::Matrix< double, Eigen::Dynamic, 1 >  Vector 
A description of a physical mixed LCP system to be solved.
This extends the pure mathematical MLCP problem by storing the intermediate matrices H and CHt that are necessary to physically interpret the solution.
Note that the matrix \(\mathbf{A}\) used in the MlcpProblem is computed in the physical problem as \(\mathbf{H\;C\;H^T}\), where \(\mathbf{C}\) is the compliance matrix. For contact constraints, \(b\) is the initial signed displacements between the colliding representations, \(b_i \lt 0\) when the representations interpenetrate, \(x\) is the forces to apply at each contact to prevent penetration, and \(c\) is the signed displacements after the forces are applied.

overridevirtual 
Destructor.

overridevirtual 
Resize an MlcpPhysicsProblem and set to zero.
numDof  the total degrees of freedom. 
numConstraintDof  the total constrained degrees of freedom. 
numConstraints  the number of constraints. 
Reimplemented from SurgSim::Math::MlcpProblem.
void SurgSim::Physics::MlcpPhysicsProblem::updateConstraint  (  const Eigen::SparseVector< double > &  newSubH, 
const Eigen::MatrixBase< SubCDerivedType > &  subC,  
size_t  indexSubC,  
size_t  indexNewSubH  
) 
Applies a new constraint to a specific Representation.
newSubH  New constraint to be added to H 
subC  Compliance matrix associated with the Representation 
indexSubC  Index of the Representation's compliance matrix 
indexNewSubH  Index of the new constraint within H 
SubCDerivedType  the CRTP derived type of the passed subC matrix, which usually can be deduced 

static 
Initialize an MlcpPhysicsProblem with zero values.
numDof  the total degrees of freedom for the MlcpPhysicsProblem to be constructed. 
numConstraintDof  the total constrained degrees of freedom for the MlcpPhysicsProblem to be constructed. 
numConstraints  the number of constraints for the MlcpPhysicsProblem to be constructed. 
Matrix SurgSim::Physics::MlcpPhysicsProblem::CHt 
The matrix \(\mathbf{C\;H^T}\), which is a matrix of size \(n\times c\) that is used to convert the vector of \(c\) constraint forces to the \(n\) displacements of each degree of freedom of the system.
Matrix SurgSim::Physics::MlcpPhysicsProblem::H 
The matrix \(\mathbf{H}\), which is a matrix of size \(c\times n\) that converts from the \(n\) degrees of freedom in the system (i.e., the sum of all the DOF over all the representations in the scene), to the \(c\) degrees of freedom summed over all the constraints being applied to the system.
It is used to convert the vector of \(n\) displacements of each degree of freedom of the system to the vector of \(c\) displacements of each degree of freedom of the constraints. Given a set of constraints \(\mathbf{G}(t, \mathbf{x})\), then \(\mathbf{H} = \frac{d \mathbf{G}}{d \mathbf{x}}\) (i.e., the constraints' tangential space).