15 #include "../config/config.hpp"
22 #ifdef MFEM_USE_SUITESPARSE
98 void SLI(
const Operator &A,
const Vector &b, Vector &x,
99 int print_iter = 0,
int max_num_iter = 1000,
100 double RTOLERANCE = 1e-12,
double ATOLERANCE = 1e-24);
103 void SLI(
const Operator &A, Solver &B,
const Vector &b, Vector &x,
104 int print_iter = 0,
int max_num_iter = 1000,
105 double RTOLERANCE = 1e-12,
double ATOLERANCE = 1e-24);
130 void CG(
const Operator &A,
const Vector &b, Vector &x,
131 int print_iter = 0,
int max_num_iter = 1000,
132 double RTOLERANCE = 1e-12,
double ATOLERANCE = 1e-24);
135 void PCG(
const Operator &A, Solver &B,
const Vector &b, Vector &x,
136 int print_iter = 0,
int max_num_iter = 1000,
137 double RTOLERANCE = 1e-12,
double ATOLERANCE = 1e-24);
177 int GMRES(
const Operator &A, Vector &x,
const Vector &b, Solver &M,
178 int &max_iter,
int m,
double &tol,
double atol,
int printit);
181 void GMRES(
const Operator &A, Solver &B,
const Vector &b, Vector &x,
182 int print_iter = 0,
int max_num_iter = 1000,
int m = 50,
183 double rtol = 1e-12,
double atol = 1e-24);
208 int BiCGSTAB(
const Operator &A, Vector &x,
const Vector &b, Solver &M,
209 int &max_iter,
double &tol,
double atol,
int printit);
212 void BiCGSTAB(
const Operator &A, Solver &B,
const Vector &b, Vector &x,
213 int print_iter = 0,
int max_num_iter = 1000,
214 double rtol = 1e-12,
double atol = 1e-24);
240 void MINRES(
const Operator &A,
const Vector &b, Vector &x,
int print_it = 0,
241 int max_it = 1000,
double rtol = 1e-12,
double atol = 1e-24);
244 void MINRES(
const Operator &A, Solver &B,
const Vector &b, Vector &x,
245 int print_it = 0,
int max_it = 1000,
246 double rtol = 1e-12,
double atol = 1e-24);
277 int aGMRES(
const Operator &A, Vector &x,
const Vector &b,
278 const Operator &M,
int &max_iter,
279 int m_max,
int m_min,
int m_step,
double cf,
280 double &tol,
double &atol,
int printit);
326 #ifdef MFEM_USE_SUITESPARSE
341 mutable double Info[UMFPACK_INFO];
359 #endif // MFEM_USE_SUITESPARSE
363 #endif // MFEM_SOLVERS
void SetSolver(Solver &solver)
Conjugate gradient method.
virtual void MultTranspose(const Vector &b, Vector &x) const
Action of the transpose operator.
double Info[UMFPACK_INFO]
void SetSize(int s)
Resizes the vector if the new size is different.
NewtonSolver(MPI_Comm _comm)
UMFPackSolver(SparseMatrix &A, bool _use_long_ints=false)
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
void add(const Vector &v1, const Vector &v2, Vector &v)
double Norm(const Vector &x) const
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
int BiCGSTAB(const Operator &A, Vector &x, const Vector &b, Solver &M, int &max_iter, double &tol, double atol, int printit)
BiCGSTAB method. (tolerances are squared)
FGMRESSolver(MPI_Comm _comm)
Direct sparse solver using UMFPACK.
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
UMFPackSolver(bool _use_long_ints=false)
virtual void Mult(const Vector &b, Vector &x) const
Operator application.
virtual void Mult(const Vector &x, Vector &y) const
Operator application.
void SetLinearConstraint(const Vector &_w, double _a)
virtual void SetPreconditioner(Solver &pr)
This should be called before SetOperator.
void SetPrintLevel(int print_lvl)
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
double solve(double l, const Vector &xt, Vector &x, int &nclip) const
Solve QP at fixed lambda.
void MINRES(const Operator &A, const Vector &b, Vector &x, int print_it, int max_it, double rtol, double atol)
MINRES method without preconditioner. (tolerances are squared)
void SetMaxIter(int max_it)
void median(const Vector &lo, const Vector &hi)
v = median(v,lo,hi) entrywise. Implementation assumes lo <= hi.
void CG(const Operator &A, const Vector &b, Vector &x, int print_iter, int max_num_iter, double RTOLERANCE, double ATOLERANCE)
Conjugate gradient method. (tolerances are squared)
void print_iteration(int it, double r, double l) const
void PCG(const Operator &A, Solver &B, const Vector &b, Vector &x, int print_iter, int max_num_iter, double RTOLERANCE, double ATOLERANCE)
Preconditioned conjugate gradient method. (tolerances are squared)
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
double Dot(const Vector &x, const Vector &y) const
BiCGSTABSolver(MPI_Comm _comm)
SLBQPOptimizer(MPI_Comm _comm)
virtual void Mult(const Vector &b, Vector &x) const
Operator application.
void SetPrintLevel(int print_lvl)
Stationary linear iteration: x <- x + B (b - A x)
void SetAbsTol(double atol)
void SetRelTol(double rtol)
double Control[UMFPACK_CONTROL]
Abstract base class for iterative solver.
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
SLISolver(MPI_Comm _comm)
GMRESSolver(MPI_Comm _comm)
void SetBounds(const Vector &_lo, const Vector &_hi)
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
virtual void Mult(const Vector &xt, Vector &x) const
Operator application.
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
MINRESSolver(MPI_Comm _comm)
virtual void SetPreconditioner(Solver &pr)
This should be called before SetOperator.
int aGMRES(const Operator &A, Vector &x, const Vector &b, const Operator &M, int &max_iter, int m_max, int m_min, int m_step, double cf, double &tol, double &atol, int printit)
virtual void SetPreconditioner(Solver &pr)
These are not currently meaningful for this solver and will error out.
virtual void Mult(const Vector &b, Vector &x) const
Operator application.
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
void SLI(const Operator &A, const Vector &b, Vector &x, int print_iter, int max_num_iter, double RTOLERANCE, double ATOLERANCE)
Stationary linear iteration. (tolerances are squared)
int GMRES(const Operator &A, Vector &x, const Vector &b, Solver &M, int &max_iter, int m, double &tol, double atol, int printit)
GMRES method. (tolerances are squared)
virtual void SetOperator(const Operator &op)
Also calls SetOperator for the preconditioner if there is one.
virtual void SetOperator(const Operator &op)
Set/update the solver for the given operator.