From 7430b4d83794670268512b8f15f1a29da7e80edc Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Mon, 6 Apr 2009 14:29:09 +0000 Subject: [PATCH] moved to new module dune-solvers [[Imported from SVN: r2348]] --- dune-solvers/solvers/solver.hh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 dune-solvers/solvers/solver.hh diff --git a/dune-solvers/solvers/solver.hh b/dune-solvers/solvers/solver.hh new file mode 100644 index 00000000..eeda504f --- /dev/null +++ b/dune-solvers/solvers/solver.hh @@ -0,0 +1,31 @@ +#ifndef DUNE_SOLVER_HH +#define DUNE_SOLVER_HH + +#include "numproc.hh" + + /** \brief The base class for all sorts of solver algorithms */ + class Solver : public NumProc + { + public: + Solver(VerbosityMode verbosity) + : NumProc(verbosity) + {} + + /** \brief Virtual destructor */ + virtual ~Solver() {} + + /** \brief Do the necessary preprocessing */ + virtual void preprocess(); + + /** \brief Derived classes overload this with the actual + * solution algorithm */ + virtual void solve() = 0; + + }; + +void Solver::preprocess() +{ + // Default: Do nothing +} + +#endif -- GitLab