12#ifndef DUMUX_DISCRETIZATION_STAGGERED_GRID_FACEVARIABLES_HH 
   13#define DUMUX_DISCRETIZATION_STAGGERED_GRID_FACEVARIABLES_HH 
   29template<
class P, 
class FV>
 
   32    template<
class Gr
idFaceVariables, 
bool enableCache>
 
 
   43template<
class Problem,
 
   45         bool cachingEnabled = 
false,
 
   54template<
class P, 
class FV, 
class Traits>
 
   58    using Problem = 
typename Traits::Problem;
 
   62    static constexpr bool cachingEnabled = 
true;
 
   65    using LocalView = 
typename Traits::template LocalView<ThisType, cachingEnabled>;
 
   68    using FaceVariables = 
typename Traits::FaceVariables;
 
   73    template<
class Gr
idGeometry, 
class SolutionVector>
 
   74    void update(
const GridGeometry& gridGeometry, 
const SolutionVector& sol)
 
   76        faceVariables_.resize(gridGeometry.numScvf());
 
   77        auto fvGeometry = 
localView(gridGeometry);
 
   78        for (
auto&& element : elements(gridGeometry.gridView()))
 
   80            fvGeometry.bindElement(element);
 
   82            for (
auto&& scvf : scvfs(fvGeometry))
 
   85                faceVariables_[scvf.index()].update(faceSol, problem(), element, fvGeometry, scvf);
 
   90    const FaceVariables& faceVars(
const std::size_t facetIdx)
 const 
   91    { 
return faceVariables_[facetIdx]; }
 
   93    FaceVariables& faceVars(
const std::size_t facetIdx)
 
   94    { 
return faceVariables_[facetIdx]; }
 
   96    const Problem& problem()
 const 
   97    { 
return *problemPtr_; }
 
  100    const Problem* problemPtr_;
 
  101    std::vector<FaceVariables> faceVariables_;
 
  109template<
class P, 
class FV, 
class Traits>
 
  112    using ThisType = StaggeredGridFaceVariables<P, FV, 
false, Traits>;
 
  113    using Problem = 
typename Traits::Problem;
 
  117    static constexpr bool cachingEnabled = 
false;
 
  120    using LocalView = 
typename Traits::template LocalView<ThisType, cachingEnabled>;
 
  123    using FaceVariables = 
typename Traits::FaceVariables;
 
  125    StaggeredGridFaceVariables(
const Problem& problem) : problemPtr_(&problem) {}
 
  128    template<
class Gr
idGeometry, 
class SolutionVector>
 
  129    void update(
const GridGeometry& gridGeometry, 
const SolutionVector& sol) {}
 
  131    const Problem& problem()
 const 
  132    { 
return *problemPtr_; }
 
  135    const Problem* problemPtr_;
 
Base class for the face variables vector.
Definition elementfacevariables.hh:28
The global face variables class for staggered models.
Definition facesolution.hh:28
Face variables cache class for staggered models.
Definition gridfacevariables.hh:47
Base class for the face variables vector.
The global face variables class for staggered models.
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition localview.hh:26
Free function to get the local view of a grid cache object.
Traits class to be used for the StaggeredGridFaceVariables.
Definition gridfacevariables.hh:31
P Problem
Definition gridfacevariables.hh:36
StaggeredElementFaceVariables< GridFaceVariables, enableCache > LocalView
Definition gridfacevariables.hh:33
FV FaceVariables
Definition gridfacevariables.hh:35