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::KrylovSolverBase< Method, Matrix, Preconditioner, Traits > Struct Template Reference

#include <KrylovMethods.hpp>

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

Public Types

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

Public Member Functions

 KrylovSolverBase (const Matrix &A, unsigned maxIters, Scalar tol, const Preconditioner *P, const SignalType *callback)
 
template<typename RhsT >
LinearSolverTraits< Derived >
::template Result< RhsT >
::Type 
solve (const RhsT &rhs) const
 Returns the solution x of the linear system M * x = rhs.
 
template<typename ResT , typename RhsT >
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 Method< Matrix,
Preconditioner, Traits > & 
derived () const
 
Method< 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<template< typename, typename, typename > class Method, typename Matrix, typename Preconditioner, typename Traits>
struct bogus::krylov::KrylovSolverBase< Method, Matrix, Preconditioner, Traits >

Base class for Krylov solvers implementations

Note
These implementations are not able to process multiple rhs simultaneously ; instead they will be solved for sequentially ( or in parallel if parallelizeRhs( true ) has been called )

Member Function Documentation

template<template< typename, typename, typename > class Method, typename Matrix, typename Preconditioner, typename Traits>
Derived& bogus::krylov::KrylovSolverBase< Method, Matrix, Preconditioner, Traits >::enableResCaching ( bool  doCache = true)

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: