36#ifndef NEKTAR_LIBUTILITIES_COMMUNICATION_GATHERSCATTER_H
37#define NEKTAR_LIBUTILITIES_COMMUNICATION_GATHERSCATTER_H
#define LIB_UTILITIES_EXPORT
LibUtilities::SessionReaderSharedPtr session
A gather-scatter over universal ids, mirroring Gs::Init(), Gs::Gather() and Gs::Unique() behind an im...
GatherScatter & operator=(const GatherScatter &)=delete
virtual void Unique(Array< OneD, long > &ids)=0
The Gs::Unique() equivalent: negate all but one occurrence of each id across all ranks,...
GatherScatter(const GatherScatter &)=delete
static std::shared_ptr< GatherScatter > CreateNoOp()
A handle whose Gather() and Unique() do nothing.
static std::shared_ptr< GatherScatter > Create(const Array< OneD, long > &ids, const CommSharedPtr &comm, const GatherScatterConfig &config, bool verbose=false)
Set up a gather-scatter over ids: the Gs::Init() equivalent.
virtual ~GatherScatter()=default
virtual void Gather(Array< OneD, NekDouble > u, GatherScatterOp op)=0
The Gs::Gather() equivalent: fold the entries of u, in place, across every slot on every rank with th...
GatherScatterMethod
Which implementation a #GatherScatter uses, selected with the --gather-scatter command-line option.
@ eNeighbour
SharedIdPlan over ExchangeBackend::eNeighbourCollective.
@ eGslib
gslib's gs_setup / gs_gather / gs_unique (the default)
@ ePairwise
SharedIdPlan over ExchangeBackend::ePairwise.
@ eCrystal
SharedIdPlan replaying through a CrystalRouterTransport.
GatherScatterDiscovery
Transport a SharedIdPlan's one-off discovery runs over, selected with --gather-scatter-discovery....
@ eCrystalRouter
CrystalRouterTransport: no O(P) arrays (the default)
@ eAlltoallv
AlltoallvTransport.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< GatherScatter > GatherScatterSharedPtr
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
GatherScatterOp
Fold a #GatherScatter applies across every slot sharing an id.
@ eAbsMax
the contribution of largest magnitude, sign kept
@ eMax
largest contribution
@ eMin
smallest contribution
@ eMul
product of the contributions
@ eAdd
sum of the contributions
A gather-scatter method and discovery transport, as chosen on the command line.
GatherScatterDiscovery discovery
static GatherScatterConfig FromSession(const SessionReaderSharedPtr &session)
Read --gather-scatter and --gather-scatter-discovery from session. Anything not given keeps its defau...
GatherScatterMethod method
std::string Describe() const