diff --git a/dumux/porousmediumflow/tracer/localresidual.hh b/dumux/porousmediumflow/tracer/localresidual.hh index 2648cf4de1d8750808c460d1387e13ae36b735f2..ed818b5efcde16fe03915fb6b91a98c4c2384842 100644 --- a/dumux/porousmediumflow/tracer/localresidual.hh +++ b/dumux/porousmediumflow/tracer/localresidual.hh @@ -26,6 +26,8 @@ #ifndef DUMUX_TRACER_LOCAL_RESIDUAL_HH #define DUMUX_TRACER_LOCAL_RESIDUAL_HH +#include <dune/common/exceptions.hh> + #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/discretization/method.hh> @@ -229,6 +231,9 @@ public: const ElementFluxVariablesCache& elemFluxVarsCache, const SubControlVolumeFace& scvf) const { + if constexpr (FVElementGeometry::GridGeometry::discMethod != DiscretizationMethod::cctpfa) + DUNE_THROW(Dune::NotImplemented, "Analytic flux differentiation only implemented for tpfa"); + // advective term: we do the same for all tracer components auto rho = [](const VolumeVariables& volVars) { return useMoles ? volVars.molarDensity() : volVars.density(); };