DART  6.7.3
dart::constraint::PgsBoxedLcpSolver Class Reference

Implementation of projected Gauss-Seidel (PGS) LCP solver. More...

#include <PgsBoxedLcpSolver.hpp>

Inheritance diagram for dart::constraint::PgsBoxedLcpSolver:
dart::constraint::BoxedLcpSolver

Classes

struct  Option
 

Public Member Functions

const std::string & getType () const override
 Returns the type. More...
 
void solve (int n, double *A, double *x, double *b, int nub, double *lo, double *hi, int *findex) override
 Solves constriant impulses for a constrained group. More...
 
bool canSolve (int n, const double *A) override
 
void setOption (const Option &option)
 Sets options. More...
 
const OptiongetOption () const
 Returns options. More...
 
template<typename BoxedLcpSolverT >
bool is () const
 Get true if this solver and the template parameter (a solver class) are the same type. More...
 

Static Public Member Functions

static const std::string & getStaticType ()
 Returns type for this class. More...
 

Protected Attributes

Option mOption
 
std::vector< int > mCacheOrder
 
std::vector< double > mCacheD
 
Eigen::VectorXd mCachedNormalizedA
 
Eigen::MatrixXd mCachedNormalizedB
 
Eigen::VectorXd mCacheZ
 
Eigen::VectorXd mCacheOldX
 

Detailed Description

Implementation of projected Gauss-Seidel (PGS) LCP solver.

Member Function Documentation

◆ canSolve()

bool dart::constraint::PgsBoxedLcpSolver::canSolve ( int  n,
const double *  A 
)
overridevirtual

◆ getOption()

const PgsBoxedLcpSolver::Option & dart::constraint::PgsBoxedLcpSolver::getOption ( ) const

Returns options.

◆ getStaticType()

const std::string & dart::constraint::PgsBoxedLcpSolver::getStaticType ( )
static

Returns type for this class.

◆ getType()

const std::string & dart::constraint::PgsBoxedLcpSolver::getType ( ) const
overridevirtual

Returns the type.

Implements dart::constraint::BoxedLcpSolver.

◆ is()

template<typename BoxedLcpSolverT >
bool dart::constraint::BoxedLcpSolver::is
inherited

Get true if this solver and the template parameter (a solver class) are the same type.

This function is a syntactic sugar, which is identical to:

getType() == ShapeType::getStaticType()
const std::string & getType() const override
Returns the type.
Definition: PgsBoxedLcpSolver.cpp:64

.

Example code:

auto shape = bodyNode->getShapeNode(0)->getShape();
if (shape->is<BoxShape>())
std::cout << "The shape type is box!\n";
See also
getType()

◆ setOption()

void dart::constraint::PgsBoxedLcpSolver::setOption ( const Option option)

Sets options.

◆ solve()

void dart::constraint::PgsBoxedLcpSolver::solve ( int  n,
double *  A,
double *  x,
double *  b,
int  nub,
double *  lo,
double *  hi,
int *  findex 
)
overridevirtual

Solves constriant impulses for a constrained group.

Implements dart::constraint::BoxedLcpSolver.

Member Data Documentation

◆ mCacheD

std::vector<double> dart::constraint::PgsBoxedLcpSolver::mCacheD
mutableprotected

◆ mCachedNormalizedA

Eigen::VectorXd dart::constraint::PgsBoxedLcpSolver::mCachedNormalizedA
mutableprotected

◆ mCachedNormalizedB

Eigen::MatrixXd dart::constraint::PgsBoxedLcpSolver::mCachedNormalizedB
mutableprotected

◆ mCacheOldX

Eigen::VectorXd dart::constraint::PgsBoxedLcpSolver::mCacheOldX
mutableprotected

◆ mCacheOrder

std::vector<int> dart::constraint::PgsBoxedLcpSolver::mCacheOrder
mutableprotected

◆ mCacheZ

Eigen::VectorXd dart::constraint::PgsBoxedLcpSolver::mCacheZ
mutableprotected

◆ mOption

Option dart::constraint::PgsBoxedLcpSolver::mOption
protected