Permalink
Browse files

Merge branch 'fix_bddc_bbnd' into 'master'

fix for BDDC if BBND elements are in the mesh

See merge request jschoeberl/ngsolve!259
  • Loading branch information...
JSchoeberl committed Nov 8, 2017
2 parents 2ac7380 + c837aed commit 36f84546de4cd2b138845bcb5a44802a331aa78c
Showing with 6 additions and 6 deletions.
  1. +6 −6 comp/bddc.cpp
@@ -70,21 +70,21 @@ namespace ngcomp
// auto fes = bfa -> GetFESpace();
shared_ptr<MeshAccess> ma = fes->GetMeshAccess();
Array<int> wbdcnt(ma->GetNE()+ma->GetNSE());
Array<int> ifcnt(ma->GetNE()+ma->GetNSE());
Array<int> wbdcnt(ma->GetNE()+ma->GetNSE()+ma->GetNCD2E());
Array<int> ifcnt(ma->GetNE()+ma->GetNSE()+ma->GetNCD2E());
wbdcnt = 0;
ifcnt = 0;
const BitArray & freedofs = *fes->GetFreeDofs();
LocalHeap lh(10000, "BDDC-constr, dummy heap");
for (auto vb : { VOL, BND })
for (auto vb : { VOL, BND, BBND })
IterateElements
(*fes, vb, lh,
[&] (FESpace::Element el, LocalHeap & lh)
{
int base = (vb == VOL) ? 0 : ma->GetNE();
int base = (vb == VOL) ? 0 : ((vb == BND) ? ma->GetNE() : ma->GetNE() + ma->GetNSE());
for (auto d : el.GetDofs())
{
if (d == -1) continue;
@@ -103,12 +103,12 @@ namespace ngcomp
Table<int> el2wbdofs(wbdcnt); // wirebasket dofs on each element
Table<int> el2ifdofs(ifcnt); // interface dofs on each element
for (auto vb : { VOL, BND })
for (auto vb : { VOL, BND, BBND })
IterateElements
(*fes, vb, lh,
[&] (FESpace::Element el, LocalHeap & lh)
{
int base = (vb == VOL) ? 0 : ma->GetNE();
int base = (vb == VOL) ? 0 : ((vb == BND) ? ma->GetNE() : ma->GetNE() + ma->GetNSE());
int lifcnt = 0;
int lwbcnt = 0;

0 comments on commit 36f8454

Please sign in to comment.