16 #ifndef SURGSIM_PHYSICS_MLCPPHYSICSPROBLEM_INL_H 17 #define SURGSIM_PHYSICS_MLCPPHYSICSPROBLEM_INL_H 26 template <
typename SubCDerivedType>
28 const Eigen::SparseVector<double>& newSubH,
29 const Eigen::MatrixBase<SubCDerivedType>& subC,
47 Vector newCHt = subC * newSubH;
48 A.col(indexNewSubH) +=
H.middleCols(indexSubC, subC.rows()) * newCHt;
49 H.block(indexNewSubH, indexSubC, 1, subC.rows()) += newSubH.transpose();
50 CHt.block(indexSubC, indexNewSubH, subC.rows(), 1) += newCHt;
51 A.row(indexNewSubH) += newSubH.transpose() *
CHt.middleRows(indexSubC, subC.rows());
57 #endif // SURGSIM_PHYSICS_MLCPPHYSICSPROBLEM_INL_H Definition: DriveElementFromInputBehavior.cpp:27
Matrix CHt
The matrix , which is a matrix of size that is used to convert the vector of constraint forces to t...
Definition: MlcpPhysicsProblem.h:60
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Definition: MlcpProblem.h:63
Matrix A
Matrix used to describe the mixed LCP problem.
Definition: MlcpProblem.h:66
Matrix H
The matrix , which is a matrix of size that converts from the degrees of freedom in the system (i...
Definition: MlcpPhysicsProblem.h:56
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
A dynamic size column vector.
Definition: Vector.h:67
Definitions of small fixed-size vector types.
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.
Definition: MlcpPhysicsProblem-inl.h:27