Skip to content
Snippets Groups Projects
Commit d00caf24 authored by Kilian Weishaupt's avatar Kilian Weishaupt Committed by Timo Koch
Browse files

[staggeredGrid][scvFace] Add helper function to indicate direction of unit normal

parent c921bc8d
No related branches found
No related tags found
2 merge requests!617[WIP] Next,!370Feature/staggered grid
...@@ -105,6 +105,7 @@ public: ...@@ -105,6 +105,7 @@ public:
pairData_ = geometryHelper.pairData(); pairData_ = geometryHelper.pairData();
localFaceIdx_ = is.indexInInside(); localFaceIdx_ = is.indexInInside();
dirIdx_ = geometryHelper.directionIndex(); dirIdx_ = geometryHelper.directionIndex();
normalInPosCoordDir_ = unitOuterNormal()[directionIndex()] > 0.0;
} }
/*//! The copy constrcutor /*//! The copy constrcutor
...@@ -222,6 +223,12 @@ public: ...@@ -222,6 +223,12 @@ public:
return selfToOppositeDistance_; return selfToOppositeDistance_;
} }
//! The returns whether the unitNormal of the face point in positive coordinate direction
bool normalInPosCoordDir() const
{
return normalInPosCoordDir_;
}
auto pairData(const int idx) const auto pairData(const int idx) const
{ {
...@@ -250,6 +257,7 @@ private: ...@@ -250,6 +257,7 @@ private:
std::array<PairData<Scalar, GlobalPosition>, numPairs> pairData_; std::array<PairData<Scalar, GlobalPosition>, numPairs> pairData_;
int localFaceIdx_; int localFaceIdx_;
int dirIdx_; int dirIdx_;
bool normalInPosCoordDir_;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment