22 #ifndef BOGUS_SOCLAW_HPP 
   23 #define BOGUS_SOCLAW_HPP 
   25 #include "FischerBurmeister.hpp" 
   26 #include "LocalSOCSolver.hpp" 
   41 template < DenseIndexType Dimension, 
typename Scalar, 
bool DeSaxceCOV,
 
   46     typedef LocalProblemTraits< Dimension, Scalar > Traits ;
 
   47     enum{ dimension = Dimension } ;
 
   54     SOCLaw( 
const unsigned n, 
const double * mu ) ;
 
   57     Scalar 
eval( 
const unsigned problemIndex,
 
   58                  const typename Traits::Vector &x,
 
   59                  const typename Traits::Vector &y )
 const 
   63         if(m_mu[problemIndex] < 0) 
return y.squaredNorm() ;
 
   65         typename Traits::Vector fb( x.rows() ) ;
 
   66         FBFunction::compute( m_mu[problemIndex], x, y, fb ) ;
 
   68         return fb.squaredNorm() ;
 
   88             const unsigned problemIndex,
 
   89             const typename Traits::Matrix &A,
 
   90             const typename Traits::Vector &b,
 
   91             typename Traits::Vector &x,
 
  102     template< 
typename Segment >
 
  103     void dualityCOV( 
const unsigned problemIndex, 
const Segment& y,
 
  104                      typename Traits::Vector& s )
 const 
  107             Traits::np( s ) = m_mu[problemIndex] * Traits::tp(y).norm() ;
 
  108             Traits::tp( s ).setZero() ;
 
  114     const double * m_mu ;
 
void dualityCOV(const unsigned problemIndex, const Segment &y, typename Traits::Vector &s) const 
Computes the change of variable s(y) so that (x, y+s(y)) obeys an associated law. ...
Definition: SOCLaw.hpp:103
SOCLaw< 3, double, true > Coulomb3D
Predefined non-smooth law for 3D Coulomb friction. 
Definition: SOCLaw.hpp:123
SOCLaw< 3, double, false > SOC3D
Predefined non-smooth law for 3D SOC complementarity. 
Definition: SOCLaw.hpp:127
Scalar eval(const unsigned problemIndex, const typename Traits::Vector &x, const typename Traits::Vector &y) const 
Definition: SOCLaw.hpp:57
bool solveLocal(const unsigned problemIndex, const typename Traits::Matrix &A, const typename Traits::Vector &b, typename Traits::Vector &x, const Scalar scaling) const 
Solves the local problem. 
SOCLaw< 2, double, false > SOC2D
Predefined non-smooth law for 2D SOC complementarity. 
Definition: SOCLaw.hpp:125
Non-smooth laws based on Second Order Cone complementarity. To be used within as the first argument t...
Definition: SecondOrder.fwd.hpp:56
Strategy
Strategy to be used by the local SOC solver. 
Definition: SecondOrder.fwd.hpp:36
SOCLaw< 2, double, true > Coulomb2D
Predefined non-smooth law for 2D Coulomb friction. 
Definition: SOCLaw.hpp:121
SOCLaw(const unsigned n, const double *mu)
Constructor. 
void projectOnConstraint(const unsigned problemIndex, typename Traits::Vector &x) const 
Projects x on . 
Fischer-Burmeister function and jacobian computation, with optional change of variable. 
Definition: FischerBurmeister.hpp:61