Commit 08d303cd authored by Martin Schneider's avatar Martin Schneider Committed by Timo Koch
Browse files

[ccwmpfa] Minor fixes

parent 93b4bb34
......@@ -82,7 +82,14 @@ public:
void clear()
{
visited_ = 0;
entries_.clear();
entries_[0].clear();
entries_[1].clear();
}
void prepare()
{
if(visited_ == 2 || boundaryFace_)
clear();
}
template<class TF, class EG, class SCVF>
......@@ -116,7 +123,7 @@ public:
{
if(e.dofIndex() != scvf.insideScvIdx())
{
auto c = coeff[scvf.localIndex()]*e.weight();
auto c = coeff[i]*e.weight();
entries[0].coefficient += c;
//ToDo pos is not needed for each entry!!!
entries.push_back({c, e.dofIndex(), intData.position()});
......@@ -125,6 +132,13 @@ public:
}
scvfIndices_[visited_] = scvf.index();
scvIndices_[visited_] = scvf.insideScvIdx();
if(boundaryFace_)
{
++visited_;
scvfIndices_[visited_] = scvf.index();
scvIndices_[visited_] = scvf.outsideScvIdx();
}
}
const auto& subFluxData(GridIndexType idx) const
......@@ -143,7 +157,7 @@ private:
std::array<GridIndexType, 2> scvfIndices_;
std::array<GridIndexType, 2> scvIndices_;
std::array<Entries, 2> entries_;
bool boundaryFace_;
bool boundaryFace_ = {false};
};
//! Data handle for quantities related to diffusion
......
......@@ -112,7 +112,7 @@ public:
static constexpr DiscretizationMethod discMethod = DiscretizationMethod::ccwmpfa;
//! The maximum admissible stencil size (used for static memory allocation during assembly)
static constexpr int maxElementStencilSize = LocalView::maxNumElementScvfs*Traits::maxNumScvfNeighbors + 1;
static constexpr int maxElementStencilSize = LocalView::maxNumElementScvfs*LocalView::maxNumElementScvfs*Traits::maxNumScvfNeighbors + 1;
//! export the grid view type
using GridView = GV;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment