diff --git a/dumux/discretization/staggered/globalfacevariables.hh b/dumux/discretization/staggered/globalfacevariables.hh index 58a892ad21fefc782c8d8f2be92a01a0a77312d7..6e4ff413782ba5d94b3e978b3098b63b3ea0680b 100644 --- a/dumux/discretization/staggered/globalfacevariables.hh +++ b/dumux/discretization/staggered/globalfacevariables.hh @@ -81,7 +81,7 @@ public: problemPtr_ = &problem; faceVariables_.resize(problem.model().numFaceDofs()); - assert(faceVariables_.size == sol.size()); + assert(faceVariables_.size() == sol.size()); for(int i = 0; i < problem.model().numFaceDofs(); ++i) { diff --git a/dumux/discretization/staggered/staggeredgeometryhelper.hh b/dumux/discretization/staggered/staggeredgeometryhelper.hh index 0eb8233df9d56bc1908607e90677001b4e14917d..70e52a9730872d02c979d37d4d08a78627439498 100644 --- a/dumux/discretization/staggered/staggeredgeometryhelper.hh +++ b/dumux/discretization/staggered/staggeredgeometryhelper.hh @@ -110,8 +110,8 @@ public: Scalar selfToOppositeDistance() const { const auto inIdx = intersection_.indexInInside(); - const auto& self = element_.template subEntity <1> (inIdx); - const auto& opposite = element_.template subEntity <1> (localOppositeIdx_(inIdx)); + const auto self = element_.template subEntity <1> (inIdx); + const auto opposite = element_.template subEntity <1> (localOppositeIdx_(inIdx)); return (self.geometry().center() - opposite.geometry().center()).two_norm(); } @@ -308,9 +308,10 @@ protected: return this->gridView_.indexSet().subIndex(element, localIdx, codimCommonEntity); }; - const Intersection& intersection_; //! The intersection of interest - const Element& element_; //! The respective element - const typename Element::Geometry& elementGeometry_; //! Reference to the element geometry + // TODO: check whether to use references here or not + const Intersection intersection_; //! The intersection of interest + const Element element_; //! The respective element + const typename Element::Geometry elementGeometry_; //! Reference to the element geometry const GridView gridView_; const int offset_; //! Offset for intersection dof indexing std::array<PairData<Scalar, GlobalPosition>, numPairs> pairData_; //! collection of pair information diff --git a/dumux/freeflow/staggered/indices.hh b/dumux/freeflow/staggered/indices.hh index 11ce35e9b8e8fcbed744e01b89d33a61d2cbbbad..636a58d6d285f9ba9b10f74bfc224700597e9299 100644 --- a/dumux/freeflow/staggered/indices.hh +++ b/dumux/freeflow/staggered/indices.hh @@ -50,7 +50,7 @@ struct NavierStokesCommonIndices static const int dimYIdx = 1; //!< Index of the y-component of a vector of size dim static const int dimZIdx = 2; //!< Index of the z-component of a vector of size dim - static const int massBalanceIdx = dim; //!< Index of the mass balance equation + static const int massBalanceIdx = PVOffset + 0; //!< Index of the mass balance equation static const int conti0EqIdx = massBalanceIdx; //!< Index of first (for C-guys: 0th) mass conservation equation static const int pressureIdx = massBalanceIdx; //!< Index of the pressure in a solution vector