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

[staggered][faceVars] Use new index method

parent f56916b2
No related branches found
No related tags found
Loading
...@@ -43,6 +43,7 @@ class StaggeredFaceVariables ...@@ -43,6 +43,7 @@ class StaggeredFaceVariables
using FacePrimaryVariables = typename GET_PROP_TYPE(TypeTag, FacePrimaryVariables); using FacePrimaryVariables = typename GET_PROP_TYPE(TypeTag, FacePrimaryVariables);
using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace); using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
static constexpr int dimWorld = GridView::dimensionworld; static constexpr int dimWorld = GridView::dimensionworld;
static constexpr int numPairs = (dimWorld == 2) ? 2 : 4; static constexpr int numPairs = (dimWorld == 2) ? 2 : 4;
...@@ -120,13 +121,13 @@ public: ...@@ -120,13 +121,13 @@ public:
{ {
const auto& normalFace = fvGeometry.scvf(scvf.insideScvIdx(), subFaceData.localNormalFaceIdx); const auto& normalFace = fvGeometry.scvf(scvf.insideScvIdx(), subFaceData.localNormalFaceIdx);
const auto normalDirIdx = normalFace.directionIndex(); const auto normalDirIdx = normalFace.directionIndex();
velocityNormalOutside_[i] = problem.dirichlet(element, makeGhostFace(subFaceData.virtualOuterNormalFaceDofPos))[faceIdx][normalDirIdx]; velocityNormalOutside_[i] = problem.dirichlet(element, makeGhostFace(subFaceData.virtualOuterNormalFaceDofPos))[Indices::velocity(normalDirIdx)];
} }
// treat the velocity parallel to the face // treat the velocity parallel to the face
velocityParallel_[i] = hasParallelNeighbor(subFaceData) ? velocityParallel_[i] = hasParallelNeighbor(subFaceData) ?
velocityParallel_[i] = faceSol[subFaceData.outerParallelFaceDofIdx] : velocityParallel_[i] = faceSol[subFaceData.outerParallelFaceDofIdx] :
problem.dirichlet(element, makeGhostFace(subFaceData.virtualOuterParallelFaceDofPos))[faceIdx][scvf.directionIndex()]; problem.dirichlet(element, makeGhostFace(subFaceData.virtualOuterParallelFaceDofPos))[Indices::velocity(scvf.directionIndex())];
} }
} }
......
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