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

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

#include <mumps_solve.hh>

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.

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). More...
 
using Options = FactorizationOptions
 
typedef Scalar field_type
 The type of matrix elements (a field type). More...
 
using Options = FactorizationOptions
 

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). More...
 
 ~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. More...
 
void solve (Scalar const *b, Scalar *x, bool transpose=false) const
 Solves the system \( Ax=b \) for the given right hand side \( b \). More...
 
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 \( Ax=b \) for the given right hand side \( b \). More...
 
size_t size () const
 reports the dimension of the system More...
 
 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. More...
 
 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. More...
 
 ~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
 

Protected Attributes

Options options
 
Info info_
 
Options options
 
Info info_
 

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 = FactorizationOptions
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]

template<class Scalar >
Kaskade::MUMPSFactorization< Scalar >::~MUMPSFactorization ( )
inline

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]

template<class Scalar >
Kaskade::MUMPSFactorization< Scalar >::~MUMPSFactorization ( )
inline

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

◆ 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

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

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

Definition at line 115 of file factorization.hh.

◆ getVerbose() [2/2]

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

◆ info() [1/2]

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

Definition at line 117 of file factorization.hh.

◆ info() [2/2]

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

Definition at line 117 of file factorization.hh.

◆ init() [1/2]

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

◆ 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 114 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.

◆ solve() [1/6]

template<class Scalar >
void Kaskade::MUMPSFactorization< Scalar >::solve ( Scalar *  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 \). This must point to a memory region of length of system dimension.

Implements Kaskade::Factorization< Scalar >.

Definition at line 217 of file mumps_solve.hh.

◆ solve() [2/6]

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() [3/6]

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() [4/6]

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() [5/6]

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 Kaskade::MUMPSFactorization< Scalar >::solve().

◆ solve() [6/6]

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

◆ info_ [2/2]

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

Definition at line 126 of file factorization.hh.

◆ options [1/2]

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

◆ options [2/2]

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

Definition at line 125 of file factorization.hh.


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