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;
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);
91 {
return faceVariables_[facetIdx]; }
94 {
return faceVariables_[facetIdx]; }
97 {
return *problemPtr_; }
100 const Problem* problemPtr_;
101 std::vector<FaceVariables> faceVariables_;
109template<
class P,
class FV,
class Traits>
113 using Problem =
typename Traits::Problem;
117 static constexpr bool cachingEnabled =
false;
128 template<
class Gr
idGeometry,
class SolutionVector>
129 void update(
const GridGeometry& gridGeometry,
const SolutionVector& sol) {}
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. Specialization in case of not storing the face varia...
Definition: gridfacevariables.hh:111
StaggeredGridFaceVariables(const Problem &problem)
Definition: gridfacevariables.hh:125
const Problem & problem() const
Definition: gridfacevariables.hh:131
typename Traits::FaceVariables FaceVariables
export the type of the face variables
Definition: gridfacevariables.hh:123
typename Traits::template LocalView< ThisType, cachingEnabled > LocalView
export the type of the local view
Definition: gridfacevariables.hh:120
void update(const GridGeometry &gridGeometry, const SolutionVector &sol)
Do nothing here.
Definition: gridfacevariables.hh:129
Face variables cache class for staggered models. Specialization in case of storing the face variables...
Definition: gridfacevariables.hh:56
typename Traits::template LocalView< ThisType, cachingEnabled > LocalView
export the type of the local view
Definition: gridfacevariables.hh:65
void update(const GridGeometry &gridGeometry, const SolutionVector &sol)
Update all face variables.
Definition: gridfacevariables.hh:74
typename Traits::FaceVariables FaceVariables
export the type of the face variables
Definition: gridfacevariables.hh:68
StaggeredGridFaceVariables(const Problem &problem)
Definition: gridfacevariables.hh:70
const Problem & problem() const
Definition: gridfacevariables.hh:96
FaceVariables & faceVars(const std::size_t facetIdx)
Definition: gridfacevariables.hh:93
const FaceVariables & faceVars(const std::size_t facetIdx) const
Definition: gridfacevariables.hh:90
Face variables cache class for staggered models.
Definition: gridfacevariables.hh:47
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
FV FaceVariables
Definition: gridfacevariables.hh:35