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

[staggeredGrid][stencils] Do not use offset for faceDof indices

*Not needed since we use a multitype matrix
parent 4f1c9866
No related branches found
No related tags found
Loading
...@@ -200,7 +200,7 @@ public: ...@@ -200,7 +200,7 @@ public:
{ {
faceStencils_[scvf.index()].update(problem, scvf); faceStencils_[scvf.index()].update(problem, scvf);
const IndexType idx = scvf.dofIndexSelf() - numElements; const IndexType idx = scvf.dofIndexSelf();
const auto& faceToCellCenterStencil = faceStencils_[scvf.index()].faceToCellCenterStencil(); const auto& faceToCellCenterStencil = faceStencils_[scvf.index()].faceToCellCenterStencil();
fullFaceToCellCenterStencils[idx].insert(fullFaceToCellCenterStencils[idx].end(), faceToCellCenterStencil.begin(), faceToCellCenterStencil.end()); fullFaceToCellCenterStencils[idx].insert(fullFaceToCellCenterStencils[idx].end(), faceToCellCenterStencil.begin(), faceToCellCenterStencil.end());
...@@ -229,7 +229,7 @@ public: ...@@ -229,7 +229,7 @@ public:
auto& get(const SubControlVolumeFace& scvFace) const auto& get(const SubControlVolumeFace& scvFace) const
{ {
const IndexType numElements = problemPtr_->gridView().size(0); const IndexType numElements = problemPtr_->gridView().size(0);
return faceStencils_[scvFace.dofIndexSelf() - numElements]; return faceStencils_[scvFace.dofIndexSelf()];
} }
/*! /*!
...@@ -237,10 +237,8 @@ public: ...@@ -237,10 +237,8 @@ public:
*/ */
size_t fullFaceToCellCenterStencilSize(const int idx) const size_t fullFaceToCellCenterStencilSize(const int idx) const
{ {
// const IndexType numElements = problemPtr_->gridView().size(0);
assert(fullFaceToCellCenterStencils_ && "fullFaceToCellCenterStencils_ has already been called and deleted!"); assert(fullFaceToCellCenterStencils_ && "fullFaceToCellCenterStencils_ has already been called and deleted!");
return fullFaceToCellCenterStencils_.get()[0][idx/*-numElements*/].size(); return fullFaceToCellCenterStencils_.get()[0][idx].size();
// TODO: why does this not work?
} }
/*! /*!
...@@ -248,10 +246,8 @@ public: ...@@ -248,10 +246,8 @@ public:
*/ */
size_t fullfaceToFaceStencilSize(const int idx) const size_t fullfaceToFaceStencilSize(const int idx) const
{ {
// const IndexType numElements = problemPtr_->gridView().size(0);
assert(fullfaceToFaceStencils_ && "fullfaceToFaceStencils_ has already been called and deleted!"); assert(fullfaceToFaceStencils_ && "fullfaceToFaceStencils_ has already been called and deleted!");
return fullfaceToFaceStencils_.get()[0][idx/*-numElements*/].size(); return fullfaceToFaceStencils_.get()[0][idx].size();
// TODO: why does this not work?
} }
/*! /*!
......
...@@ -160,7 +160,7 @@ private: ...@@ -160,7 +160,7 @@ private:
for (auto&& globalJ : cellCenterToCellCenterStencil) for (auto&& globalJ : cellCenterToCellCenterStencil)
A11.addindex(globalI, globalJ); A11.addindex(globalI, globalJ);
for (auto&& globalJ : cellCenterToFaceStencil) for (auto&& globalJ : cellCenterToFaceStencil)
A12.addindex(globalI, globalJ - this->gridView_().size(0)); A12.addindex(globalI, globalJ);
} }
A11.endindices(); A11.endindices();
A12.endindices(); A12.endindices();
...@@ -185,7 +185,7 @@ private: ...@@ -185,7 +185,7 @@ private:
for(const auto& stencil : fullfaceToFaceStencils) for(const auto& stencil : fullfaceToFaceStencils)
{ {
for(auto&& globalJ : stencil) for(auto&& globalJ : stencil)
A22.addindex(globalI, globalJ - this->gridView_().size(0)); A22.addindex(globalI, globalJ);
++globalI; ++globalI;
} }
......
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