Chombo + EB  3.2
NoOpSolver.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 // BVS, June 18, 2003
12 
13 #ifndef _NOOPSOLVER_H_
14 #define _NOOPSOLVER_H_
15 
16 #include "LinearSolver.H"
17 #include "NamespaceHeader.H"
18 
19 template <class T>
20 class NoOpSolver : public LinearSolver<T>
21 {
22 public:
24  {
25  }
26 
27  virtual ~NoOpSolver()
28  {
29  }
30 
31  virtual void setHomogeneous(bool a_homogeneous)
32  {
33  }
34 
35  virtual void define(LinearOp<T>* a_factory, bool a_homogeneous)
36  {
37  }
38 
39  virtual void solve(T& a_phi, const T& a_rhs);
40 
41  virtual void setConvergenceMetrics(Real a_metric,
42  Real a_tolerance)
43  {
44  }
45 };
46 
47 template <class T>
48 void NoOpSolver<T>::solve(T& a_phi, const T& a_rhs)
49 {
50  //as the name implies, this function does nothing.
51 }
52 
53 #include "NamespaceFooter.H"
54 #endif /*_NOOPSOLVER_H_*/
Definition: LinearSolver.H:28
virtual void setHomogeneous(bool a_homogeneous)
Definition: NoOpSolver.H:31
virtual ~NoOpSolver()
Definition: NoOpSolver.H:27
Definition: NoOpSolver.H:20
double Real
Definition: REAL.H:33
virtual void define(LinearOp< T > *a_factory, bool a_homogeneous)
Definition: NoOpSolver.H:35
Definition: LinearSolver.H:156
virtual void solve(T &a_phi, const T &a_rhs)
Definition: NoOpSolver.H:48
virtual void setConvergenceMetrics(Real a_metric, Real a_tolerance)
Set a convergence metric, along with solver tolerance, if desired.
Definition: NoOpSolver.H:41
NoOpSolver()
Definition: NoOpSolver.H:23