diff --git a/dumux/discretization/staggered/elementsolution.hh b/dumux/discretization/staggered/elementsolution.hh index 06a9482c07a0bb1cea58a8d990f150e40566bd9c..51bcbc0f4a7cc6cd41d8e92a797e3aee1a549ff0 100644 --- a/dumux/discretization/staggered/elementsolution.hh +++ b/dumux/discretization/staggered/elementsolution.hh @@ -32,10 +32,10 @@ namespace Dumux { /*! * \ingroup StaggeredDiscretization - * \brief Helper function to creater a PrimaryVariables object from CellCenterPrimaryVariables + * \brief Helper function to create a PrimaryVariables object from CellCenterPrimaryVariables * \tparam PrimaryVariables The type of the desired primary variables object * \tparam CellCenterPrimaryVariables The type of the cell center (input) primary variables object - * \param CellCenterPrimaryVariables The cell center (input) primary variables object + * \param cellCenterPrimaryVariables The cell center (input) primary variables object */ template<class PrimaryVariables, class CellCenterPrimaryVariables> PrimaryVariables makePriVarsFromCellCenterPriVars(const CellCenterPrimaryVariables& cellCenterPriVars) @@ -56,7 +56,7 @@ using StaggeredElementSolution = Dune::BlockVector<PrimaryVariables>; /*! * \ingroup StaggeredDiscretization * \brief Make an element solution for staggered schemes - * \note This is e.g. used to contruct an element solution at Dirichlet boundaries + * \note This is e.g. used to construct an element solution at Dirichlet boundaries */ template<class FVElementGeometry, class PrimaryVariables> auto elementSolution(PrimaryVariables&& priVars) @@ -66,6 +66,19 @@ auto elementSolution(PrimaryVariables&& priVars) return StaggeredElementSolution<PrimaryVariables>({std::move(priVars)}); } +/*! + * \ingroup StaggeredDiscretization + * \brief Helper function to create an elementSolution from cell center primary variables + * \tparam PrimaryVariables The type of the desired primary variables object + * \tparam CellCenterPrimaryVariables The type of the cell center (input) primary variables object + * \param cellCenterPrimaryVariables The cell center (input) primary variables object + */ +template<class PrimaryVariables, class CellCenterPrimaryVariables> +StaggeredElementSolution<PrimaryVariables> makeElementSolutionFromCellCenterPrivars(const CellCenterPrimaryVariables& cellCenterPriVars) +{ + return StaggeredElementSolution<PrimaryVariables>({makePriVarsFromCellCenterPriVars<PrimaryVariables>(cellCenterPriVars)}); +} + } // end namespace Dumux #endif