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

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

#include <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).
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!
void solve (std::vector< Scalar > const &b, std::vector< Scalar > &x, bool transposed=false) const
 Solves the system \( Ax=b\) (or \( A^T x=b\)for the given right hand side.
void solve (Scalar const *b, Scalar *x, bool transposed=false) const
 Solves the system \( Ax=b \) for the given right hand side \( b \).
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.
void solve (Scalar *b) const
 Solves the system for the given right hand side.
virtual size_t size () const
 reports the dimension of the system
void setVerbose (int verbose_)
int getVerbose () const
Info const & info () const
System solution
virtual void solve (field_type *b) const =0
 Solves the system \( Ax=b \) for the given right hand side \( b \).

Protected Attributes

Info info_

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.

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()

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.

Member Function Documentation

◆ getVerbose()

◆ info()

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

Definition at line 118 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 174 of file umfpack_solve.hh.

Referenced by UMFFactorization().

◆ solve() [1/6]

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

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/6]

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

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.

Definition at line 164 of file umfpack_solve.hh.

◆ solve() [3/6]

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 131 of file umfpack_solve.hh.

◆ solve() [4/6]

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 150 of file umfpack_solve.hh.

◆ solve() [5/6]

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 \( Ax=b\) (or \( A^T x=b\)for the given right hand side.

  • b.
Parameters
[out]xsolution vector (will be resized to the size of the matrix).

Reimplemented from Kaskade::Factorization< Scalar >.

Definition at line 124 of file umfpack_solve.hh.

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

◆ solve() [6/6]

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 136 of file umfpack_solve.hh.

Member Data Documentation

◆ info_

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

Definition at line 127 of file factorization.hh.

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


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