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

Method FinalizeUpdate

comp/fespace.cpp:518–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516
517
518 void FESpace :: FinalizeUpdate()
519 {
520 static Timer timer ("FESpace::FinalizeUpdate");
521 /*
522 static Timer timer1 ("FESpace::FinalizeUpdate 1");
523 static Timer timer2 ("FESpace::FinalizeUpdate 2");
524 static Timer timer3 ("FESpace::FinalizeUpdate 3");
525 static Timer tcol ("FESpace::FinalizeUpdate - coloring");
526 static Timer tcolbits ("FESpace::FinalizeUpdate - bitarrays");
527 static Timer tcolmutex ("FESpace::FinalizeUpdate - coloring, init mutex");
528 */
529 if (low_order_space) low_order_space -> FinalizeUpdate();
530
531 UpdateFreeDofs();
532
533
534 UpdateParallelDofs();
535
536 if (print)
537 *testout << "coloring ... " << flush;
538
539 if (low_order_space)
540 {
541 for(auto vb : {VOL, BND, BBND, BBBND})
542 element_coloring[vb] = Table<int>(low_order_space->element_coloring[vb]);
543 }
544 else
545 {
546 // tcolmutex.Start();
547 Array<MyMutex> locks(GetNDof());
548 // tcolmutex.Stop();
549
550 for (auto vb : { VOL, BND, BBND, BBBND })
551 {
552 /*
553 tcol.Start();
554 Array<int> col(ma->GetNE(vb));
555 col = -1;
556
557 int maxcolor = 0;
558
559 int basecol = 0;
560 Array<unsigned int> mask(GetNDof());
561
562 size_t cnt = 0, found = 0;
563 for (ElementId el : Elements(vb)) { cnt++; (void)el; } // no warning
564
565 do
566 {
567 mask = 0;
568
569 Array<DofId> dofs;
570 // for (auto el : Elements(vb))
571 for (auto el : ma->Elements(vb))
572 {
573 if (!DefinedOn(el)) continue;
574 if (col[el.Nr()] >= 0) continue;
575

Callers

nothing calls this directly

Calls 14

HasAtomicDofsFunction · 0.85
IsRegularDofFunction · 0.85
IsAtomicDofFunction · 0.85
GetNDofFunction · 0.70
ElementsFunction · 0.70
DefinedOnFunction · 0.70
GetDofNrsFunction · 0.70
FinalizeUpdateFunction · 0.70
TimingClass · 0.50
FinalizeUpdateMethod · 0.45
SizeMethod · 0.45
NrMethod · 0.45

Tested by

no test coverage detected