Skip to content
Snippets Groups Projects
Commit e5200d9e authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[staggeredGrid][freeflow] Add constructor to scvf class

*Used for creating ghost faces
parent 8a4270b2
No related branches found
No related tags found
Loading
...@@ -107,8 +107,18 @@ public: ...@@ -107,8 +107,18 @@ public:
dirIdx_ = geometryHelper.directionIndex(); dirIdx_ = geometryHelper.directionIndex();
normalInPosCoordDir_ = unitOuterNormal()[directionIndex()] > 0.0; normalInPosCoordDir_ = unitOuterNormal()[directionIndex()] > 0.0;
outerNormalScalar_ = unitOuterNormal()[directionIndex()]; 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 /*//! The copy constrcutor
StaggeredSubControlVolumeFace(const StaggeredSubControlVolumeFace& other) = delete; StaggeredSubControlVolumeFace(const StaggeredSubControlVolumeFace& other) = delete;
...@@ -139,6 +149,12 @@ public: ...@@ -139,6 +149,12 @@ public:
return center_; return center_;
} }
//! The center of the sub control volume face
GlobalPosition dofPosition() const
{
return center_;
}
//! The integration point for flux evaluations in global coordinates //! The integration point for flux evaluations in global coordinates
GlobalPosition ipGlobal() const GlobalPosition ipGlobal() const
{ {
...@@ -265,6 +281,7 @@ private: ...@@ -265,6 +281,7 @@ private:
int dirIdx_; int dirIdx_;
bool normalInPosCoordDir_; bool normalInPosCoordDir_;
Scalar outerNormalScalar_; Scalar outerNormalScalar_;
bool isGhostFace_;
}; };
......
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