12#ifndef DUMUX_DISCRETIZATION_CVFE_ELEMENT_VOLUMEVARIABLES_HH 
   13#define DUMUX_DISCRETIZATION_CVFE_ELEMENT_VOLUMEVARIABLES_HH 
   30template<
class GVV, 
bool cachingEnabled>
 
   55    template<class SubControlVolume, typename std::enable_if_t<!std::is_integral<SubControlVolume>::value, 
int> = 0>
 
   57    { 
return gridVolVars().volVars(eIdx_, scv.indexInElement()); }
 
 
   64    template<
class FVElementGeometry, 
class SolutionVector>
 
   66                                   const FVElementGeometry& fvGeometry,
 
   67                                   const SolutionVector& sol)  &&
 
   70        return std::move(*
this);
 
 
   75    template<
class FVElementGeometry, 
class SolutionVector>
 
   76    void bind(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
 
   77              const FVElementGeometry& fvGeometry,
 
   78              const SolutionVector& sol) &
 
 
   88    template<
class FVElementGeometry, 
class SolutionVector>
 
   90                                          const FVElementGeometry& fvGeometry,
 
   91                                          const SolutionVector& sol)  &&
 
   94        return std::move(*
this);
 
 
   98    template<
class FVElementGeometry, 
class SolutionVector>
 
   99    void bindElement(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
 
  100                     const FVElementGeometry& fvGeometry,
 
  101                     const SolutionVector& sol) &
 
  103        eIdx_ = fvGeometry.gridGeometry().elementMapper().index(element);
 
 
  108    { 
return *gridVolVarsPtr_; }
 
 
  111    const GridVolumeVariables* gridVolVarsPtr_;
 
 
  139    template<
class FVElementGeometry, 
class SolutionVector>
 
  141                                   const FVElementGeometry& fvGeometry,
 
  142                                   const SolutionVector& sol)  &&
 
  145        return std::move(*
this);
 
 
  149    template<
class FVElementGeometry, 
class SolutionVector>
 
  150    void bind(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
 
  151              const FVElementGeometry& fvGeometry,
 
  152              const SolutionVector& sol) &
 
 
  162    template<
class FVElementGeometry, 
class SolutionVector>
 
  164                                          const FVElementGeometry& fvGeometry,
 
  165                                          const SolutionVector& sol)  &&
 
  168        return std::move(*
this);
 
 
  172    template<
class FVElementGeometry, 
class SolutionVector>
 
  173    void bindElement(
const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
 
  174                     const FVElementGeometry& fvGeometry,
 
  175                     const SolutionVector& sol) &
 
  178        auto elemSol = 
elementSolution(element, sol, fvGeometry.gridGeometry());
 
  181        volumeVariables_.resize(fvGeometry.numScv());
 
  182        for (
auto&& scv : scvs(fvGeometry))
 
  183            volumeVariables_[scv.indexInElement()].update(elemSol, 
gridVolVars().problem(), element, scv);
 
 
  187    { 
return volumeVariables_[scvIdx]; }
 
 
  190    { 
return volumeVariables_[scvIdx]; }
 
 
  192    template<class SubControlVolume, typename std::enable_if_t<!std::is_integral<SubControlVolume>::value, 
int> = 0>
 
  194    { 
return volumeVariables_[scv.indexInElement()]; }
 
 
  196    template<class SubControlVolume, typename std::enable_if_t<!std::is_integral<SubControlVolume>::value, 
int> = 0>
 
  198    { 
return volumeVariables_[scv.indexInElement()]; }
 
 
  202    { 
return *gridVolVarsPtr_; }
 
 
  205    const GridVolumeVariables* gridVolVarsPtr_;
 
  206    std::vector<VolumeVariables> volumeVariables_;
 
 
CVFEElementVolumeVariables bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const SolutionVector &sol) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition cvfe/elementvolumevariables.hh:140
GVV GridVolumeVariables
export type of the grid volume variables
Definition cvfe/elementvolumevariables.hh:125
const GridVolumeVariables & gridVolVars() const
The global volume variables object we are a restriction of.
Definition cvfe/elementvolumevariables.hh:201
void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const SolutionVector &sol) &
Definition cvfe/elementvolumevariables.hh:150
typename GridVolumeVariables::VolumeVariables VolumeVariables
export type of the volume variables
Definition cvfe/elementvolumevariables.hh:128
CVFEElementVolumeVariables(const GridVolumeVariables &gridVolVars)
Constructor.
Definition cvfe/elementvolumevariables.hh:131
void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const SolutionVector &sol) &
Definition cvfe/elementvolumevariables.hh:173
CVFEElementVolumeVariables bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const SolutionVector &sol) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition cvfe/elementvolumevariables.hh:163
void bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const SolutionVector &sol) &
Definition cvfe/elementvolumevariables.hh:76
void bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const SolutionVector &sol) &
Definition cvfe/elementvolumevariables.hh:99
CVFEElementVolumeVariables(const GridVolumeVariables &gridVolVars)
Constructor.
Definition cvfe/elementvolumevariables.hh:49
const GridVolumeVariables & gridVolVars() const
The global volume variables object we are a restriction of.
Definition cvfe/elementvolumevariables.hh:107
CVFEElementVolumeVariables bind(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const SolutionVector &sol) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition cvfe/elementvolumevariables.hh:65
typename GridVolumeVariables::VolumeVariables VolumeVariables
export type of the volume variables
Definition cvfe/elementvolumevariables.hh:46
GVV GridVolumeVariables
export type of the grid volume variables
Definition cvfe/elementvolumevariables.hh:43
CVFEElementVolumeVariables bindElement(const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const SolutionVector &sol) &&
bind the local view (r-value overload) This overload is called when an instance of this class is a te...
Definition cvfe/elementvolumevariables.hh:89
The local (stencil) volume variables class for control-volume finite element.
Definition cvfe/elementvolumevariables.hh:31
Element solution classes and factory functions.
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