Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
with
6 additions
and
6 deletions.
-
+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; |
|
|
|
|
|