15 #ifndef _LINEARSOLVER_H_ 16 #define _LINEARSOLVER_H_ 21 #include "NamespaceHeader.H" 41 virtual void residual( T& a_lhs,
const T& a_phi,
const T& a_rhs,
bool a_homogeneous =
false) = 0;
47 virtual void preCond( T& a_cor,
const T& a_residual) = 0;
54 virtual void applyOp( T& a_lhs,
const T& a_phi,
bool a_homogeneous =
false) = 0;
61 virtual void create( T& a_lhs,
const T& a_rhs) = 0;
80 virtual void assign( T& a_lhs,
const T& a_rhs) = 0;
84 this->
assign(a_lhs, a_rhs);
93 virtual void mDotProduct(
const T& a_1,
const int a_sz,
const T a_2[],
Real a_mdots[])
95 for (
int j=0; j<a_sz; j++)
105 virtual void incr ( T& a_lhs,
const T& a_x,
Real a_scale) = 0;
111 virtual void axby( T& a_lhs,
const T& a_x,
const T& a_y,
Real a_a,
Real a_b) = 0;
117 virtual void scale( T& a_lhs,
const Real& a_scale) = 0;
124 virtual Real norm(
const T& a_rhs,
int a_ord) = 0;
146 virtual void write(
const T* a,
const char* filename)
169 virtual void setHomogeneous(
bool a_homogeneous) = 0;
181 virtual void define(
LinearOp<T>* a_operator,
bool a_homogeneous =
false) = 0;
187 virtual void solve(T& a_phi,
const T& a_rhs) = 0;
200 #include "NamespaceFooter.H" Definition: LinearSolver.H:28
virtual void write(const T *a, const char *filename)
Definition: LinearSolver.H:146
virtual void scale(T &a_lhs, const Real &a_scale)=0
virtual void applyOp(T &a_lhs, const T &a_phi, bool a_homogeneous=false)=0
virtual void preCond(T &a_cor, const T &a_residual)=0
virtual void setConvergenceMetrics(Real a_metric, Real a_tolerance)
Set a convergence metric, along with solver tolerance, if desired.
Definition: LinearSolver.H:195
virtual Real norm(const T &a_rhs, int a_ord)=0
virtual void setToZero(T &a_lhs)=0
virtual void axby(T &a_lhs, const T &a_x, const T &a_y, Real a_a, Real a_b)=0
double Real
Definition: REAL.H:33
virtual void incr(T &a_lhs, const T &a_x, Real a_scale)=0
virtual void clear(T &a_lhs)
Definition: LinearSolver.H:71
static void Warning(const char *const a_msg=m_nullString)
Print out message to cerr and continue.
virtual void mDotProduct(const T &a_1, const int a_sz, const T a_2[], Real a_mdots[])
Definition: LinearSolver.H:93
virtual void create(T &a_lhs, const T &a_rhs)=0
Definition: LinearSolver.H:158
virtual void assignLocal(T &a_lhs, const T &a_rhs)
Definition: LinearSolver.H:82
virtual ~LinearOp()
Definition: LinearSolver.H:32
virtual void assign(T &a_lhs, const T &a_rhs)=0
virtual ~LinearSolver()
Definition: LinearSolver.H:161
virtual Real dotProduct(const T &a_1, const T &a_2)=0
virtual Real dx() const
Definition: LinearSolver.H:130
virtual void residual(T &a_lhs, const T &a_phi, const T &a_rhs, bool a_homogeneous=false)=0