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;
78 virtual void assign( T& a_lhs,
const T& a_rhs) = 0;
82 this->
assign(a_lhs, a_rhs);
91 virtual void mDotProduct(
const T& a_1,
const int a_sz,
const T a_2[],
Real a_mdots[])
93 for (
int j=0; j<a_sz; j++)
103 virtual void incr ( T& a_lhs,
const T& a_x,
Real a_scale) = 0;
109 virtual void axby( T& a_lhs,
const T& a_x,
const T& a_y,
Real a_a,
Real a_b) = 0;
115 virtual void scale( T& a_lhs,
const Real& a_scale) = 0;
122 virtual Real norm(
const T& a_rhs,
int a_ord) = 0;
144 virtual void write(
const T* a,
const char* filename)
167 virtual void setHomogeneous(
bool a_homogeneous) = 0;
179 virtual void define(
LinearOp<T>* a_operator,
bool a_homogeneous =
false) = 0;
185 virtual void solve(T& a_phi,
const T& a_rhs) = 0;
197 #include "NamespaceFooter.H" Definition: LinearSolver.H:28
virtual void write(const T *a, const char *filename)
Definition: LinearSolver.H:144
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:192
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:70
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:91
virtual void create(T &a_lhs, const T &a_rhs)=0
Definition: LinearSolver.H:156
virtual void assignLocal(T &a_lhs, const T &a_rhs)
Definition: LinearSolver.H:80
virtual ~LinearOp()
Definition: LinearSolver.H:32
virtual void assign(T &a_lhs, const T &a_rhs)=0
virtual ~LinearSolver()
Definition: LinearSolver.H:159
virtual Real dotProduct(const T &a_1, const T &a_2)=0
virtual Real dx() const
Definition: LinearSolver.H:128
virtual void residual(T &a_lhs, const T &a_phi, const T &a_rhs, bool a_homogeneous=false)=0