From b5e001e490132273f4cca4ccea97611140492786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de> Date: Wed, 11 Apr 2018 20:56:19 +0200 Subject: [PATCH] [cc][elemsol] add missing free function for construction with privars --- .../discretization/cellcentered/elementsolution.hh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dumux/discretization/cellcentered/elementsolution.hh b/dumux/discretization/cellcentered/elementsolution.hh index e69991f8d3..2797eba3ba 100644 --- a/dumux/discretization/cellcentered/elementsolution.hh +++ b/dumux/discretization/cellcentered/elementsolution.hh @@ -145,6 +145,20 @@ auto elementSolution(PrimaryVariables&& priVars) return CCElementSolution<FVElementGeometry, PrimaryVariables>(std::move(priVars)); } +/*! + * \ingroup CCDiscretization + * \brief Make an element solution for cell-centered schemes + * \note This is e.g. used to contruct an element solution at Dirichlet boundaries + */ +template<class FVElementGeometry, class PrimaryVariables> +auto elementSolution(const PrimaryVariables& priVars) +-> std::enable_if_t<FVElementGeometry::FVGridGeometry::discMethod == DiscretizationMethod::cctpfa || + FVElementGeometry::FVGridGeometry::discMethod == DiscretizationMethod::ccmpfa, + CCElementSolution<FVElementGeometry, PrimaryVariables>> +{ + return CCElementSolution<FVElementGeometry, PrimaryVariables>(priVars); +} + } // end namespace Dumux #endif -- GitLab