24#ifndef DUMUX_DISCRETIZATION_STAGGERED_FACE_SOLUTION_HH
25#define DUMUX_DISCRETIZATION_STAGGERED_FACE_SOLUTION_HH
38template<
class FaceSolutionVector>
41 using FacePrimaryVariables = std::decay_t<decltype(std::declval<FaceSolutionVector>()[0])>;
45 template<
class SubControlVolumeFace,
class Gr
idGeometry>
47 const GridGeometry& gridGeometry)
50 const auto& connectivityMap = gridGeometry.connectivityMap();
51 const auto& stencil = connectivityMap(GridGeometry::faceIdx(), GridGeometry::faceIdx(), scvf.index());
53 facePriVars_.reserve(stencil.size()+1);
54 map_.reserve(stencil.size()+1);
56 map_.push_back(scvf.dofIndex());
57 facePriVars_.push_back(sol[scvf.dofIndex()]);
58 for(
const auto dofJ : stencil)
61 facePriVars_.push_back(sol[dofJ]);
66 template<
typename IndexType>
67 const FacePrimaryVariables&
operator [](IndexType globalFaceDofIdx)
const
69 const auto pos = std::find(map_.begin(), map_.end(), globalFaceDofIdx);
70 assert (pos != map_.end());
71 return facePriVars_[pos - map_.begin()];
75 template<
typename IndexType>
78 const auto pos = std::find(map_.begin(), map_.end(), globalFaceDofIdx);
79 assert (pos != map_.end());
80 return facePriVars_[pos - map_.begin()];
85 std::vector<FacePrimaryVariables> facePriVars_;
86 std::vector<unsigned int> map_;
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
The global face variables class for staggered models.
Definition: facesolution.hh:40
const FacePrimaryVariables & operator[](IndexType globalFaceDofIdx) const
bracket operator const access
Definition: facesolution.hh:67
StaggeredFaceSolution(const SubControlVolumeFace &scvf, const FaceSolutionVector &sol, const GridGeometry &gridGeometry)
Definition: facesolution.hh:46