21 #ifndef SELDON_FILE_COMPUTATION_SPARSESOLVER_HXX
23 #include "Ordering.hxx"
48 #ifdef SELDON_WITH_MPI
50 FactorizeDistributedMatrix(MPI_Comm& comm_facto,
Vector<long>& Ptr,
53 bool sym,
bool keep_matrix =
false);
59 bool sym,
bool keep_matrix =
false);
62 PerformAnalysisDistributed(MPI_Comm& comm_facto,
Vector<long>& Ptr,
65 bool sym,
bool keep_matrix =
false);
71 bool sym,
bool keep_matrix =
false);
74 PerformFactorizationDistributed(MPI_Comm& comm_facto,
Vector<long>& Ptr,
77 bool sym,
bool keep_matrix =
false);
80 PerformFactorizationDistributed(MPI_Comm& comm_facto,
Vector<int64_t>& Ptr,
83 bool sym,
bool keep_matrix =
false);
85 virtual void SolveDistributed(MPI_Comm& comm_facto,
88 const IVect& glob_num);
95 virtual bool UseInteger8()
const = 0;
96 virtual size_t GetMemorySize()
const = 0;
97 virtual int GetInfoFactorization()
const = 0;
99 virtual void Clear() = 0;
100 virtual void HideMessages() = 0;
101 virtual void ShowMessages() = 0;
109 template<
class T,
class Allocator
110 =
typename SeldonDefaultAllocator<ArrayRowSparse, T>::allocator>
131 bool UseInteger8()
const;
136 int GetPrintLevel()
const;
139 int GetInfoFactorization()
const;
141 double GetPivotThreshold()
const;
144 template<
class T0,
class Storage0,
class Allocator0>
147 bool keep_matrix =
false);
149 template<
class T0,
class Storage0,
class Allocator0>
152 bool keep_matrix =
false);
164 template<
class T,
class Allocator>
167 const double& permtol,
int print_level);
169 template<
class T1,
class Allocator1,
170 class T2,
class Storage2,
class Allocator2>
174 template<
class T1,
class Allocator1,
175 class T2,
class Storage2,
class Allocator2>
180 template<
class T,
class Allocator>
183 template<
class T1,
class Allocator1,
184 class T2,
class Storage2,
class Allocator2>
188 template<
class T1,
class Allocator1,
189 class T2,
class Storage2,
class Allocator2>
194 template<
class T0,
class Prop,
class Storage,
class Allocator,
195 class T,
class Alloc2>
198 bool keep_matrix =
false);
200 template<
class T0,
class Prop,
class Storage,
class Allocator,
201 class T,
class Alloc2>
204 IVect& permut,
bool keep_matrix =
false);
206 template<
class T,
class Alloc2,
class T1,
class Allocator>
210 template<
class T,
class Alloc2,
class T1,
class Allocator>
218 #define SELDON_FILE_COMPUTATION_SPARSESOLVER_HXX
void SetPivotThreshold(double)
Sets the threshold for pivot.
double permtol
Threshold for pivoting.
virtual void SelectParallelOrdering(int)
selects ordering to use in parallel for the interfaced solver
virtual void SetPivotThreshold(double)
Sets the threshold for pivot.
virtual ~VirtualSparseDirectSolver()
Destructor.
IVect permutation_row
Permutation arrays.
virtual void SetIncreaseCoefficientEstimationNeededMemory(double coef)
Method overloaded in Mumps solver.
void FactorizeMatrix(const IVect &perm, Matrix< T0, General, Storage0, Allocator0 > &mat, bool keep_matrix=false)
performs LU factorisation of matrix mat
virtual void SelectOrdering(int)
selects ordering to use in the interfaced solver
void GetLU(Matrix< T0, Prop0, Storage0, Allocator0 > &A)
Returns the LU factorization of a matrix.
Base class for an interface with a direct solver.
void SolveLuVector(const Matrix< T0, Prop0, Storage0, Allocator0 > &M, Vector< T1, Storage1, Allocator1 > &Y)
Solves a linear system whose matrix has been LU-factorized.
Default solver in Seldon.
size_t GetMemorySize() const
returns memory used by the object in bytes
Matrix< T, Symmetric, ArrayRowSymSparse, Allocator > mat_sym
Symmetric matrix.
virtual void RefineSolution()
Tells to the direct solver that refinement is required.
virtual void SetPermutation(const Vector< int > &)
gives the ordering array to the interface solver
bool symmetric_matrix
if true the factorisation is contained in mat_sym
Matrix< T, General, ArrayRowSparse, Allocator > mat_unsym
Unsymmetric matrix.
virtual void SetCoefficientEstimationNeededMemory(double coef)
Method overloaded in Mumps solver.
int print_level
Verbosity level.
virtual void SetMaximumCoefficientEstimationNeededMemory(double coef)
Method overloaded in Mumps solver.
virtual void SetNumberOfThreadPerNode(int n)
Sets the number of threads per mpi process.
virtual void DoNotRefineSolution()
Tells to the direct solver that no refinement is required.