20 #ifndef SELDON_FILE_MUMPS_HXX
42 typedef DMUMPS_STRUC_C data;
43 typedef double* pointer;
52 typedef ZMUMPS_STRUC_C data;
53 typedef mumps_double_complex* pointer;
63 bool parallel_ordering;
73 double coef_overestimate;
74 double coef_increase_memory;
75 double coef_max_overestimate;
76 double threshold_pivot;
88 bool UseInteger8()
const;
109 template<
class T0,
class Prop,
class Storage,
class Allocator>
111 IVect& numbers,
bool keep_matrix =
false);
113 template<
class T0,
class Prop,
class Storage,
class Allocator>
115 bool keep_matrix =
false);
121 template<
class Prop,
class Storage,
class Allocator>
124 template<
class Prop,
class Allocator>
127 template<
class Prop,
class Allocator>
130 template<
class Prop,
class Storage,
class Allocator>
133 template<
class Prop1,
class Storage1,
class Allocator1,
134 class Prop2,
class Storage2,
class Allocator2>
138 bool keep_matrix =
false);
140 template<
class Allocator2>
146 template<
class Allocator2>
149 template<
class Allocator2,
class Prop>
153 #ifdef SELDON_WITH_MPI
154 void FactorizeDistributedMatrix(MPI_Comm& comm_facto,
Vector<long>& Ptr,
157 bool sym,
bool keep_matrix =
false);
159 void FactorizeDistributedMatrix(MPI_Comm& comm_facto,
Vector<int64_t>& Ptr,
162 bool sym,
bool keep_matrix =
false);
164 void FactorizeParallel(MPI_Comm& comm_facto,
Vector<long>& Ptr,
167 bool sym,
bool keep_matrix =
false);
169 void PerformAnalysisDistributed(MPI_Comm& comm_facto,
Vector<long>& Ptr,
172 bool sym,
bool keep_matrix =
false);
174 void PerformAnalysisDistributed(MPI_Comm& comm_facto,
Vector<int64_t>& Ptr,
177 bool sym,
bool keep_matrix =
false);
179 void PerformFactorizationDistributed(MPI_Comm& comm_facto,
Vector<long>& Ptr,
182 bool sym,
bool keep_matrix =
false);
184 void PerformFactorizationDistributed(MPI_Comm& comm_facto,
Vector<int64_t>& Ptr,
187 bool sym,
bool keep_matrix =
false);
189 template<
class Allocator2>
190 void SolveDistributed(MPI_Comm& comm_facto,
193 const IVect& glob_num);
195 template<
class Allocator2,
class Prop>
196 void SolveDistributed(MPI_Comm& comm_facto,
199 const IVect& glob_num);
201 void SolveDistributed(MPI_Comm& comm_facto,
204 const IVect& glob_num);
209 template<
class T0,
class Prop,
class Storage,
class Allocator,
class T>
211 bool keep_matrix =
false);
213 template<
class T,
class Storage,
class Allocator,
class MatrixFull>
216 MatrixFull& schur_matrix,
bool keep_matrix =
false);
218 template<
class T,
class Storage,
class Allocator,
class MatrixFull>
221 MatrixFull& schur_matrix,
bool keep_matrix =
false);
223 template<
class T,
class Allocator>
226 template<
class T,
class Allocator>
230 template<
class Allocator>
234 template<
class Allocator>
239 template<
class Allocator>
240 void SolveLU(
MatrixMumps<complex<double> >& mat_lu,
243 template<
class Allocator>
248 template<
class T,
class Prop,
class Allocator>
252 template<
class T,
class Allocator,
class Prop>
256 template<
class Prop,
class Allocator>
260 template<
class Prop,
class Allocator>
265 template<
class Prop,
class Allocator>
266 void SolveLU(
MatrixMumps<complex<double> >& mat_lu,
269 template<
class Prop,
class Allocator>
276 #define SELDON_FILE_MUMPS_HXX
void SetIncreaseCoefficientEstimationNeededMemory(double)
Sets multiplication factor for each try to factorize the matrix.
void GetSchurMatrix(Matrix< T, Symmetric, Storage, Allocator > &A, MatrixMumps< T > &mat_lu, const IVect &num, MatrixFull &schur_matrix, bool keep_matrix)
computes Schur complement of a symmetric matrix
void FactorizeMatrix(Matrix< T0, Prop, Storage, Allocator > &mat, bool keep_matrix=false)
Factorizes a given matrix.
void SetCoefficientEstimationNeededMemory(double)
Sets the coefficient used to overestimate the needed memory.
void FindOrdering(Matrix< T0, Prop, Storage, Allocator > &mat, IVect &numbers, bool keep_matrix=false)
Computes an ordering for matrix renumbering.
void DisableOutOfCore()
Disables writing on the disk (incore).
int GetInfoFactorization() const
Returns information about factorization performed.
MatrixMumps()
Default constructor.
object used to solve linear system by calling mumps subroutines
void PerformAnalysis(Matrix< T, Prop, Storage, Allocator > &mat)
Symbolic factorization.
void InitMatrix(bool sym, bool dist=false)
Calls initialization routine provided by Mumps.
Row-major sparse-matrix class.
void ShowMessages()
Informs Mumps to display standard output.
TypeMumps< T >::pointer pointer
double* or complex<double>*
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.
void Clear()
Clears factorization.
void SelectParallelOrdering(int num_ordering)
Selects another ordering scheme (for distributed matrices)
TypeMumps< T >::data struct_mumps
object containing Mumps data structure
void SetPivotThreshold(double)
Sets the threshold for pivot.
void SetMaximumCoefficientEstimationNeededMemory(double)
Sets the maximal allowed coefficient for the memory space multiplication.
~MatrixMumps()
Destructor.
void GetLU(Matrix< T0, Prop0, Storage0, Allocator0 > &A)
Returns the LU factorization of a matrix.
Base class for an interface with a direct solver.
Row-major sparse-matrix class.
void PerformFactorization(Matrix< T, Prop, RowSparse, Allocator > &mat)
Numerical factorization.
int type_ordering
ordering scheme (AMD, Metis, etc)
void Solve(const SeldonTranspose &TransA, Vector< T, VectFull, Allocator2 > &x)
Solves a linear system using the computed factorization.
void EnableOutOfCore()
Enables writing on the disk (out of core).
void IterateFacto()
Function used to force factorisation when estimated space was too small.
void SelectOrdering(int num_ordering)
Selects another ordering scheme.
size_t GetMemorySize() const
Returns memory used by the factorisation in bytes.
void SetPermutation(const IVect &permut)
Provides the permutation array.
Column-major full-matrix class.
void HideMessages()
Informs Mumps that no message should be displayed.