From 95538bb8c6ffc9d847b3d6dfb3c13e1dd2601ef2 Mon Sep 17 00:00:00 2001 From: Azusa Yamaguchi Date: Sun, 21 Jun 2015 11:03:55 +0100 Subject: [PATCH] Abstract preconditioner --- lib/algorithms/Preconditioner.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/algorithms/Preconditioner.h diff --git a/lib/algorithms/Preconditioner.h b/lib/algorithms/Preconditioner.h new file mode 100644 index 00000000..e62c3ab7 --- /dev/null +++ b/lib/algorithms/Preconditioner.h @@ -0,0 +1,19 @@ +#ifndef GRID_PRECONDITIONER_H +#define GRID_PRECONDITIONER_H + +namespace Grid { + + template class Preconditioner : public LinearFunction { + virtual void operator()(const Field &src, Field & psi)=0; + }; + + template class TrivialPrecon : public Preconditioner { + public: + void operator()(const Field &src, Field & psi){ + psi = src; + } + TrivialPrecon(void){}; + }; + +} +#endif