KASKADE 7 development version
Loading...
Searching...
No Matches
Kaskade::Factorization< Scalar > Class Template Referenceabstract

Abstract base class for matrix factorizations. More...

#include <factorization.hh>

Inheritance diagram for Kaskade::Factorization< Scalar >:
Kaskade::CholmodFactorization< Scalar, Index > Kaskade::MUMPSFactorization< Scalar > Kaskade::SUPERLUFactorization< Scalar > Kaskade::UMFFactorization< Scalar, UMFPackIndex >

Classes

struct  Info
 The Info struct provides output information of direct solvers. More...

Public Types

typedef Scalar field_type
 The type of matrix elements (a field type).
using Options = FactorizationOptions

Public Member Functions

 Factorization ()=default
 Factorization (Options options_)
virtual ~Factorization ()
void setVerbose (int verbose_)
int getVerbose () const
Info const & info () const
virtual size_t size () const =0
 reports the dimension of the system
System solution
virtual void solve (std::vector< field_type > &b) const
 Solves the system \( Ax=b \) for the given right hand side \( b \).
virtual void solve (field_type *b) const =0
 Solves the system \( Ax=b \) for the given right hand side \( b \).
virtual void solve (std::vector< Scalar > const &b, std::vector< Scalar > &x, bool transposed=false) const
 Solves the system \( Ax=b \) for the given right hand side \( b \).
virtual void solve (Scalar const *b, Scalar *x, bool transposed=false) const =0
 Solves the system \( Ax=b \) for the given right hand side \( b \).

Protected Attributes

Options options
Info info_

Detailed Description

template<class Scalar>
class Kaskade::Factorization< Scalar >

Abstract base class for matrix factorizations.

Template Parameters
Scalarthe underlying field type of the matrix elements.

Definition at line 42 of file factorization.hh.

Member Typedef Documentation

◆ field_type

template<class Scalar>
typedef Scalar Kaskade::Factorization< Scalar >::field_type

The type of matrix elements (a field type).

Definition at line 48 of file factorization.hh.

◆ Options

template<class Scalar>
using Kaskade::Factorization< Scalar >::Options = FactorizationOptions

Definition at line 50 of file factorization.hh.

Constructor & Destructor Documentation

◆ Factorization() [1/2]

template<class Scalar>
Kaskade::Factorization< Scalar >::Factorization ( )
default

◆ Factorization() [2/2]

template<class Scalar>
Kaskade::Factorization< Scalar >::Factorization ( Options options_)
inline

Definition at line 113 of file factorization.hh.

◆ ~Factorization()

template<class Scalar>
virtual Kaskade::Factorization< Scalar >::~Factorization ( )
inlinevirtual

Definition at line 114 of file factorization.hh.

Member Function Documentation

◆ getVerbose()

◆ info()

template<class Scalar>
Info const & Kaskade::Factorization< Scalar >::info ( ) const
inline

Definition at line 118 of file factorization.hh.

◆ setVerbose()

template<class Scalar>
void Kaskade::Factorization< Scalar >::setVerbose ( int verbose_)
inline

◆ size()

template<class Scalar>
virtual size_t Kaskade::Factorization< Scalar >::size ( ) const
pure virtual

◆ solve() [1/4]

template<class Scalar>
virtual void Kaskade::Factorization< Scalar >::solve ( field_type * b) const
pure virtual

Solves the system \( Ax=b \) for the given right hand side \( b \).

Parameters
[in,out]bright hand side, is overwritten with the solution \( x \). This must point to a memory region of length of system dimension.

◆ solve() [2/4]

template<class Scalar>
virtual void Kaskade::Factorization< Scalar >::solve ( Scalar const * b,
Scalar * x,
bool transposed = false ) const
pure virtual

Solves the system \( Ax=b \) for the given right hand side \( b \).

Parameters
[in]bthe right hand side
[out]xthe solution. x must point to a memory region of length of system dimension.

Implemented in Kaskade::CholmodFactorization< Scalar, Index >, Kaskade::MUMPSFactorization< Scalar >, Kaskade::SUPERLUFactorization< Scalar >, and Kaskade::UMFFactorization< Scalar, UMFPackIndex >.

◆ solve() [3/4]

template<class Scalar>
virtual void Kaskade::Factorization< Scalar >::solve ( std::vector< field_type > & b) const
inlinevirtual

Solves the system \( Ax=b \) for the given right hand side \( b \).

Parameters
[in,out]bright hand side, is overwritten with the solution \( x \).

Reimplemented in Kaskade::CholmodFactorization< Scalar, Index >, Kaskade::MUMPSFactorization< Scalar >, Kaskade::MUMPSFactorization< Scalar >, Kaskade::PardisoFactorization< Scalar, SparseIndexInt, DIL >, Kaskade::SUPERLUFactorization< Scalar >, and Kaskade::UMFFactorization< Scalar, UMFPackIndex >.

Definition at line 77 of file factorization.hh.

Referenced by solve(), and solve().

◆ solve() [4/4]

template<class Scalar>
virtual void Kaskade::Factorization< Scalar >::solve ( std::vector< Scalar > const & b,
std::vector< Scalar > & x,
bool transposed = false ) const
inlinevirtual

Solves the system \( Ax=b \) for the given right hand side \( b \).

Parameters
[in]bthe right hand side
[out]xthe solution. x is resized if needed.

Reimplemented in Kaskade::CholmodFactorization< Scalar, Index >, Kaskade::MUMPSFactorization< Scalar >, Kaskade::MUMPSFactorization< Scalar >, Kaskade::SUPERLUFactorization< Scalar >, and Kaskade::UMFFactorization< Scalar, UMFPackIndex >.

Definition at line 95 of file factorization.hh.

Member Data Documentation

◆ info_

template<class Scalar>
Info Kaskade::Factorization< Scalar >::info_
protected

Definition at line 127 of file factorization.hh.

Referenced by Kaskade::MUMPSFactorization< Scalar >::factorize(), and info().

◆ options


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