12#ifndef DUMUX_CC_ELEMENT_SOLUTION_HH 
   13#define DUMUX_CC_ELEMENT_SOLUTION_HH 
   26template<
class FVElementGeometry, 
class PV>
 
   29    using GridGeometry = 
typename FVElementGeometry::GridGeometry;
 
   30    using GridView = 
typename GridGeometry::GridView;
 
   31    using Element = 
typename GridView::template Codim<0>::Entity;
 
   41    template<
class SolutionVector>
 
   43                      const GridGeometry& gridGeometry)
 
 
   48    template<
class ElementVolumeVariables>
 
   50                      const FVElementGeometry& fvGeometry)
 
   52        for (
const auto& scv : scvs(fvGeometry))
 
   53            priVars_ = elemVolVars[scv].priVars();
 
 
   58    : priVars_(std::move(priVars)) {}
 
 
   62    : priVars_(priVars) {}
 
 
   65    template<
class SolutionVector>
 
   66    void update(
const Element& element, 
const SolutionVector& sol,
 
   67                const GridGeometry& gridGeometry)
 
   69        priVars_ = sol[gridGeometry.elementMapper().index(element)];
 
 
   73    constexpr std::size_t 
size()
 const 
 
   77    template<
typename IndexType>
 
   80        assert(i == 0 && 
"Index exceeds valid range!");
 
 
   85    template<
typename IndexType>
 
   88        assert(i == 0 && 
"Index exceeds valid range!");
 
 
   93    PrimaryVariables priVars_;
 
 
  100template<
class Element, 
class SolutionVector, 
class Gr
idGeometry>
 
  101auto elementSolution(
const Element& element, 
const SolutionVector& sol, 
const GridGeometry& gg)
 
  105                                      std::decay_t<decltype(std::declval<SolutionVector>()[0])>>
 
  108    using PrimaryVariables = std::decay_t<decltype(std::declval<SolutionVector>()[0])>;
 
 
  116template<
class Element, 
class ElementVolumeVariables, 
class FVElementGeometry>
 
  117auto elementSolution(
const Element& element, 
const ElementVolumeVariables& elemVolVars, 
const FVElementGeometry& gg)
 
  122    using PrimaryVariables = 
typename ElementVolumeVariables::VolumeVariables::PrimaryVariables;
 
 
  131template<
class FVElementGeometry, 
class PrimaryVariables>
 
  145template<
class FVElementGeometry, 
class PrimaryVariables>
 
The element solution vector.
Definition cellcentered/elementsolution.hh:28
CCElementSolution(PrimaryVariables &&priVars)
Constructor with a primary variable object.
Definition cellcentered/elementsolution.hh:57
const PrimaryVariables & operator[](IndexType i) const
bracket operator const access
Definition cellcentered/elementsolution.hh:78
CCElementSolution(const Element &element, const SolutionVector &sol, const GridGeometry &gridGeometry)
Constructor with element, solution vector and grid geometry.
Definition cellcentered/elementsolution.hh:42
constexpr std::size_t size() const
return the size of the element solution
Definition cellcentered/elementsolution.hh:73
void update(const Element &element, const SolutionVector &sol, const GridGeometry &gridGeometry)
extract the element solution from the solution vector using a mapper
Definition cellcentered/elementsolution.hh:66
CCElementSolution(const Element &element, const ElementVolumeVariables &elemVolVars, const FVElementGeometry &fvGeometry)
Constructor with element, element volume variables and fv element geometry.
Definition cellcentered/elementsolution.hh:49
PV PrimaryVariables
export the primary variables type
Definition cellcentered/elementsolution.hh:35
CCElementSolution(const PrimaryVariables &priVars)
Constructor with a primary variable object.
Definition cellcentered/elementsolution.hh:61
CCElementSolution()=default
default constructor
auto elementSolution(const Element &element, const SolutionVector &sol, const GridGeometry &gg) -> std::enable_if_t< GridGeometry::discMethod==DiscretizationMethods::cctpfa||GridGeometry::discMethod==DiscretizationMethods::ccmpfa, CCElementSolution< typename GridGeometry::LocalView, std::decay_t< decltype(std::declval< SolutionVector >()[0])> > >
Make an element solution for cell-centered schemes.
Definition cellcentered/elementsolution.hh:101
The available discretization methods in Dumux.
constexpr CCMpfa ccmpfa
Definition method.hh:146
constexpr CCTpfa cctpfa
Definition method.hh:145