From 589e4dca7087cb1f6195ad8f57500241551b40f0 Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn <robertk@posteo.net> Date: Sat, 11 Oct 2014 14:16:20 +0200 Subject: [PATCH] added missing method gradient to the ProblemInterface. --- dune/fem-dg/models/defaultprobleminterfaces.hh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dune/fem-dg/models/defaultprobleminterfaces.hh b/dune/fem-dg/models/defaultprobleminterfaces.hh index 4a60d117..41a66ee7 100644 --- a/dune/fem-dg/models/defaultprobleminterfaces.hh +++ b/dune/fem-dg/models/defaultprobleminterfaces.hh @@ -2,6 +2,8 @@ #define DUNE_DEFAULTPROBLEMINTERFACE_HH #include <dune/common/version.hh> +#include <dune/common/exceptions.hh> + #include <dune/fem/function/common/timedependentfunction.hh> #include <dune/fem/misc/gridsolution.hh> @@ -153,6 +155,7 @@ public: { velocity( x, v ); } + /** * @brief old version of the exact solution * @@ -311,9 +314,13 @@ public: v = 0; } - //! the gradient of the exact solution - //virtual void gradient(const DomainType& x, - // JacobianRangeType& grad) const = 0; + //! the gradient of the exact solution (default is empty) + virtual void gradient(const DomainType& x, + JacobianRangeType& grad) const + { + assert( false ); + DUNE_THROW( NotImplemented, "ProblemInterface::gradient not overloaded but called!" ); + } //! return whether boundary is Dirichlet (true) or Neumann (false) virtual bool dirichletBoundary(const int bndId, const DomainType& x) const -- GitLab