So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
bogus::krylov::solvers::BiCG< Matrix, Preconditioner, Traits > Struct Template Reference

Solves ( m_A * x = b ) using the BiConjugate Gradient algorithm. More...

#include <KrylovMethods.hpp>

Inheritance diagram for bogus::krylov::solvers::BiCG< Matrix, Preconditioner, Traits >:
bogus::krylov::KrylovSolverBase< BiCG, Matrix, Preconditioner, Traits > bogus::LinearSolverBase< BiCG< Matrix, Preconditioner, Traits > >

Public Types

typedef KrylovSolverBase
< solvers::BiCG, Matrix,
Preconditioner, Traits > 
Base
 
typedef Traits::Scalar Scalar
 
typedef BiCG< Matrix,
Preconditioner, Traits > 
Derived
 
typedef Signal< unsigned, Scalar > SignalType
 
enum  
 
typedef BlockTraits< typename
LinearSolverTraits< BiCG
< Matrix, Preconditioner,
Traits > >::MatrixType > 
UnderlyingBlockTraits
 

Public Member Functions

 BiCG (const Matrix &A, unsigned maxIters, Scalar tol=NumTraits< Scalar >::epsilon(), const Preconditioner *P=(static_cast< const Preconditioner * >(0)), const typename Base::SignalType *callback=(static_cast< const typename Base::SignalType * >(0)))
 
template<typename RhsT , typename ResT >
Scalar vectorSolve (const RhsT &b, ResT x) const
 
LinearSolverTraits< Derived >
::template Result< RhsT >
::Type 
solve (const RhsT &rhs) const
 Returns the solution x of the linear system M * x = rhs.
 
Scalar solve (const RhsT &rhs, ResT &x) const
 Returns the solution x of the linear system M * x = rhs.
 
Derived & parallelizeRhs (bool parallelize=true)
 Whether to process multiple rhs in parallel.
 
Derived & enableResCaching (bool doCache=true)
 Whether to enable caching of solve(rhs) result for warmstarting purposes. More...
 
const BiCG< Matrix,
Preconditioner, Traits > & 
derived () const
 
BiCG< Matrix, Preconditioner,
Traits > & 
derived ()
 

Public Attributes

const Matrix * m_A
 
const Preconditioner * m_P
 
const SignalTypem_callback
 
Scalar m_tol
 
unsigned m_maxIters
 

Protected Attributes

bool m_parallelizeRhs
 
bool m_enableResCaching
 

Detailed Description

template<typename Matrix, typename Preconditioner = TrivialPreconditioner< Matrix >, typename Traits = ProblemTraits< typename MatrixTraits<Matrix>::Scalar >>
struct bogus::krylov::solvers::BiCG< Matrix, Preconditioner, Traits >

Solves ( m_A * x = b ) using the BiConjugate Gradient algorithm.

Works for non-symmetric linear systems. Convergence not guaranteed. Requires ability to perform transpose multiplication and preconditioning

Matrix-vector mults/iter: 2 ( inc. 1 transpose ) Preconditionner calls/iter: 2 ( inc. 1 transpose ) Storage requirements: 8n

Member Function Documentation

Derived& bogus::krylov::KrylovSolverBase< BiCG , Matrix, Preconditioner, Traits >::enableResCaching ( bool  doCache = true)
inherited

Whether to enable caching of solve(rhs) result for warmstarting purposes.

Warning
Not thread safe for parallel calls to solve(rhs)

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