20 #ifndef NUMERICS_LINEAR_COMPLEMENTARITY_PROBLEM_H_
21 #define NUMERICS_LINEAR_COMPLEMENTARITY_PROBLEM_H_
23 #include <fmatvec/fmatvec.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>
40 enum LCPSolvingStrategy {
43 ReformulatedNewtonOnly,
44 ReformulatedFixpointOnly,
74 void setStrategy(
const LCPSolvingStrategy & strategy_) {
78 void setJacobianType(
const JacobianType & jacobianType_) {
87 void setDebugLevel(
const unsigned int & DEBUGLEVEL_) {
196 std::ostream& operator <<(std::ostream & o,
const LinearComplementarityProblem::LCPSolvingStrategy &strategy);
198 std::ostream& operator <<(std::ostream & o,
const LinearComplementarityProblem::JacobianType &jacobianType);
LCPSolvingStrategy strategy
algorithm strategy to solve the LCP
Definition: linear_complementarity_problem.h:133
LCPFixpointReformulationFunction * fixpointFunction
reformulated LCP suited for a FixpointSolver
Definition: linear_complementarity_problem.h:183
Newton method for multidimensional root finding.
Definition: multi_dimensional_newton_method.h:41
LemkeAlgorithm lemkeSolver
LemkeSolver for the direct solution of the LCP.
Definition: linear_complementarity_problem.h:153
class to solve a linear complementarity problem
Definition: linear_complementarity_problem.h:38
LCPSolvingStrategy oldStrategy
save old Strategy for switching...
Definition: linear_complementarity_problem.h:138
LinearComplementarityProblem(const fmatvec::SymMat &M_, const fmatvec::Vec &q_, const LCPSolvingStrategy &strategy_=Standard, const JacobianType &jacobianType_=LCPSpecial, const unsigned int &DEBUGLEVEL=0)
solves a linear complementarity problem (w = M z + q)
Definition: linear_complementarity_problem.cc:76
double mediumEigenValue
parameter for finding the start solution for the reformulated system
Definition: linear_complementarity_problem.h:143
MultiDimensionalFixpointSolver * fixpointSolver
FixpointSolver for reformulated system.
Definition: linear_complementarity_problem.h:178
unsigned int DEBUGLEVEL
Output (information) level.
Definition: linear_complementarity_problem.h:193
Definition: lemke_algorithm.h:28
base class for square Jacobians used for the newton method
Definition: newton_method_jacobian_functions.h:31
fmatvec::Vec q
constant vector of the LCP
Definition: linear_complementarity_problem.h:128
void useFixpoint(fmatvec::Vec &solution, bool &solved)
change the incoming solution vector using the fixpoint scheme
Definition: linear_complementarity_problem.cc:385
NewtonJacobianFunction * jacobianFunction
Jacobian Function for the reformulated LCP.
Definition: linear_complementarity_problem.h:168
MBSim::MultiDimensionalNewtonMethod * newtonSolver
NewtonSolver for reformulated system.
Definition: linear_complementarity_problem.h:158
Mother class for different criterias that are fulfilled or not.
Definition: criteria_functions.h:33
static double computeMediumEigVal(const fmatvec::SqrMat &M)
compute the medium eigenvalue of a matrix (for guessing a initial solution for iterative schemes) ...
Definition: linear_complementarity_problem.cc:298
LCPNewtonReformulationFunction * newtonFunction
reformulated LCP suited for a Newton Solver
Definition: linear_complementarity_problem.h:163
void useNewton(fmatvec::Vec &solution, bool &solved)
change the incoming solution vector using the fixpoint scheme
Definition: linear_complementarity_problem.cc:335
JacobianType jacobianType
jacobian function for the solving with thew newton algorithm in the reformulated case ...
Definition: linear_complementarity_problem.h:148
Fixpoint-Solver for multi-dimensional fixpoint-finding.
Definition: multi_dimensional_fixpoint_solver.h:34
CriteriaFunction * criteriaNewton
criteria function for Newton solver
Definition: linear_complementarity_problem.h:173
CriteriaFunction * criteriaFixedpoint
criteria function for Fixedpoint solver
Definition: linear_complementarity_problem.h:188
fmatvec::SqrMat M
linear coupling matrix of the LCP
Definition: linear_complementarity_problem.h:123
static fmatvec::Vec createInitialSolution(const fmatvec::SymMat &M, const fmatvec::Vec &q, double mediumEigVal=0)
creates an initial solution for the iterative schemes that use a reformulated system ...
Definition: linear_complementarity_problem.cc:307