KASKADE 7 development version
Public Types | Public Member Functions | Protected Attributes | List of all members
Kaskade::UMFFactorization< Scalar, UMFPackIndex > Class Template Reference

Factorization of sparse linear systems with UMFPack. More...

#include <umfpack_solve.hh>

Detailed Description

template<class Scalar, class UMFPackIndex = int>
class Kaskade::UMFFactorization< Scalar, UMFPackIndex >

Factorization of sparse linear systems with UMFPack.

Template Parameters
Scalarthe scalar matrix entry type
UMFPackIndexthe integer type to be used by UMFPack. Either long or int.

Definition at line 88 of file umfpack_solve.hh.

Inheritance diagram for Kaskade::UMFFactorization< Scalar, UMFPackIndex >:
Kaskade::Factorization< Scalar >

Public Types

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

Public Member Functions

 UMFFactorization (UMFPackIndex n_, std::vector< UMFPackIndex > const &ridx, std::vector< UMFPackIndex > const &cidx, std::vector< Scalar > const &values, FactorizationOptions opt)
 Constructor keeping input data in triplet format (aka coordinate format) constant. Construction is factorization! More...
 
 UMFFactorization (UMFPackIndex n_, std::unique_ptr< std::vector< UMFPackIndex > > const ridx, std::unique_ptr< std::vector< UMFPackIndex > > const cidx, std::unique_ptr< std::vector< Scalar > > const values, FactorizationOptions opt)
 Constructor destroying input data before factorization: more memory efficient. More...
 
void solve (std::vector< Scalar > const &b, std::vector< Scalar > &x, bool transposed=false) const
 
void solve (Scalar const *b, Scalar *x, bool transposed=false) const
 Solves the system \( Ax=b \) for the given right hand side \( b \). More...
 
void solve (std::vector< Scalar > const &b, std::vector< Scalar > &x, int nr, bool transposed=false) const
 
void solve (std::vector< Scalar > &b) const
 Solves the system for the given right hand side. More...
 
void solve (Scalar *b) const
 Solves the system for the given right hand side. More...
 
virtual size_t size () const
 reports the dimension of the system More...
 
void setVerbose (int verbose_)
 
int getVerbose () const
 
Info const & info () const
 

Protected Attributes

Info info_
 

Member Typedef Documentation

◆ field_type

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

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
inherited

Definition at line 50 of file factorization.hh.

Constructor & Destructor Documentation

◆ UMFFactorization() [1/2]

template<class Scalar , class UMFPackIndex = int>
Kaskade::UMFFactorization< Scalar, UMFPackIndex >::UMFFactorization ( UMFPackIndex  n_,
std::vector< UMFPackIndex > const &  ridx,
std::vector< UMFPackIndex > const &  cidx,
std::vector< Scalar > const &  values,
FactorizationOptions  opt 
)
inline

Constructor keeping input data in triplet format (aka coordinate format) constant. Construction is factorization!

Parameters
nsize of the (square) matrix, i.e. the number of rows
ridxrow indices
cidxcolumn indices
valuesentry values

Definition at line 101 of file umfpack_solve.hh.

◆ UMFFactorization() [2/2]

template<class Scalar , class UMFPackIndex = int>
Kaskade::UMFFactorization< Scalar, UMFPackIndex >::UMFFactorization ( UMFPackIndex  n_,
std::unique_ptr< std::vector< UMFPackIndex > > const  ridx,
std::unique_ptr< std::vector< UMFPackIndex > > const  cidx,
std::unique_ptr< std::vector< Scalar > > const  values,
FactorizationOptions  opt 
)
inline

Constructor destroying input data before factorization: more memory efficient.

Construction is factorization!

Parameters
nsize of the (square) matrix, i.e. the number of rows
ridxrow indices
cidxcolumn indices
valuesentry values

Definition at line 129 of file umfpack_solve.hh.

Member Function Documentation

◆ getVerbose()

template<class Scalar >
int Kaskade::Factorization< Scalar >::getVerbose ( ) const
inlineinherited

◆ info()

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

Definition at line 117 of file factorization.hh.

◆ setVerbose()

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

◆ size()

template<class Scalar , class UMFPackIndex = int>
virtual size_t Kaskade::UMFFactorization< Scalar, UMFPackIndex >::size ( ) const
inlinevirtual

reports the dimension of the system

Implements Kaskade::Factorization< Scalar >.

Definition at line 208 of file umfpack_solve.hh.

◆ solve() [1/5]

template<class Scalar , class UMFPackIndex = int>
void Kaskade::UMFFactorization< Scalar, UMFPackIndex >::solve ( Scalar *  b) const
inlinevirtual

Solves the system for the given right hand side.

  • b, which is overwritten with the solution.

This is less efficient than providing the solution vector separately.

Implements Kaskade::Factorization< Scalar >.

Definition at line 198 of file umfpack_solve.hh.

◆ solve() [2/5]

template<class Scalar , class UMFPackIndex = int>
void Kaskade::UMFFactorization< Scalar, UMFPackIndex >::solve ( Scalar const *  b,
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 must point to a memory region of length of system dimension.

Implements Kaskade::Factorization< Scalar >.

Definition at line 165 of file umfpack_solve.hh.

◆ solve() [3/5]

template<class Scalar , class UMFPackIndex = int>
void Kaskade::UMFFactorization< Scalar, UMFPackIndex >::solve ( std::vector< Scalar > &  b) const
inlinevirtual

Solves the system for the given right hand side.

  • b, which is overwritten with the solution.

This is less efficient than providing the solution vector separately.

Reimplemented from Kaskade::Factorization< Scalar >.

Definition at line 184 of file umfpack_solve.hh.

◆ solve() [4/5]

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

Solves the system for the given right hand side

  • b.
  • x is resized to the number of matrix columns.

Reimplemented from Kaskade::Factorization< Scalar >.

Definition at line 158 of file umfpack_solve.hh.

Referenced by Kaskade::UMFFactorization< Scalar, UMFPackIndex >::solve(), and Kaskade::Limex< Eq >::step().

◆ solve() [5/5]

template<class Scalar , class UMFPackIndex = int>
void Kaskade::UMFFactorization< Scalar, UMFPackIndex >::solve ( std::vector< Scalar > const &  b,
std::vector< Scalar > &  x,
int  nr,
bool  transposed = false 
) const
inline

Definition at line 170 of file umfpack_solve.hh.

Member Data Documentation

◆ info_

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

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