MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / AddElementMatrix

Method AddElementMatrix

comp/bddc.cpp:706–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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>

Callers

nothing calls this directly

Calls 6

IsRegularDofFunction · 0.85
RangeFunction · 0.50
L2NormFunction · 0.50
ColsMethod · 0.45
RowsMethod · 0.45
AddMatrixMethod · 0.45

Tested by

no test coverage detected