MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / WeightedSync

Method WeightedSync

Src/Base/AMReX_MultiFab.cpp:1557–1575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1555}
1556
1557void
1558MultiFab::WeightedSync (const MultiFab& wgt, const Periodicity& period)
1559{
1560 BL_PROFILE("MultiFab::WeightedSync()");
1561
1562 if (ixType().cellCentered()) { return; }
1563
1564 const int ncomp = nComp();
1565 for (int comp = 0; comp < ncomp; ++comp)
1566 {
1567 MultiFab::Multiply(*this, wgt, 0, comp, 1, 0);
1568 }
1569
1570 MultiFab tmpmf(boxArray(), DistributionMap(), ncomp, 0, MFInfo(), Factory());
1571 tmpmf.setVal(Real(0.0));
1572 tmpmf.ParallelCopy(*this, period, FabArrayBase::ADD);
1573
1574 MultiFab::Copy(*this, tmpmf, 0, 0, ncomp, 0);
1575}
1576
1577void
1578MultiFab::OverrideSync (const iMultiFab& msk, const Periodicity& period)

Callers 1

AverageSyncMethod · 0.95

Calls 7

MultiplyFunction · 0.85
MFInfoClass · 0.85
CopyFunction · 0.85
cellCenteredMethod · 0.80
nCompFunction · 0.70
setValMethod · 0.45
ParallelCopyMethod · 0.45

Tested by

no test coverage detected