48 #ifdef HAVE_IFPACK_SUPERLU 53 #include "Epetra_CompObject.h" 54 #include "Epetra_MultiVector.h" 55 #include "Epetra_Vector.h" 56 #include "Epetra_CrsGraph.h" 57 #include "Epetra_CrsMatrix.h" 58 #include "Epetra_BlockMap.h" 59 #include "Epetra_Map.h" 60 #include "Epetra_Object.h" 61 #include "Epetra_Comm.h" 62 #include "Epetra_RowMatrix.h" 63 #include "Epetra_Time.h" 64 #include "Teuchos_RefCountPtr.hpp" 71 #include "slu_ddefs.h" 88 Ifpack_SILU(Epetra_RowMatrix* A);
107 return(IsInitialized_);
139 int SetUseTranspose(
bool UseTranspose_in) {UseTranspose_ = UseTranspose_in;
return(0);};
145 int Apply(
const Epetra_MultiVector& X,
146 Epetra_MultiVector& Y)
const 148 return(Multiply(
false,X,Y));
151 int Multiply(
bool Trans,
const Epetra_MultiVector& X,
152 Epetra_MultiVector& Y)
const;
168 int ApplyInverse(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
172 const int MaxIters = 1550,
173 const double Tol = 1e-9,
174 Epetra_RowMatrix* Matrix_in = 0);
188 const char* Label()
const {
return(Label_);}
191 int SetLabel(
const char* Label_in)
193 strcpy(Label_,Label_in);
198 double NormInf()
const {
return(0.0);};
201 bool HasNormInf()
const {
return(
false);};
204 bool UseTranspose()
const {
return(UseTranspose_);};
207 const Epetra_Map & OperatorDomainMap()
const {
return(A_->OperatorDomainMap());};
210 const Epetra_Map & OperatorRangeMap()
const{
return(A_->OperatorRangeMap());};
213 const Epetra_Comm & Comm()
const{
return(Comm_);};
216 const Epetra_RowMatrix&
Matrix()
const 222 virtual std::ostream&
Print(std::ostream& os)
const;
227 return(NumInitialize_);
239 return(NumApplyInverse_);
245 return(InitializeTime_);
251 return(ComputeTime_);
257 return(ApplyInverseTime_);
282 Ifpack_SILU(
const Ifpack_SILU&
RHS):
288 Ifpack_SILU& operator=(
const Ifpack_SILU&
RHS)
307 int Solve(
bool Trans,
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
309 int InitAllValues(
const Epetra_RowMatrix & A,
int MaxNumEntries);
312 double DropTol()
const {
return DropTol_;}
315 double FillTol()
const{
return FillTol_;}
318 double FillFactor()
const{
return FillFactor_;}
321 int DropRule()
const{
return DropRule_;}
323 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 324 int NumGlobalRows()
const {
return(
Graph().NumGlobalRows());};
328 int NumGlobalCols()
const {
return(
Graph().NumGlobalCols());};
331 int NumGlobalNonzeros()
const {
return(
Graph().NumGlobalNonzeros());};
334 virtual int NumGlobalBlockDiagonals()
const {
return(
Graph().NumGlobalBlockDiagonals());};
338 long long NumGlobalRows64()
const {
return(
Graph().NumGlobalRows64());};
341 long long NumGlobalCols64()
const {
return(
Graph().NumGlobalCols64());};
344 long long NumGlobalNonzeros64()
const {
return(
Graph().NumGlobalNonzeros64());};
347 virtual long long NumGlobalBlockDiagonals64()
const {
return(
Graph().NumGlobalBlockDiagonals64());};
350 int NumMyRows()
const {
return(
Graph().NumMyRows());};
353 int NumMyCols()
const {
return(
Graph().NumMyCols());};
356 int NumMyNonzeros()
const {
return(
Graph().NumMyNonzeros());};
359 virtual int NumMyBlockDiagonals()
const {
return(
Graph().NumMyBlockDiagonals());};
362 virtual int NumMyDiagonals()
const {
return(NumMyDiagonals_);};
364 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES 365 int IndexBase()
const {
return(
Graph().IndexBase());};
368 long long IndexBase64()
const {
return(
Graph().IndexBase64());};
371 const Epetra_CrsGraph &
Graph()
const {
return(*Graph_);};
374 Epetra_RowMatrix&
Matrix()
385 Teuchos::RefCountPtr<Epetra_RowMatrix> A_;
386 Teuchos::RefCountPtr<Epetra_CrsGraph> Graph_;
387 Teuchos::RefCountPtr<Epetra_Map> IlukRowMap_;
388 Teuchos::RefCountPtr<Epetra_Map> IlukDomainMap_;
389 Teuchos::RefCountPtr<Epetra_Map> IlukRangeMap_;
390 const Epetra_Comm & Comm_;
392 Teuchos::RefCountPtr<Epetra_CrsMatrix> Aover_;
397 bool ValuesInitialized_;
422 mutable int NumApplyInverse_;
424 double InitializeTime_;
428 mutable double ApplyInverseTime_;
430 mutable Epetra_Time Time_;
432 mutable SuperLUStat_t stat_;
434 mutable superlu_options_t options_;
436 mutable SuperMatrix SA_,SAc_,SL_,SU_,SY_;
438 int *etree_,*perm_r_,*perm_c_;
442 template<
typename int_type>
virtual int NumInitialize() const =0
Returns the number of calls to Initialize().
virtual double ComputeTime() const =0
Returns the time spent in Compute().
virtual double ComputeFlops() const =0
Returns the number of flops in the computation phase.
virtual double ApplyInverseTime() const =0
Returns the time spent in ApplyInverse().
virtual double ApplyInverseFlops() const =0
Returns the number of flops in the application of the preconditioner.
virtual const Epetra_RowMatrix & Matrix() const =0
Returns a pointer to the matrix to be preconditioned.
virtual bool IsInitialized() const =0
Returns true if the preconditioner has been successfully initialized, false otherwise.
virtual std::ostream & Print(std::ostream &os) const =0
Prints basic information on iostream. This function is used by operator<<.
virtual int Initialize()=0
Computes all it is necessary to initialize the preconditioner.
virtual double InitializeTime() const =0
Returns the time spent in Initialize().
Ifpack_CondestType
Ifpack_CondestType: enum to define the type of condition number estimate.
virtual int SetParameters(Teuchos::ParameterList &List)=0
Sets all parameters for the preconditioner.
virtual double Condest() const =0
Returns the computed condition number estimate, or -1.0 if not computed.
Ifpack_ScalingType enumerable type.
Ifpack_Preconditioner: basic class for preconditioning in Ifpack.
virtual int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
Applies the preconditioner to vector X, returns the result in Y.
adjacency_list< vecS, vecS, undirectedS, no_property, property< edge_weight_t, double > > Graph
virtual double InitializeFlops() const =0
Returns the number of flops in the initialization phase.
virtual int NumCompute() const =0
Returns the number of calls to Compute().
virtual bool IsComputed() const =0
Returns true if the preconditioner has been successfully computed, false otherwise.
virtual int Compute()=0
Computes all it is necessary to apply the preconditioner.
virtual int NumApplyInverse() const =0
Returns the number of calls to ApplyInverse().