From e5200d9e02b888b66d2080bceded5d19958aee76 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Sat, 4 Mar 2017 14:43:23 +0100 Subject: [PATCH] [staggeredGrid][freeflow] Add constructor to scvf class *Used for creating ghost faces --- .../staggered/freeflow/subcontrolvolumeface.hh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dumux/discretization/staggered/freeflow/subcontrolvolumeface.hh b/dumux/discretization/staggered/freeflow/subcontrolvolumeface.hh index 03fcac7834..b556ba2542 100644 --- a/dumux/discretization/staggered/freeflow/subcontrolvolumeface.hh +++ b/dumux/discretization/staggered/freeflow/subcontrolvolumeface.hh @@ -107,8 +107,18 @@ public: dirIdx_ = geometryHelper.directionIndex(); normalInPosCoordDir_ = unitOuterNormal()[directionIndex()] > 0.0; outerNormalScalar_ = unitOuterNormal()[directionIndex()]; + isGhostFace_ = false; } + //! Constructor for a ghost face outside of the domain. Only needed to retrieve the center and scvIndices + StaggeredSubControlVolumeFace(const GlobalPosition& dofPosition, + const std::vector<IndexType>& scvIndices) + { + isGhostFace_ = true; + center_ = dofPosition; + scvIndices_ = scvIndices; + scvfIndex_ = -1; + } /*//! The copy constrcutor StaggeredSubControlVolumeFace(const StaggeredSubControlVolumeFace& other) = delete; @@ -139,6 +149,12 @@ public: return center_; } + //! The center of the sub control volume face + GlobalPosition dofPosition() const + { + return center_; + } + //! The integration point for flux evaluations in global coordinates GlobalPosition ipGlobal() const { @@ -265,6 +281,7 @@ private: int dirIdx_; bool normalInPosCoordDir_; Scalar outerNormalScalar_; + bool isGhostFace_; }; -- GitLab