diff --git a/dumux/freeflow/navierstokes/staggered/fluxoversurface.hh b/dumux/freeflow/navierstokes/staggered/fluxoversurface.hh index 339ace309592dc84bc3434817f86e3fba3b59df0..377631154f9ec57dad7dcac396985df2bf5b1da8 100644 --- a/dumux/freeflow/navierstokes/staggered/fluxoversurface.hh +++ b/dumux/freeflow/navierstokes/staggered/fluxoversurface.hh @@ -143,11 +143,15 @@ public: /*! * \brief The constructor */ + template FluxOverSurface(const GridVariables& gridVariables, - const SolutionVector& sol) + const Sol& sol) : gridVariables_(gridVariables), sol_(sol) { + static_assert(std::is_same::value, "Make sure that sol has the same type as SolutionVector." + "Use StaggeredVtkOutputModule when calling the constructor."); + verbose_ = getParamFromGroup(problem_().paramGroup(), "FluxOverSurface.Verbose", false); } diff --git a/dumux/io/staggeredvtkoutputmodule.hh b/dumux/io/staggeredvtkoutputmodule.hh index 4dfbd9a11a843bd55412603ddd285f4a49fb2b05..7f7beac10733e4b89629d60ae7656dfe7108d5bf 100644 --- a/dumux/io/staggeredvtkoutputmodule.hh +++ b/dumux/io/staggeredvtkoutputmodule.hh @@ -82,8 +82,9 @@ class StaggeredVtkOutputModule public: + template StaggeredVtkOutputModule(const GridVariables& gridVariables, - const SolutionVector& sol, + const Sol& sol, const std::string& name, const std::string& paramGroup = "", Dune::VTK::DataMode dm = Dune::VTK::conforming, @@ -95,6 +96,9 @@ public: gridVariables.curGridVolVars().problem().fvGridGeometry().gridView().comm().size() ) { + static_assert(std::is_same::value, "Make sure that sol has the same type as SolutionVector." + "Use StaggeredVtkOutputModule when calling the constructor."); + // enable velocity output per default this->addVelocityOutput(std::make_shared>(gridVariables, sol)); writeFaceVars_ = getParamFromGroup(paramGroup, "Vtk.WriteFaceData", false);