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

Method Mult

comp/bddc.cpp:537–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535
536
537 void Mult (const BaseVector & x, BaseVector & y) const override
538 {
539 static Timer timer ("Apply BDDC preconditioner");
540 static Timer timerifs ("Apply BDDC preconditioner - apply ifs");
541 static Timer timerwb ("Apply BDDC preconditioner - wb solve");
542 static Timer timerharmonicext ("Apply BDDC preconditioner - harmonic extension");
543 static Timer timerharmonicexttrans ("Apply BDDC preconditioner - harmonic extension trans");
544
545
546 RegionTimer reg (timer);
547
548 x.Distribute();
549 y = x;
550
551 timerharmonicexttrans.Start();
552
553 if (bfa->SymmetricStorage())
554 y += Transpose(*harmonicext) * x;
555 else
556 y += *harmonicexttrans * x;
557
558 timerharmonicexttrans.Stop();
559
560 timerwb.Start();
561 *tmp = 0;
562 if (block)
563 {
564 if (coarse)
565 throw Exception("combination of coarse and block not implemented! ");
566 if (true) //GS
567 {
568 dynamic_cast<BaseBlockJacobiPrecond*>(inv.get())->GSSmoothResiduum (*tmp, y, *tmp2 ,1);
569
570 if (inv_coarse)
571 *tmp += (*inv_coarse) * *tmp2;
572 dynamic_cast<BaseBlockJacobiPrecond*>(inv.get())->GSSmoothBack (*tmp, y);
573 }
574 else
575 { //jacobi only (old)
576 *tmp = (*inv) * y;
577 *tmp += (*inv_coarse) * y;
578 }
579 }
580 else
581 {
582 *tmp = (*inv) * y;
583 }
584 timerwb.Stop();
585
586 timerifs.Start();
587 // tmp->Distribute();
588 *tmp += *innersolve * x;
589 timerifs.Stop();
590
591 timerharmonicext.Start();
592
593 // tmp->Cumulate();
594 y = *tmp;

Callers

nothing calls this directly

Calls 5

DistributeMethod · 0.80
StopMethod · 0.80
CumulateMethod · 0.80
TransposeFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected