So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
bogus::BlockSolverBase< BlockMatrixType > Class Template Reference

Base class for solvers that operate on BlockMatrixBase matrices. More...

#include <BlockSolverBase.hpp>

Inheritance diagram for bogus::BlockSolverBase< BlockMatrixType >:
bogus::ConstrainedSolverBase< Derived, BlockMatrixType > bogus::Krylov< BlockMatrixType, PreconditionerType > bogus::ConstrainedSolverBase< ADMM< BlockMatrixType >, BlockMatrixType > bogus::ConstrainedSolverBase< DualAMA< BlockMatrixType >, BlockMatrixType > bogus::ConstrainedSolverBase< GaussSeidel< BlockMatrixType >, BlockMatrixType > bogus::ConstrainedSolverBase< GaussSeidelImpl, BlockMatrixType > bogus::ConstrainedSolverBase< ProductGaussSeidel< BlockMatrixType, DiagonalType, PrecomputeDMt >, BlockMatrixType > bogus::ConstrainedSolverBase< ProjectedGradient< BlockMatrixType >, BlockMatrixType >

Public Types

typedef BlockMatrixTraits
< BlockMatrixType > 
BlockTraits
 
typedef BlockTraits::Scalar Scalar
 
typedef ProblemTraits< Scalar > GlobalProblemTraits
 
typedef Signal< unsigned, Scalar > CallBackType
 

Public Member Functions

void setMaxIters (unsigned maxIters)
 For iterative solvers: sets the maximum number of iterations.
 
unsigned maxIters () const
 
void setTol (Scalar tol)
 For iterative solvers: sets the solver tolerance.
 
Scalar tol () const
 
CallBackTypecallback ()
 Callback hook; will be triggered every N iterations, depending on the solver. More...
 
const CallBackTypecallback () const
 
const BlockObjectBase
< BlockMatrixType > & 
matrix () const
 

Protected Member Functions

 BlockSolverBase (const BlockObjectBase< BlockMatrixType > *matrix=(static_cast< const BlockObjectBase< BlockMatrixType > * >(0)), unsigned maxIters=0, Scalar tol=0)
 

Protected Attributes

const BlockObjectBase
< BlockMatrixType > * 
m_matrix
 Pointer to the matrix of the system.
 
unsigned m_maxIters
 See setMaxIters()
 
Scalar m_tol
 See setTol()
 
CallBackType m_callback
 

Detailed Description

template<typename BlockMatrixType>
class bogus::BlockSolverBase< BlockMatrixType >

Base class for solvers that operate on BlockMatrixBase matrices.

Member Function Documentation

template<typename BlockMatrixType >
CallBackType& bogus::BlockSolverBase< BlockMatrixType >::callback ( )

Callback hook; will be triggered every N iterations, depending on the solver.

Useful to monitor the convergence of the solver. Can be connected to a function that takes an unsigned and a Scalar as parameters. The first argument will be the current iteration number, and the second the current residual.

See Also
Signal< unsigned, Scalar >

The documentation for this class was generated from the following file: