24#ifndef DUMUX_DISCRETIZATION_STAGGERED_GRID_FACEVARIABLES_HH
25#define DUMUX_DISCRETIZATION_STAGGERED_GRID_FACEVARIABLES_HH
40template<
class P,
class FV>
43 template<
class Gr
idFaceVariables,
bool enableCache>
54template<
class Problem,
56 bool cachingEnabled =
false,
65template<
class P,
class FV,
class Traits>
69 using Problem =
typename Traits::Problem;
84 template<
class Gr
idGeometry,
class SolutionVector>
85 void update(
const GridGeometry& gridGeometry,
const SolutionVector& faceSol)
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))
97 faceVariables_[scvf.index()].update(faceSol,
problem(), element, fvGeometry, scvf);
103 {
return faceVariables_[facetIdx]; }
106 {
return faceVariables_[facetIdx]; }
109 {
return *problemPtr_; }
112 const Problem* problemPtr_;
113 std::vector<FaceVariables> faceVariables_;
121template<
class P,
class FV,
class Traits>
125 using Problem =
typename Traits::Problem;
140 template<
class Gr
idGeometry,
class SolutionVector>
141 void update(
const GridGeometry& gridGeometry,
const SolutionVector& sol) {}
144 {
return *problemPtr_; }
147 const Problem* problemPtr_;
Free function to get the local view of a grid cache object.
Base class for the face variables vector.
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition localview.hh:38
make the local view function available whenever we use the grid geometry
Definition adapt.hh:29
Base class for the face variables vector.
Definition elementfacevariables.hh:39
Traits class to be used for the StaggeredGridFaceVariables.
Definition gridfacevariables.hh:42
P Problem
Definition gridfacevariables.hh:47
StaggeredElementFaceVariables< GridFaceVariables, enableCache > LocalView
Definition gridfacevariables.hh:44
FV FaceVariables
Definition gridfacevariables.hh:46
Face variables cache class for staggered models.
Definition gridfacevariables.hh:58
typename Traits::template LocalView< ThisType, cachingEnabled > LocalView
export the type of the local view
Definition gridfacevariables.hh:76
static constexpr bool cachingEnabled
make it possible to query if caching is enabled
Definition gridfacevariables.hh:73
typename Traits::FaceVariables FaceVariables
export the type of the face variables
Definition gridfacevariables.hh:79
StaggeredGridFaceVariables(const Problem &problem)
Definition gridfacevariables.hh:81
const Problem & problem() const
Definition gridfacevariables.hh:108
FaceVariables & faceVars(const std::size_t facetIdx)
Definition gridfacevariables.hh:105
const FaceVariables & faceVars(const std::size_t facetIdx) const
Definition gridfacevariables.hh:102
void update(const GridGeometry &gridGeometry, const SolutionVector &faceSol)
Update all face variables.
Definition gridfacevariables.hh:85
StaggeredGridFaceVariables(const Problem &problem)
Definition gridfacevariables.hh:137
static constexpr bool cachingEnabled
make it possible to query if caching is enabled
Definition gridfacevariables.hh:129
const Problem & problem() const
Definition gridfacevariables.hh:143
typename Traits::FaceVariables FaceVariables
export the type of the face variables
Definition gridfacevariables.hh:135
typename Traits::template LocalView< ThisType, cachingEnabled > LocalView
export the type of the local view
Definition gridfacevariables.hh:132
void update(const GridGeometry &gridGeometry, const SolutionVector &sol)
Do nothing here.
Definition gridfacevariables.hh:141