69#define AZ_cg_condnum 11
70#define AZ_gmres_condnum 12
86#define AZ_recursive 12
88#define AZ_dom_decomp 14
90#define AZ_multilevel 15
92#define AZ_user_precond 16
165#undef AZ_gmres_condnum
181#undef AZ_user_precond
191#ifdef Belos_ENABLE_Experimental
226struct AbstractSolverPrivate;
245 const Vector & solve(
const Vector & b);
263 virtual void set(
const std::string & name,
const int & value) = 0;
264 virtual void set(
const std::string & name,
const bool & value) = 0;
265 virtual void set(
const std::string & name,
const double & value) = 0;
266 virtual void set(
const std::string & name,
const std::string & value) = 0;
279 AbstractSolverPrivate * my;
326struct AmesosSolverPrivate;
341 const int solver = AmesosSolvers::KLU);
347 std::string validParams()
const;
348 std::string currentParams()
const;
351 std::string status()
const;
352 std::string timing()
const;
355 void set(
const std::string & name,
const int & value);
356 void set(
const std::string & name,
const bool & value);
357 void set(
const std::string & name,
const double & value);
358 void set(
const std::string & name,
const std::string & value);
364 void solveProblem(
const bool noSymbolicFactorization,
365 const bool noNumericFactorization);
369 AmesosSolverPrivate * myAmesos;
374struct AztecSolverPrivate;
389 const int solver = AztecSolvers::Gmres,
390 const int precond = AztecPreconds::None,
391 const int subdomain_solver = AztecSubdomainSolvers::ILUT);
400 void setPreconditioner(
const MLSolver & ML);
403 std::string validParams()
const;
404 std::string currentParams()
const;
407 std::string status()
const;
408 std::string timing()
const;
411 void set(
const std::string & name,
const int & value);
412 void set(
const std::string & name,
const bool & value);
413 void set(
const std::string & name,
const double & value);
414 void set(
const std::string & name,
const std::string & value);
417 void set(
const int & option,
const int & value);
418 void set(
const int & param,
const double & value);
421 int numIterations()
const;
430 AztecSolverPrivate * myAztec;
435struct BelosSolverPrivate;
448 const int solver = BelosSolvers::BiCGStab);
454 std::string validParams()
const;
455 std::string currentParams()
const;
458 std::string status()
const;
459 std::string timing()
const;
462 void set(
const std::string & name,
const int & value);
463 void set(
const std::string & name,
const bool & value);
464 void set(
const std::string & name,
const double & value);
465 void set(
const std::string & name,
const std::string & value);
472 int setPreconditioner(
const std::string & precType,
const SparseMatrix &A,
473 const bool & leftprec,
const int & OverlapLevel=0);
478 int numIterations()
const;
487 BelosSolverPrivate * myBelos;
492 Epetra_Operator * getPrecOperator()
const;
497struct MLSolverPrivate;
512 explicit MLSolver(
const SparseMatrix &A,
513 const int solver = MLSolvers::SA);
519 std::string validParams()
const;
520 std::string currentParams()
const;
523 std::string status()
const;
524 std::string timing()
const;
527 void set(
const std::string & name,
const int & value);
528 void set(
const std::string & name,
const bool & value);
529 void set(
const std::string & name,
const double & value);
530 void set(
const std::string & name,
const std::string & value);
533 void set(
const int & option,
const int & value);
536 int numIterations()
const;
545 MLSolverPrivate * myML;
550 Epetra_Operator * getPrecOperator()
const;
Wrapper for Trilinos/Epetra vector.
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
Abstract direct solver base class.
Definition gsTrilinosSolvers.h:288
Abstract iterative solver base class.
Definition gsTrilinosSolvers.h:303
virtual int numIterations() const =0
Returns number of iterations.
int maxIter
Default maximum number of iterations for all iterative solvers.
Definition gsTrilinosSolvers.h:321
double tolerance
Default tolerance for all iterative solvers.
Definition gsTrilinosSolvers.h:318
Abstract solver base class.
Definition gsTrilinosSolvers.h:234
virtual std::string timing() const =0
Returns timing of the solver.
virtual std::string currentParams() const =0
Returns information about current parameters.
virtual void set(const std::string &name, const int &value)=0
Sets parameters.
virtual std::string status() const =0
Returns status of the solver.
virtual void solveProblem()=0
Solves problem.
virtual std::string validParams() const =0
Returns information about valid parameters.
Amesos solver class.
Definition gsTrilinosSolvers.h:333
Actez solver class.
Definition gsTrilinosSolvers.h:381
Belos solver class.
Definition gsTrilinosSolvers.h:442
ML solver class.
Definition gsTrilinosSolvers.h:504
Provides a list of labeled parameters/options that can be set and accessed easily.
The G+Smo namespace, containing all definitions for the library.
Amesos sparse direct solvers.
Definition gsTrilinosSolvers.h:43
@ SuperLU
SuperLU (serial)
Definition gsTrilinosSolvers.h:50
@ Lapack
Lapack (serial)
Definition gsTrilinosSolvers.h:45
@ Pardiso
Pardiso (serial/OpenMP)
Definition gsTrilinosSolvers.h:48
@ Taucs
Taucs (serial)
Definition gsTrilinosSolvers.h:49
@ Umfpack
Umfpack (serial)
Definition gsTrilinosSolvers.h:47
@ Mumps
Mumps (parallel)
Definition gsTrilinosSolvers.h:52
@ KLU
KLU (serial)
Definition gsTrilinosSolvers.h:46
@ SuperLUDist
SuperLU (parallel)
Definition gsTrilinosSolvers.h:51
@ Dscpack
Dscpack (parallel)
Definition gsTrilinosSolvers.h:53
Aztec preconditioners.
Definition gsTrilinosSolvers.h:119
@ LS
Least-squares polynomial.
Definition gsTrilinosSolvers.h:124
@ ILU
DD with ILU in subdomains.
Definition gsTrilinosSolvers.h:127
@ ILUT
DD with ILUT in subdomains.
Definition gsTrilinosSolvers.h:130
@ Neumann
Neumann series polynomial.
Definition gsTrilinosSolvers.h:123
@ RILU
DD with RILU in subdomains.
Definition gsTrilinosSolvers.h:131
@ Smoother
Recursive call to iteration.
Definition gsTrilinosSolvers.h:133
@ IfpackBILU
DD with BILU (Ifpack version)
Definition gsTrilinosSolvers.h:136
@ GS
Symmetric Gauss-Seidel.
Definition gsTrilinosSolvers.h:125
@ BILU
DD with block-ILU in subdomains.
Definition gsTrilinosSolvers.h:128
@ Multilevel
DD with coarse grid.
Definition gsTrilinosSolvers.h:134
@ None
No preconditioning.
Definition gsTrilinosSolvers.h:121
@ Jacobi
Jacobi.
Definition gsTrilinosSolvers.h:122
@ Recursive
Recursive call to iteration.
Definition gsTrilinosSolvers.h:132
@ ICC
DD with incomplete Choleski in subdomains.
Definition gsTrilinosSolvers.h:129
@ DD
Non-overlapping domain decomposition.
Definition gsTrilinosSolvers.h:126
@ UserDefined
User defined preconditioner.
Definition gsTrilinosSolvers.h:135
Aztec solvers.
Definition gsTrilinosSolvers.h:99
@ SymmLQ
Indefinite symmetric like SymmLQ.
Definition gsTrilinosSolvers.h:111
@ LU
Sparse direct LU solver.
Definition gsTrilinosSolvers.h:109
@ CGCondNum
CG solver with cond. num. estimation.
Definition gsTrilinosSolvers.h:102
@ Gmres
GMRES solver.
Definition gsTrilinosSolvers.h:103
@ CGS
CG squared solver.
Definition gsTrilinosSolvers.h:106
@ Analyze
Fixed-point iteration.
Definition gsTrilinosSolvers.h:113
@ GmresR
recursive GMRES
Definition gsTrilinosSolvers.h:105
@ GmresCondNum
GMRES solver with cond.num. estimation.
Definition gsTrilinosSolvers.h:104
@ SLU
Super LU direct solver.
Definition gsTrilinosSolvers.h:110
@ TFQMR
TFQMR solver.
Definition gsTrilinosSolvers.h:107
@ CG
CG solver.
Definition gsTrilinosSolvers.h:101
@ FixedPoint
Fixed-point iteration.
Definition gsTrilinosSolvers.h:112
@ BiCGStab
BiCGStab solver.
Definition gsTrilinosSolvers.h:108
Aztec subdomain solver.
Definition gsTrilinosSolvers.h:142
@ LU
Sparse LU decomposition.
Definition gsTrilinosSolvers.h:144
@ ILU
Sparse ILU(k) decomposition.
Definition gsTrilinosSolvers.h:146
@ ILUT
Sparse ILUT decomposition (Saad)
Definition gsTrilinosSolvers.h:145
@ RILU
Sparse ILU(k,w) decomposition.
Definition gsTrilinosSolvers.h:147
@ BILU
Sparse block ILU(k) decomposition.
Definition gsTrilinosSolvers.h:148
@ ICC
Sparse ICC(k) decomposition.
Definition gsTrilinosSolvers.h:149
Belos solvers.
Definition gsTrilinosSolvers.h:187
@ PCPG
PCPG solver.
Definition gsTrilinosSolvers.h:200
@ GCRODR
Recycling GMRES solver.
Definition gsTrilinosSolvers.h:196
@ PseudoBlockCG
Pseudo Block CG solver.
Definition gsTrilinosSolvers.h:201
@ GmresPoly
Hybrid block GMRES solver.
Definition gsTrilinosSolvers.h:197
@ Minres
Minres solver.
Definition gsTrilinosSolvers.h:199
@ PseudoBlockStochasticCG
Pseudo Block CG solver.
Definition gsTrilinosSolvers.h:203
@ BlockGmres
Block GMRES solver.
Definition gsTrilinosSolvers.h:194
@ TFQMR
TFQMR solver.
Definition gsTrilinosSolvers.h:206
@ RCG
RCG solver.
Definition gsTrilinosSolvers.h:205
@ LSQR
LSQR solver.
Definition gsTrilinosSolvers.h:198
@ FixedPoint
Fixed-point solver.
Definition gsTrilinosSolvers.h:195
@ BlockCG
Block GC solver.
Definition gsTrilinosSolvers.h:190
@ PseudoBlockTFQMR
Pseudo Block TFQMR solver.
Definition gsTrilinosSolvers.h:204
@ PseudoBlockGmres
Pseudo Block GMRES solver.
Definition gsTrilinosSolvers.h:202
@ BiCGStab
BiCGStab solver.
Definition gsTrilinosSolvers.h:189