24#ifndef DUMUX_DISCRETIZATION_STAGGERED_GRID_FACEVARIABLES_HH
25#define DUMUX_DISCRETIZATION_STAGGERED_GRID_FACEVARIABLES_HH
41template<
class P,
class FV>
44 template<
class Gr
idFaceVariables,
bool enableCache>
55template<
class Problem,
57 bool cachingEnabled =
false,
66template<
class P,
class FV,
class Traits>
70 using Problem =
typename Traits::Problem;
74 static constexpr bool cachingEnabled =
true;
85 template<
class Gr
idGeometry,
class SolutionVector>
86 void update(
const GridGeometry& gridGeometry,
const SolutionVector& sol)
88 faceVariables_.resize(gridGeometry.numScvf());
90 for (
auto&& element : elements(gridGeometry.gridView()))
92 auto fvGeometry =
localView(gridGeometry);
93 fvGeometry.bindElement(element);
95 for (
auto&& scvf : scvfs(fvGeometry))
98 faceVariables_[scvf.index()].update(faceSol, problem(), element, fvGeometry, scvf);
104 {
return faceVariables_[facetIdx]; }
107 {
return faceVariables_[facetIdx]; }
110 {
return *problemPtr_; }
113 const Problem* problemPtr_;
114 std::vector<FaceVariables> faceVariables_;
122template<
class P,
class FV,
class Traits>
126 using Problem =
typename Traits::Problem;
130 static constexpr bool cachingEnabled =
false;
141 template<
class Gr
idGeometry,
class SolutionVector>
142 void update(
const GridGeometry& gridGeometry,
const SolutionVector& sol) {}
145 {
return *problemPtr_; }
148 const Problem* problemPtr_;
Free function to get the local view of a grid cache object.
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition: localview.hh:38
Base class for the face variables vector.
Definition: elementfacevariables.hh:39
The global face variables class for staggered models.
Definition: facesolution.hh:40
Traits class to be used for the StaggeredGridFaceVariables.
Definition: gridfacevariables.hh:43
P Problem
Definition: gridfacevariables.hh:48
FV FaceVariables
Definition: gridfacevariables.hh:47
Face variables cache class for staggered models.
Definition: gridfacevariables.hh:59
Face variables cache class for staggered models. Specialization in case of storing the face variables...
Definition: gridfacevariables.hh:68
typename Traits::template LocalView< ThisType, cachingEnabled > LocalView
export the type of the local view
Definition: gridfacevariables.hh:77
void update(const GridGeometry &gridGeometry, const SolutionVector &sol)
Update all face variables.
Definition: gridfacevariables.hh:86
typename Traits::FaceVariables FaceVariables
export the type of the face variables
Definition: gridfacevariables.hh:80
StaggeredGridFaceVariables(const Problem &problem)
Definition: gridfacevariables.hh:82
const Problem & problem() const
Definition: gridfacevariables.hh:109
FaceVariables & faceVars(const std::size_t facetIdx)
Definition: gridfacevariables.hh:106
const FaceVariables & faceVars(const std::size_t facetIdx) const
Definition: gridfacevariables.hh:103
Face variables cache class for staggered models. Specialization in case of not storing the face varia...
Definition: gridfacevariables.hh:124
StaggeredGridFaceVariables(const Problem &problem)
Definition: gridfacevariables.hh:138
const Problem & problem() const
Definition: gridfacevariables.hh:144
typename Traits::FaceVariables FaceVariables
export the type of the face variables
Definition: gridfacevariables.hh:136
typename Traits::template LocalView< ThisType, cachingEnabled > LocalView
export the type of the local view
Definition: gridfacevariables.hh:133
void update(const GridGeometry &gridGeometry, const SolutionVector &sol)
Do nothing here.
Definition: gridfacevariables.hh:142