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());
89 auto fvGeometry =
localView(gridGeometry);
90 for (
auto&& element : elements(gridGeometry.gridView()))
92 fvGeometry.bindElement(element);
94 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;
129 static constexpr bool cachingEnabled =
false;
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.
GridCache::LocalView localView(const GridCache &gridCache)
Free function to get the local view of a grid cache object.
Definition: localview.hh:38
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
Base class for the face variables vector.
Definition: elementfacevariables.hh:40
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: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
Face variables cache class for staggered models. Specialization in case of not storing the face varia...
Definition: gridfacevariables.hh:123
StaggeredGridFaceVariables(const Problem &problem)
Definition: gridfacevariables.hh:137
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