20 #ifndef NUMERICS_LINEAR_COMPLEMENTARITY_PROBLEM_H_
21 #define NUMERICS_LINEAR_COMPLEMENTARITY_PROBLEM_H_
25 #include <mbsim/numerics/nonlinear_algebra/multi_dimensional_newton_method.h>
26 #include <mbsim/numerics/nonlinear_algebra/multi_dimensional_fixpoint_solver.h>
27 #include <mbsim/numerics/linear_complementarity_problem/lemke_algorithm.h>
29 #include <mbsim/numerics/functions/lcp_reformulation_functions.h>
33 enum LCPSolvingStrategy {
36 ReformulatedNewtonOnly,
37 ReformulatedFixpointOnly,
52 std::ostream& operator <<(std::ostream & o,
const LCPSolvingStrategy &strategy);
54 std::ostream& operator <<(std::ostream & o,
const JacobianType &jacobianType);
72 LinearComplementarityProblem(
const fmatvec::SymMat & M_,
const fmatvec::Vec & q_,
const LCPSolvingStrategy & strategy_ = Standard,
const JacobianType & jacobianType_ = LCPSpecial,
const unsigned int &
DEBUGLEVEL = 0);
77 void setSystem(
const fmatvec::SymMat & M_,
const fmatvec::Vec & q_);
78 void setStrategy(
const LCPSolvingStrategy & strategy_) {
81 void setJacobianType(
const JacobianType & jacobianType_) {
90 void setDebugLevel(
const unsigned int & DEBUGLEVEL_) {
95 fmatvec::Vec solve(
const fmatvec::Vec & initialSolution = fmatvec::Vec(0, fmatvec::NONINIT));
105 static fmatvec::Vec
createInitialSolution(
const fmatvec::SymMat & M,
const fmatvec::Vec &
q,
double mediumEigVal = 0);
110 static fmatvec::Vec
createInitialSolution(
const fmatvec::SqrMat & M,
const fmatvec::Vec & q,
double mediumEigVal = 0);
116 void useNewton(fmatvec::Vec & solution,
bool & solved);
121 void useFixpoint(fmatvec::Vec & solution,
bool & solved);