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;
85 template<
class Gr
idGeometry,
class SolutionVector>
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;
141 template<
class Gr
idGeometry,
class SolutionVector>
145 {
return *problemPtr_; }
148 const Problem* problemPtr_;
Free function to get the local view of a grid cache object.
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:38
Definition common/properties.hh:113
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
StaggeredElementFaceVariables< GridFaceVariables, enableCache > LocalView
Definition gridfacevariables.hh:45
FV FaceVariables
Definition gridfacevariables.hh:47
Face variables cache class for staggered models.
Definition gridfacevariables.hh:59
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
static constexpr bool cachingEnabled
make it possible to query if caching is enabled
Definition gridfacevariables.hh:74
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
StaggeredGridFaceVariables(const Problem &problem)
Definition gridfacevariables.hh:138
static constexpr bool cachingEnabled
make it possible to query if caching is enabled
Definition gridfacevariables.hh:130
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