20 #ifndef SELDON_FILE_ILUT_PRECONDITIONING_HXX
25 template<
class T,
class Allocator
26 =
typename SeldonDefaultAllocator<ArrayRowSparse, T>::allocator>
48 typename ClassComplexType<T>::Treal
alpha;
50 typename ClassComplexType<T>::Treal
droptol;
52 typename ClassComplexType<T>::Treal
permtol;
63 enum {ILUT, ILU_D, ILUT_K, ILU_0, MILU_0, ILU_K};
69 bool UseInteger8()
const;
73 int GetFactorisationType()
const;
74 int GetFillLevel()
const;
75 int GetAdditionalFillNumber()
const;
76 int GetPrintLevel()
const;
77 int GetPivotBlockInteger()
const;
78 size_t GetMemorySize()
const;
79 int GetInfoFactorization()
const;
81 void SetFactorisationType(
int);
82 void SetFillLevel(
int);
83 void SetAdditionalFillNumber(
int);
84 void SetPrintLevel(
int);
85 void SetPivotBlockInteger(
int);
86 void SetSymmetricAlgorithm();
87 void SetUnsymmetricAlgorithm();
89 typename ClassComplexType<T>::Treal GetDroppingThreshold()
const;
90 typename ClassComplexType<T>::Treal GetDiagonalCoefficient()
const;
91 typename ClassComplexType<T>::Treal GetPivotThreshold()
const;
93 void SetDroppingThreshold(
typename ClassComplexType<T>::Treal);
94 void SetDiagonalCoefficient(
typename ClassComplexType<T>::Treal);
97 template<
class MatrixSparse>
98 void FactorizeSymMatrix(
const IVect& perm,
99 MatrixSparse& mat,
bool keep_matrix =
false);
101 template<
class MatrixSparse>
102 void FactorizeUnsymMatrix(
const IVect& perm,
103 MatrixSparse& mat,
bool keep_matrix =
false);
105 template<
class T0,
class Storage0,
class Allocator0>
106 void FactorizeMatrix(
const IVect& perm,
108 bool keep_matrix =
false);
110 template<
class T0,
class Storage0,
class Allocator0>
111 void FactorizeMatrix(
const IVect& perm,
113 bool keep_matrix =
false);
115 #ifdef SELDON_WITH_VIRTUAL
119 template<
class Matrix1,
class Vector1>
120 void TransSolve(
const Matrix1& A,
const Vector1& r, Vector1& z);
122 template<
class Matrix1,
class Vector1>
123 void Solve(
const Matrix1& A,
const Vector1& r, Vector1& z);
126 template<
class Vector1>
129 template<
class Vector1>
130 void Solve(Vector1& z);
132 template<
class Vector1>
139 template<
class real,
class cplx,
class Storage,
class Allocator>
140 void qsplit_ilut(Vector<cplx, Storage, Allocator>& a, IVect& ind,
int first,
141 int n,
int ncut,
const real& abs_ncut);
143 template<
class cplx,
class Allocator1,
class Allocator2>
144 void GetIlut(
const IlutPreconditioning<cplx, Allocator1>& param,
145 Matrix<cplx, General, ArrayRowSparse, Allocator2>& A,
146 IVect& iperm, IVect& rperm);
148 template<
class cplx,
class Allocator>
149 void GetIluk(
int lfil, Matrix<cplx, General, ArrayRowSparse, Allocator>& A);
151 template<
class cplx,
class Allocator>
152 void GetIlu0(Matrix<cplx, General, ArrayRowSparse, Allocator>& A);
154 template<
class cplx,
class Allocator>
155 void GetMilu0(Matrix<cplx, General, ArrayRowSparse, Allocator>& A);
157 template<
class cplx,
class Allocator1,
class Allocator2>
158 void GetIlut(
const IlutPreconditioning<cplx, Allocator1>& param,
159 Matrix<cplx, Symmetric, ArrayRowSymSparse, Allocator2>& A);
161 template<
class cplx,
class Allocator>
162 void GetIluk(
int lfil,
int print_level,
163 Matrix<cplx, Symmetric, ArrayRowSymSparse, Allocator>& A);
165 template<
class cplx,
class Allocator>
166 void GetIlu0(Matrix<cplx, Symmetric, ArrayRowSymSparse, Allocator>& A);
168 template<
class cplx,
class Allocator>
169 void GetMilu0(Matrix<cplx, Symmetric, ArrayRowSymSparse, Allocator>& A);
171 template<
class MatrixSparse,
class T,
class Alloc2>
172 void GetLU(MatrixSparse& A, IlutPreconditioning<T, Alloc2>& mat_lu,
173 IVect& permut,
bool keep_matrix, T& x);
175 template<
class MatrixSparse,
class T,
class Alloc2>
176 void GetLU(MatrixSparse& A, IlutPreconditioning<T, Alloc2>& mat_lu,
177 IVect& permut,
bool keep_matrix, complex<T>& x);
179 template<
class MatrixSparse,
class T,
class Alloc2>
180 void GetLU(MatrixSparse& A, IlutPreconditioning<complex<T>, Alloc2>& mat_lu,
181 IVect& permut,
bool keep_matrix, T& x);
183 template<
class T0,
class Prop,
class Storage,
class Allocator,
184 class T,
class Alloc2>
185 void GetLU(Matrix<T0, Prop, Storage, Allocator>& A,
186 IlutPreconditioning<T, Alloc2>& mat_lu,
187 IVect& permut,
bool keep_matrix =
false);
191 #define SELDON_FILE_ILUT_PRECONDITIONING_HXX