Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Seldon::MatrixMumps< T > Class Template Reference

object used to solve linear system by calling mumps subroutines More...

#include <Mumps.hxx>

Inheritance diagram for Seldon::MatrixMumps< T >:
Seldon::VirtualSparseDirectSolver< T >

Public Member Functions

 MatrixMumps ()
 Default constructor.
 
 ~MatrixMumps ()
 Destructor.
 
bool UseInteger8 () const
 
void Clear ()
 Clears factorization.
 
void SelectOrdering (int num_ordering)
 Selects another ordering scheme.
 
void SelectParallelOrdering (int num_ordering)
 Selects another ordering scheme (for distributed matrices)
 
void SetPermutation (const IVect &permut)
 Provides the permutation array.
 
void SetPivotThreshold (double)
 Sets the threshold for pivot.
 
void HideMessages ()
 Informs Mumps that no message should be displayed.
 
void ShowMessages ()
 Informs Mumps to display standard output.
 
void EnableOutOfCore ()
 Enables writing on the disk (out of core).
 
void DisableOutOfCore ()
 Disables writing on the disk (incore).
 
void SetCoefficientEstimationNeededMemory (double)
 Sets the coefficient used to overestimate the needed memory.
 
void SetMaximumCoefficientEstimationNeededMemory (double)
 Sets the maximal allowed coefficient for the memory space multiplication.
 
void SetIncreaseCoefficientEstimationNeededMemory (double)
 Sets multiplication factor for each try to factorize the matrix.
 
size_t GetMemorySize () const
 Returns memory used by the factorisation in bytes.
 
int GetInfoFactorization () const
 Returns information about factorization performed.
 
template<class T0 , class Prop , class Storage , class Allocator >
void FindOrdering (Matrix< T0, Prop, Storage, Allocator > &mat, IVect &numbers, bool keep_matrix=false)
 Computes an ordering for matrix renumbering. More...
 
template<class T0 , class Prop , class Storage , class Allocator >
void FactorizeMatrix (Matrix< T0, Prop, Storage, Allocator > &mat, bool keep_matrix=false)
 Factorizes a given matrix. More...
 
void FactorizeCoordinate1 (int n, Vector< MUMPS_INT > &num_row, Vector< MUMPS_INT > &num_col, Vector< T > &values, bool sym)
 Factorizes a coordinate matrix with 1-index numbering.
 
template<class Prop , class Storage , class Allocator >
void PerformAnalysis (Matrix< T, Prop, Storage, Allocator > &mat)
 Symbolic factorization.
 
template<class Prop , class Allocator >
void PerformFactorization (Matrix< T, Prop, RowSparse, Allocator > &mat)
 Numerical factorization. More...
 
template<class Prop , class Allocator >
void PerformFactorization (Matrix< T, Prop, RowSymSparse, Allocator > &mat)
 Numerical factorization. More...
 
template<class Prop , class Storage , class Allocator >
void PerformFactorization (Matrix< T, Prop, Storage, Allocator > &mat)
 Numerical factorization. More...
 
template<class Prop1 , class Storage1 , class Allocator1 , class Prop2 , class Storage2 , class Allocator2 >
void GetSchurMatrix (Matrix< T, Prop1, Storage1, Allocator1 > &mat, const IVect &num, Matrix< T, Prop2, Storage2, Allocator2 > &mat_schur, bool keep_matrix=false)
 
template<class Allocator2 >
void Solve (const SeldonTranspose &TransA, Vector< T, VectFull, Allocator2 > &x)
 Solves a linear system using the computed factorization. More...
 
void Solve (const SeldonTranspose &, T *x_ptr, int nrhs)
 Solves linear system with multiple right hand sides.
 
template<class Allocator2 >
void Solve (Vector< T, VectFull, Allocator2 > &x)
 Solves a linear system using the factorization computed.
 
template<class Allocator2 , class Prop >
void Solve (const SeldonTranspose &TransA, Matrix< T, Prop, ColMajor, Allocator2 > &x)
 Solves a linear system using a computed factorization. More...
 
template<class Prop1 , class Storage1 , class Allocator , class Prop2 , class Storage2 , class Allocator2 >
void GetSchurMatrix (Matrix< T, Prop1, Storage1, Allocator > &mat, const IVect &num, Matrix< T, Prop2, Storage2, Allocator2 > &mat_schur, bool keep_matrix)
 Computation of Schur complement. More...
 
virtual void RefineSolution ()
 Tells to the direct solver that refinement is required.
 
virtual void DoNotRefineSolution ()
 Tells to the direct solver that no refinement is required.
 
virtual void SetPermutation (const Vector< int > &)
 gives the ordering array to the interface solver
 
virtual void SetNumberOfThreadPerNode (int n)
 Sets the number of threads per mpi process.
 

Protected Types

typedef TypeMumps< T >::pointer pointer
 double* or complex<double>*
 

Protected Member Functions

void CallMumps ()
 
void IterateFacto ()
 Function used to force factorisation when estimated space was too small.
 
void InitMatrix (bool sym, bool dist=false)
 Calls initialization routine provided by Mumps.
 
void CallMumps ()
 Mumps is called in double precision.
 
void CallMumps ()
 Mumps is called in complex double precision.
 

Protected Attributes

int type_ordering
 ordering scheme (AMD, Metis, etc)
 
bool parallel_ordering
 
TypeMumps< T >::data struct_mumps
 object containing Mumps data structure
 
int print_level
 
int info_facto
 
bool out_of_core
 
Vector< MUMPS_INT > num_row_glob
 
Vector< MUMPS_INT > num_col_glob
 
Vector< MUMPS_INT > perm
 
double coef_overestimate
 
double coef_increase_memory
 
double coef_max_overestimate
 
double threshold_pivot
 

Detailed Description

template<class T>
class Seldon::MatrixMumps< T >

object used to solve linear system by calling mumps subroutines

Definition at line 59 of file Mumps.hxx.

Member Function Documentation

◆ FactorizeMatrix()

template<class T >
template<class T0 , class Prop , class Storage , class Allocator >
SELDON_EXTERN template void Seldon::MatrixMumps< T >::FactorizeMatrix ( Matrix< T0, Prop, Storage, Allocator > &  mat,
bool  keep_matrix = false 
)

Factorizes a given matrix.

Parameters
[in,out]matmatrix to factorize
[in]keep_matrixif false, the given matrix is cleared

Definition at line 375 of file Mumps.cxx.

◆ FindOrdering()

template<class T >
template<class T0 , class Prop , class Storage , class Allocator >
SELDON_EXTERN template void Seldon::MatrixMumps< T >::FindOrdering ( Matrix< T0, Prop, Storage, Allocator > &  mat,
IVect numbers,
bool  keep_matrix = false 
)

Computes an ordering for matrix renumbering.

Parameters
[in,out]matmatrix whose we want to find the ordering
[out]numbersnew row numbers
[in]keep_matrixif false, the given matrix is cleared

Definition at line 336 of file Mumps.cxx.

◆ GetSchurMatrix()

template<class T >
template<class Prop1 , class Storage1 , class Allocator , class Prop2 , class Storage2 , class Allocator2 >
void Seldon::MatrixMumps< T >::GetSchurMatrix ( Matrix< T, Prop1, Storage1, Allocator > &  mat,
const IVect num,
Matrix< T, Prop2, Storage2, Allocator2 > &  mat_schur,
bool  keep_matrix 
)

Computation of Schur complement.

Parameters
[in,out]matinitial matrix.
[in]numnumbers to keep in Schur complement.
[out]mat_schurSchur matrix.
[in]keep_matrixif false, mat is cleared.

Definition at line 557 of file Mumps.cxx.

◆ PerformFactorization() [1/3]

template<class T >
template<class Prop , class Allocator >
void Seldon::MatrixMumps< T >::PerformFactorization ( Matrix< T, Prop, RowSparse, Allocator > &  mat)

Numerical factorization.

Be careful, because no conversion is performed in the method, so you have to choose RowSparse/ColSparse for unsymmetric matrices and RowSymSparse/ColSymSparse for symmetric matrices. The other formats should not work

Definition at line 452 of file Mumps.cxx.

◆ PerformFactorization() [2/3]

template<class T >
template<class Prop , class Allocator >
void Seldon::MatrixMumps< T >::PerformFactorization ( Matrix< T, Prop, RowSymSparse, Allocator > &  mat)

Numerical factorization.

Be careful, because no conversion is performed in the method, so you have to choose RowSparse/ColSparse for unsymmetric matrices and RowSymSparse/ColSymSparse for symmetric matrices. The other formats should not work

Definition at line 475 of file Mumps.cxx.

◆ PerformFactorization() [3/3]

template<class T >
template<class Prop , class Storage , class Allocator >
void Seldon::MatrixMumps< T >::PerformFactorization ( Matrix< T, Prop, Storage, Allocator > &  mat)

Numerical factorization.

Be careful, because no conversion is performed in the method, so you have to choose RowSparse/ColSparse for unsymmetric matrices and RowSymSparse/ColSymSparse for symmetric matrices. The other formats should not work

Definition at line 498 of file Mumps.cxx.

◆ Solve() [1/2]

template<class T >
template<class Allocator2 , class Prop >
void Seldon::MatrixMumps< T >::Solve ( const SeldonTranspose TransA,
Matrix< T, Prop, ColMajor, Allocator2 > &  x 
)

Solves a linear system using a computed factorization.

Parameters
[in,out]xon entry, the right-hand-side; on exit, the solution. It is assumed that 'FactorizeMatrix' has already been called.

Definition at line 678 of file Mumps.cxx.

◆ Solve() [2/2]

template<class T >
template<class Allocator2 >
void Seldon::MatrixMumps< T >::Solve ( const SeldonTranspose TransA,
Vector< T, VectFull, Allocator2 > &  x 
)

Solves a linear system using the computed factorization.

Parameters
[in]TransAsolves A x = b or A^T x = b
[in,out]xright-hand-side on input, solution on output It is assumed that a call to FactorizeMatrix has been done before

Definition at line 630 of file Mumps.cxx.


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