24#ifndef DUMUX_STAGGERED_ELEMENT_SOLUTION_HH
25#define DUMUX_STAGGERED_ELEMENT_SOLUTION_HH
28#include <dune/istl/bvector.hh>
40template<
class PrimaryVariables,
class CellCenterPrimaryVariables>
43 static_assert(int(PrimaryVariables::dimension) > int(CellCenterPrimaryVariables::dimension),
44 "PrimaryVariables' size must be greater than the one of CellCenterPrimaryVariables");
46 PrimaryVariables priVars(0.0);
47 constexpr auto offset = PrimaryVariables::dimension - CellCenterPrimaryVariables::dimension;
48 for (std::size_t i = 0; i < cellCenterPriVars.size(); ++i)
49 priVars[i + offset] = cellCenterPriVars[i];
53template<
class PrimaryVariables>
61template<
class FVElementGeometry,
class PrimaryVariables>
76template<
class PrimaryVariables,
class CellCenterPrimaryVariables>
The available discretization methods in Dumux.
auto elementSolution(const Element &element, const SolutionVector &sol, const GridGeometry &gg) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethods::box, BoxElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >
Make an element solution for box schemes.
Definition: box/elementsolution.hh:118
PrimaryVariables makePriVarsFromCellCenterPriVars(const CellCenterPrimaryVariables &cellCenterPriVars)
Helper function to create a PrimaryVariables object from CellCenterPrimaryVariables.
Definition: staggered/elementsolution.hh:41
StaggeredElementSolution< PrimaryVariables > makeElementSolutionFromCellCenterPrivars(const CellCenterPrimaryVariables &cellCenterPriVars)
Helper function to create an elementSolution from cell center primary variables.
Definition: staggered/elementsolution.hh:77
Dune::BlockVector< PrimaryVariables > StaggeredElementSolution
Definition: staggered/elementsolution.hh:54
constexpr Staggered staggered
Definition: method.hh:140