| 704 | |
| 705 | template <class SCAL, class TV> |
| 706 | void BDDCPreconditioner<SCAL, TV> :: |
| 707 | AddElementMatrix (FlatArray<int> dnums, |
| 708 | FlatMatrix<SCAL> elmat, |
| 709 | ElementId id, |
| 710 | LocalHeap & lh) |
| 711 | { |
| 712 | // auto fes = bfa->GetFESpace(); |
| 713 | int used = 0; |
| 714 | for (int i : Range(dnums)) |
| 715 | if (IsRegularDof(dnums[i]) && freedofs->Test(dnums[i])) used++; |
| 716 | |
| 717 | FlatArray<int> compress(used, lh); |
| 718 | int cnt = 0; |
| 719 | for (int i : Range(dnums)) |
| 720 | if (IsRegularDof(dnums[i]) && freedofs->Test(dnums[i])) |
| 721 | compress[cnt++] = i; |
| 722 | |
| 723 | FlatArray<int> hdnums(used, lh); |
| 724 | FlatMatrix<SCAL> helmat(used,used, lh); |
| 725 | hdnums = dnums[compress]; |
| 726 | helmat = elmat.Rows(compress).Cols(compress); |
| 727 | |
| 728 | if (L2Norm (helmat) != 0) |
| 729 | pre -> AddMatrix(helmat, hdnums, id, lh); |
| 730 | } |
| 731 | |
| 732 | |
| 733 | template <class SCAL, class TV> |