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

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

#include <mumps_solve.hh>

Inheritance diagram for Kaskade::MUMPSFactorization< Scalar >:
Kaskade::Factorization< Scalar > Kaskade::Factorization< Scalar, SparseIndexInt >

Public Types

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

Public Member Functions

 MUMPSFactorization (MUMPS_INT n_, std::vector< MUMPS_INT > &ridx, std::vector< MUMPS_INT > &cidx, std::vector< Scalar > &values, typename Base::Options options)
 Constructor taking input data in triplet format (aka coordinate format).
 ~MUMPSFactorization ()
void init ()
void analyze (MUMPS_INT *irn, MUMPS_INT *jcn)
void factorize (Scalar *a)
void solve (std::vector< Scalar > const &b, std::vector< Scalar > &x, bool transpose=false) const
 Solves the system for the given right hand side.
void solve (Scalar const *b, Scalar *x, bool transpose=false) const
 Solves the system \( Ax=b \) for the given right hand side \( b \).
void solve (std::vector< Scalar > &b) const
 Solves the system for the given right hand side.
void solve (Scalar *b) const
size_t size () const
 reports the dimension of the system
 MUMPSFactorization (SparseIndexInt n_, std::vector< SparseIndexInt > &ridx, std::vector< SparseIndexInt > &cidx, std::vector< Scalar > &values, MatrixProperties property=MatrixProperties::GENERAL, int verb=0)
 Version of constructor keeping input data in triplet format (aka coordinate format) constant.
 MUMPSFactorization (SparseIndexInt n_, std::unique_ptr< std::vector< SparseIndexInt > > ridx, std::unique_ptr< std::vector< SparseIndexInt > > cidx, std::unique_ptr< std::vector< Scalar > > values, MatrixProperties property=MatrixProperties::GENERAL, int verb=0)
 Version of constructor, that destroys input data before factorization: more memory efficient.
 ~MUMPSFactorization ()
void init (MatrixProperties property)
void analyze (SparseIndexInt *irn, SparseIndexInt *jcn)
void factorize (Scalar *a)
void solve (std::vector< Scalar > const &b, std::vector< Scalar > &x, bool transpose=false) const
void solve (std::vector< Scalar > &b) const
void setVerbose (int verbose_)
int getVerbose () const
Info const & info () const
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

Options options
Info info_
Options options
Info info_

Detailed Description

template<class Scalar>
class Kaskade::MUMPSFactorization< Scalar >

Factorization of sparse linear systems with mumps.

Definition at line 40 of file mumps_solve.hh.

Member Typedef Documentation

◆ field_type [1/2]

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.

◆ field_type [2/2]

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 [1/2]

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

Definition at line 50 of file factorization.hh.

◆ Options [2/2]

using Kaskade::Factorization< Scalar >::Options
inherited

Definition at line 50 of file factorization.hh.

Constructor & Destructor Documentation

◆ MUMPSFactorization() [1/3]

template<class Scalar>
Kaskade::MUMPSFactorization< Scalar >::MUMPSFactorization ( MUMPS_INT n_,
std::vector< MUMPS_INT > & ridx,
std::vector< MUMPS_INT > & cidx,
std::vector< Scalar > & values,
typename Base::Options options )
inline

Constructor taking input data in triplet format (aka coordinate format).

Construction is factorization!

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

Definition at line 69 of file mumps_solve.hh.

◆ ~MUMPSFactorization() [1/2]

Definition at line 94 of file mumps_solve.hh.

◆ MUMPSFactorization() [2/3]

template<class Scalar>
Kaskade::MUMPSFactorization< Scalar >::MUMPSFactorization ( SparseIndexInt n_,
std::vector< SparseIndexInt > & ridx,
std::vector< SparseIndexInt > & cidx,
std::vector< Scalar > & values,
MatrixProperties property = MatrixProperties::GENERAL,
int verb = 0 )
inline

Version of 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 49 of file mumpsmpi_solve.hh.

◆ MUMPSFactorization() [3/3]

template<class Scalar>
Kaskade::MUMPSFactorization< Scalar >::MUMPSFactorization ( SparseIndexInt n_,
std::unique_ptr< std::vector< SparseIndexInt > > ridx,
std::unique_ptr< std::vector< SparseIndexInt > > cidx,
std::unique_ptr< std::vector< Scalar > > values,
MatrixProperties property = MatrixProperties::GENERAL,
int verb = 0 )
inline

Version of constructor, that destroys 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 85 of file mumpsmpi_solve.hh.

◆ ~MUMPSFactorization() [2/2]

Definition at line 113 of file mumpsmpi_solve.hh.

Member Function Documentation

◆ analyze() [1/2]

template<class Scalar>
void Kaskade::MUMPSFactorization< Scalar >::analyze ( MUMPS_INT * irn,
MUMPS_INT * jcn )
inline

Definition at line 131 of file mumps_solve.hh.

Referenced by MUMPSFactorization(), MUMPSFactorization(), and MUMPSFactorization().

◆ analyze() [2/2]

template<class Scalar>
void Kaskade::MUMPSFactorization< Scalar >::analyze ( SparseIndexInt * irn,
SparseIndexInt * jcn )
inline

Definition at line 146 of file mumpsmpi_solve.hh.

◆ factorize() [1/2]

template<class Scalar>
void Kaskade::MUMPSFactorization< Scalar >::factorize ( Scalar * a)
inline

Definition at line 157 of file mumps_solve.hh.

Referenced by MUMPSFactorization(), MUMPSFactorization(), and MUMPSFactorization().

◆ factorize() [2/2]

template<class Scalar>
void Kaskade::MUMPSFactorization< Scalar >::factorize ( Scalar * a)
inline

Definition at line 163 of file mumpsmpi_solve.hh.

◆ getVerbose() [1/2]

◆ getVerbose() [2/2]

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

Definition at line 116 of file factorization.hh.

◆ info() [1/2]

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

Definition at line 118 of file factorization.hh.

◆ info() [2/2]

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

Definition at line 118 of file factorization.hh.

◆ init() [1/2]

template<class Scalar>
void Kaskade::MUMPSFactorization< Scalar >::init ( )
inline

Definition at line 101 of file mumps_solve.hh.

Referenced by MUMPSFactorization(), MUMPSFactorization(), and MUMPSFactorization().

◆ init() [2/2]

template<class Scalar>
void Kaskade::MUMPSFactorization< Scalar >::init ( MatrixProperties property)
inline

Definition at line 120 of file mumpsmpi_solve.hh.

◆ setVerbose() [1/2]

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

◆ setVerbose() [2/2]

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

Definition at line 115 of file factorization.hh.

◆ size()

template<class Scalar>
size_t Kaskade::MUMPSFactorization< Scalar >::size ( ) const
inlinevirtual

reports the dimension of the system

Implements Kaskade::Factorization< Scalar >.

Definition at line 227 of file mumps_solve.hh.

Referenced by MUMPSFactorization(), MUMPSFactorization(), and MUMPSFactorization().

◆ solve() [1/7]

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

template<class Scalar>
void Kaskade::MUMPSFactorization< Scalar >::solve ( Scalar * b) const
inline

Definition at line 217 of file mumps_solve.hh.

◆ solve() [3/7]

template<class Scalar>
void Kaskade::MUMPSFactorization< Scalar >::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 199 of file mumps_solve.hh.

◆ solve() [4/7]

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

Solves the system for the given right hand side.

  • b, which is overwritten with the solution.

Reimplemented from Kaskade::Factorization< Scalar >.

Definition at line 211 of file mumps_solve.hh.

◆ solve() [5/7]

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

Solves the system for the given right hand side

  • b, which is overwritten with the solution.

Reimplemented from Kaskade::Factorization< Scalar >.

Definition at line 189 of file mumpsmpi_solve.hh.

◆ solve() [6/7]

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

Solves the system for the given right hand side.

  • b.
Parameters
xis resized to the number of matrix columns.

Reimplemented from Kaskade::Factorization< Scalar >.

Definition at line 191 of file mumps_solve.hh.

Referenced by solve(), solve(), and solve().

◆ solve() [7/7]

template<class Scalar>
void Kaskade::MUMPSFactorization< Scalar >::solve ( std::vector< Scalar > const & b,
std::vector< Scalar > & x,
bool transpose = 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 174 of file mumpsmpi_solve.hh.

Member Data Documentation

◆ info_ [1/2]

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

◆ info_ [2/2]

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

Definition at line 127 of file factorization.hh.

◆ options [1/2]

◆ options [2/2]

Options Kaskade::Factorization< Scalar >::options
protectedinherited

Definition at line 126 of file factorization.hh.


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