21 #ifndef BOGUS_FRICTION_PROBLEM_HPP
22 #define BOGUS_FRICTION_PROBLEM_HPP
24 #include "../Core/Block.hpp"
25 #include "../Core/BlockSolvers.fwd.hpp"
27 #include "../Extra/SecondOrder.fwd.hpp"
29 #include "../Core/Utils/Signal.hpp"
56 template<
unsigned Dimension >
67 typedef Eigen::Matrix< double, Dimension, Eigen::Dynamic > HBlock ;
117 double solveWith(
DualAMAType &dama,
double* v,
double * r,
const bool staticProblem =
false )
const ;
129 template<
unsigned Dimension >
205 void undoPermutation() ;
206 bool permuted()
const {
return !m_permutation.empty() ; }
208 const std::vector< std::size_t > &permutation()
const {
return m_permutation ; }
209 const std::vector< std::size_t > &invPermutation()
const {
return m_invPermutation ; }
213 std::vector< std::size_t > m_permutation ;
214 std::vector< std::size_t > m_invPermutation ;
HType H
H – deformation gradient ( generalized coordinates <-> contact basis coordinates ) ...
Definition: FrictionProblem.hpp:70
const double * mu
Coulomb friction coefficients.
Definition: FrictionProblem.hpp:77
Eigen::VectorXd mu
Coulomb friction coefficients.
Definition: FrictionProblem.hpp:150
void computeMInv()
Definition: PrimalFrictionProblem.cpp:31
double solveCadoux(GaussSeidelType &gs, double *r, const unsigned fpIterations, const SignalType *callback=(static_cast< const SignalType * >(0))) const
Solves this problem using the Cadoux algorithm ( with fixed-point iteration )
Definition: FrictionProblem.cpp:80
double solveWith(ProductGaussSeidelType &pgs, double *r, const bool staticProblem=false) const
Matrix-free Gauss-Seidel solver.
Definition: PrimalFrictionProblem.cpp:45
WType W
W – Delassus operator.
Definition: FrictionProblem.hpp:144
ADMM (Alternating Direction Method of Multipliers ) iterative solver.
Definition: ADMM.hpp:44
Projected Gradient iterative solver.
Definition: ProjectedGradient.hpp:41
MType M
M – mass matrix.
Definition: FrictionProblem.hpp:63
Store only half the matrix, or rather the triangular part for which inner <= outer,.
Definition: Constants.hpp:64
Dual AMA iterative solver (Alternating Minimization Algorithm on dual formuation of quadratic optimiz...
Definition: ADMM.hpp:191
const double * w
Free velocity in world coordinates ( such that u = Hv + E^T w )
Definition: FrictionProblem.hpp:75
double solveCadouxVel(GaussSeidelType &gs, double *u, const unsigned fpIterations, const SignalType *callback=(static_cast< const SignalType * >(0))) const
Idem as solveCadoux, but interpreting the problem as r = Wu + b.
Definition: FrictionProblem.cpp:98
bogus::SparseBlockMatrix< Eigen::Matrix< double, Dimension, Dimension > > E
E – local rotation matrix ( contact basis coordinates to world coordinates )
Definition: FrictionProblem.hpp:65
Eigen::VectorXd b
Rhs ( such that u = Wr + b )
Definition: FrictionProblem.hpp:147
Projected Gauss-Seidel iterative solver.
Definition: GaussSeidel.hpp:43
double solveWith(GaussSeidelType &gs, double *r, const bool staticProblem=false) const
Solves this problem.
Definition: FrictionProblem.cpp:46
void computeFrom(const PrimalFrictionProblem< Dimension > &primal)
Computes this DualFrictionProblem from the given primal.
Definition: FrictionProblem.cpp:32
Signal class, to which an arbitrary number of listeners can be connected.
Definition: Signal.hpp:23
Matrix-free version of the GaussSeidel iterative solver.
Definition: ProductGaussSeidel.hpp:41
Non-smooth laws based on Second Order Cone complementarity. To be used within as the first argument t...
Definition: SecondOrder.fwd.hpp:56
Primal Coulomb friction problem for a block-diagonal mass matrix M with dense blocks.
Definition: FrictionProblem.hpp:57
const double * f
External forces.
Definition: FrictionProblem.hpp:73
SparseBlockMatrix< LU< Eigen::MatrixBase< Eigen::MatrixXd > > > MInvType
M^-1.
Definition: FrictionProblem.hpp:82
Dual representation of a Coulomb friction problem, with explicit Delassus operator.
Definition: FrictionProblem.hpp:130
void applyPermutation(const std::vector< std::size_t > &permutation)
Apply a permutation on the contact indices.
Definition: FrictionProblem.cpp:116
double evalWith(const GaussSeidelType &gs, const double *r, const bool staticProblem=false) const
Evaluate a residual using the GS's error function.
Definition: FrictionProblem.cpp:64