| 50 | void SetCoarseGridPreconditioner (bool ah = true) { coarse = ah; } |
| 51 | |
| 52 | BDDCMatrix (shared_ptr<BilinearForm> abfa, |
| 53 | shared_ptr<BitArray> freedofs, |
| 54 | Flags flags, |
| 55 | const string & ainversetype, |
| 56 | const string & acoarsetype, |
| 57 | bool ablock, |
| 58 | bool ahypre |
| 59 | ) |
| 60 | : bfa(abfa), block(ablock), inversetype(ainversetype), coarsetype(acoarsetype) |
| 61 | { |
| 62 | static Timer timer ("BDDC Constructor"); |
| 63 | |
| 64 | fes = bfa->GetFESpace(); |
| 65 | |
| 66 | coarse = (coarsetype != "none"); |
| 67 | |
| 68 | hypre = ahypre; |
| 69 | |
| 70 | local = flags.GetDefineFlag("local"); |
| 71 | if (block) |
| 72 | blocktype = flags.GetStringFlag ("blocktype", ""); |
| 73 | // pwbmat = NULL; |
| 74 | inv = NULL; |
| 75 | |
| 76 | inv_coarse = NULL; |
| 77 | // tmp = NULL; |
| 78 | // tmp2 = NULL; |
| 79 | RegionTimer reg(timer); |
| 80 | |
| 81 | // auto fes = bfa -> GetFESpace(); |
| 82 | shared_ptr<MeshAccess> ma = fes->GetMeshAccess(); |
| 83 | |
| 84 | Array<int> wbdcnt(ma->GetNE()+ma->GetNSE()+ma->GetNCD2E()+bfa->GetSpecialElements().Size()); |
| 85 | Array<int> ifcnt(ma->GetNE()+ma->GetNSE()+ma->GetNCD2E()+bfa->GetSpecialElements().Size()); |
| 86 | wbdcnt = 0; |
| 87 | ifcnt = 0; |
| 88 | // const BitArray & freedofs = *fes->GetFreeDofs(); |
| 89 | |
| 90 | |
| 91 | LocalHeap lh(10000, "BDDC-constr, dummy heap"); |
| 92 | |
| 93 | for (auto vb : { VOL, BND, BBND }) |
| 94 | IterateElements |
| 95 | (*fes, vb, lh, |
| 96 | [&] (FESpace::Element el, LocalHeap & lh) |
| 97 | { |
| 98 | int base = (vb == VOL) ? 0 : ((vb == BND) ? ma->GetNE() : ma->GetNE() + ma->GetNSE()); |
| 99 | for (auto d : el.GetDofs()) |
| 100 | { |
| 101 | if (!IsRegularDof(d)) continue; |
| 102 | if (!freedofs->Test(d)) continue; |
| 103 | COUPLING_TYPE ct = fes->GetDofCouplingType(d); |
| 104 | if ( ((ct & CONDENSABLE_DOF) != 0) && bfa->UsesEliminateInternal()) continue; |
| 105 | |
| 106 | int ii = base + el.Nr(); |
| 107 | if (ct == WIREBASKET_DOF) |
| 108 | wbdcnt[ii]++; |
| 109 | else |
nothing calls this directly
no test coverage detected