Go to the documentation of this file.
16 #ifndef SURGSIM_MATH_MLCPPROBLEM_H
17 #define SURGSIM_MATH_MLCPPROBLEM_H
62 typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
Matrix;
63 typedef Eigen::Matrix<double, Eigen::Dynamic, 1>
Vector;
89 return (
b.rows() >= 0) ? static_cast<size_t>(
b.rows()) : 0;
97 return ((
b.rows() >= 0) && (
b.cols() == 1) && (
A.rows() ==
b.rows()) && (
A.cols() ==
A.rows())
98 && (numConstraintTypes <= static_cast<size_t>(
b.rows())) && (
mu.size() >= 0));
105 virtual void setZero(
size_t numDof,
size_t numConstraintDof,
size_t numConstraints);
112 static MlcpProblem Zero(
size_t numDof,
size_t numConstraintDof,
size_t numConstraints);
118 #endif // SURGSIM_MATH_MLCPPROBLEM_H
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
Definition: MlcpProblem.h:62
Definition: CompoundShapeToGraphics.cpp:29
virtual ~MlcpProblem()
Destructor.
Definition: MlcpProblem.cpp:23
Vector mu
A vector of friction coefficients used to describe the mixed LCP problem.
Definition: MlcpProblem.h:71
A description of an MLCP (mixed linear complementarity problem, or mixed LCP) system to be solved.
Definition: MlcpProblem.h:57
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Definition: MlcpProblem.h:63
Vector b
Vector used to describe the mixed LCP problem.
Definition: MlcpProblem.h:68
std::vector< MlcpConstraintType > constraintTypes
A vector of constraint types used to describe the mixed LCP problem.
Definition: MlcpProblem.h:74
virtual void setZero(size_t numDof, size_t numConstraintDof, size_t numConstraints)
Resize an MlcpProblem and set to zero.
Definition: MlcpProblem.cpp:27
static MlcpProblem Zero(size_t numDof, size_t numConstraintDof, size_t numConstraints)
Initialize an MlcpProblem with zero values.
Definition: MlcpProblem.cpp:36
bool isConsistent() const
Checks if the sizes of various elements of the system are consistent with each other.
Definition: MlcpProblem.h:94
size_t getSize() const
Gets the size of the system.
Definition: MlcpProblem.h:87
Matrix A
Matrix used to describe the mixed LCP problem.
Definition: MlcpProblem.h:66