13#ifndef CD_PARALLELOPS_H
14#define CD_PARALLELOPS_H
20#include <CD_NamespaceHeader.H>
41inline std::pair<int, int>
50min(
const Real& a_input)
noexcept;
58min(
const int& a_input)
noexcept;
66min(
const long long int& a_input)
noexcept;
76inline std::pair<Real, RealVect>
77min(
const Real& a_val,
const RealVect& a_pos)
noexcept;
85max(
const Real& a_input)
noexcept;
93max(
const int& a_input)
noexcept;
101max(
const long long& a_input)
noexcept;
111inline std::pair<Real, RealVect>
112max(
const Real& a_val,
const RealVect& a_pos)
noexcept;
119inline std::pair<Real, int>
120maxRank(
const Real& a_val)
noexcept;
127inline std::pair<Real, int>
128minRank(
const Real& a_val)
noexcept;
136average(
const Real& a_val)
noexcept;
144sum(
const Real& a_value)
noexcept;
152sum(
const int& a_value)
noexcept;
160sum(
const long& a_value)
noexcept;
168sum(
const long long& a_value)
noexcept;
175inline unsigned long long
176sum(
const unsigned long long& a_value)
noexcept;
193sum(Vector<Real>& a_data)
noexcept;
202sum(Vector<int>& a_data)
noexcept;
211sum(Vector<long int>& a_data)
noexcept;
220sum(Vector<long long int>& a_data)
noexcept;
228gather(
const int& a_localValue)
noexcept;
236gather(
const Real& a_localValue)
noexcept;
243inline Vector<long long>
244gather(
const long long& a_localValue)
noexcept;
247#include <CD_NamespaceFooter.H>
Implementation of CD_ParallelOps.H.
For putting a bunch of often-used MPI reductions in one place.
Definition CD_ParallelOps.H:25
Real max(const Real &a_input) noexcept
Get the maximum of the input, reduced over MPI ranks (in the Chombo communicator)
Definition CD_ParallelOpsImplem.H:177
std::pair< Real, int > maxRank(const Real &a_val) noexcept
Get the maximum value and the rank having the maximum value.
Definition CD_ParallelOpsImplem.H:294
Real average(const Real &a_val) noexcept
Compute the average (across MPI ranks) of the input value.
Definition CD_ParallelOpsImplem.H:501
Real standardDeviation(const Real &a_value) noexcept
Compute the standard deviation of the input value.
Definition CD_ParallelOpsImplem.H:513
Vector< int > gather(const int &a_localValue) noexcept
Gather local values – return a vector of local values.
Definition CD_ParallelOpsImplem.H:540
std::pair< Real, int > minRank(const Real &a_val) noexcept
Get the minimum value and the rank having the minimum value.
Definition CD_ParallelOpsImplem.H:324
Real min(const Real &a_input) noexcept
Get the minimum of the input, reduced over MPI ranks (in the Chombo communicator)
Definition CD_ParallelOpsImplem.H:59
Real sum(const Real &a_value) noexcept
Compute the sum across all MPI ranks.
Definition CD_ParallelOpsImplem.H:354
std::pair< int, int > partition(int a_N) noexcept
Partition the input number such that each MPI rank gets an equal chunk. We assume that N is the lengt...
Definition CD_ParallelOpsImplem.H:36
void barrier() noexcept
MPI barrier.
Definition CD_ParallelOpsImplem.H:26