From ba1ed935c5dbe0605188837ff8ae66472cb85069 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 1 Jun 2017 13:27:41 -0600 Subject: [PATCH] Better document Utilities::MPI::MinMaxAvg. --- include/deal.II/base/mpi.h | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index cbe04f2d2d..42ac0282dc 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -293,17 +293,40 @@ namespace Utilities /** - * Data structure to store the result of min_max_avg(). + * A data structure to store the result of the min_max_avg() function. + * The structure stores the minimum, maximum, and average of one + * value contributed by each processor that participates in an + * @ref GlossMPICommunicator "MPI communicator". The structure also stores + * the indices (or, more precisely, the @ref GlossMPIRank "MPI rank") + * of the processors that hold the minimum and maximum values, + * as well as the sum over all values. + * + * @note This structure has no constructors because MPI requires it + * to be a POD type. */ struct MinMaxAvg { - // Note: We assume a POD property of this struct in the MPI calls in - // min_max_avg + /** + * The sum over all values contributed by the processors that + * participate in the call to min_max_avg(), as well as the + * minimum and maximum value. + */ double sum; double min; double max; + + /** + * The indices (i.e., @ref GlossMPIRank "MPI rank" within an + * @ref GlossMPICommunicator "MPI communicator") of the + * processors that hold the minimal and maximal values. + */ unsigned int min_index; unsigned int max_index; + + /** + * The average of the values contributed by the processors that + * participate in the call to min_max_avg(). + */ double avg; }; -- 2.39.5