Skip to content
Snippets Groups Projects
Commit 260bcdc6 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[mpfa-o][staticiv] move surface grid check into static assert

parent 53f7c46d
No related branches found
No related tags found
2 merge requests!1337WIP Fix/dirichlet caching v2,!1298Restructure mpfa flux caches
......@@ -138,6 +138,9 @@ class CCMpfaOStaticInteractionVolume
static constexpr int numScv = Traits::numScvs;
public:
//! This does not work on surface grids
static_assert(int(GridView::dimension)==int(GridView::dimensionworld), "static iv does not work on surface grids");
//! export the standard o-methods dirichlet data
using DirichletData = typename CCMpfaOInteractionVolume< Traits >::DirichletData;
......@@ -170,14 +173,11 @@ public:
for (LocalIndexType faceIdxLocal = 0; faceIdxLocal < numScvf; ++faceIdxLocal)
{
const auto& scvf = fvGeometry.scvf(indexSet.gridScvfIndex(faceIdxLocal));
assert(!scvf.boundary());
// the neighboring scvs in local indices (order: 0 - inside scv, 1..n - outside scvs)
const auto& neighborScvIndicesLocal = indexSet.neighboringLocalScvIndices(faceIdxLocal);
// this does not work for network grids or on boundaries
assert(!scvf.boundary());
assert(neighborScvIndicesLocal.size() == 2);
// create iv-local scvf objects
scvfs_[faceIdxLocal] = LocalScvfType(scvf, neighborScvIndicesLocal, faceIdxLocal, /*isDirichlet*/false);
localFaceData_[faceIdxLocal*2] = LocalFaceData(faceIdxLocal, neighborScvIndicesLocal[0], scvf.index());
......
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