16 #ifndef SURGSIM_MATH_MLCPPROBLEM_H 17 #define SURGSIM_MATH_MLCPPROBLEM_H 21 #include "SurgSim/Math/MlcpConstraintType.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;
96 size_t numConstraintTypes = constraintTypes.size();
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 Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Matrix A
Matrix used to describe the mixed LCP problem.
Definition: MlcpProblem.h:66
virtual void setZero(size_t numDof, size_t numConstraintDof, size_t numConstraints)
Resize an MlcpProblem and set to zero.
Definition: MlcpProblem.cpp:27
size_t getSize() const
Gets the size of the system.
Definition: MlcpProblem.h:87
static MlcpProblem Zero(size_t numDof, size_t numConstraintDof, size_t numConstraints)
Initialize an MlcpProblem with zero values.
Definition: MlcpProblem.cpp:36
std::vector< MlcpConstraintType > constraintTypes
A vector of constraint types used to describe the mixed LCP problem.
Definition: MlcpProblem.h:74
bool isConsistent() const
Checks if the sizes of various elements of the system are consistent with each other.
Definition: MlcpProblem.h:94
Vector b
Vector used to describe the mixed LCP problem.
Definition: MlcpProblem.h:68
A description of an MLCP (mixed linear complementarity problem, or mixed LCP) system to be solved...
Definition: MlcpProblem.h:57
Vector mu
A vector of friction coefficients used to describe the mixed LCP problem.
Definition: MlcpProblem.h:71
virtual ~MlcpProblem()
Destructor.
Definition: MlcpProblem.cpp:23