From: bangerth Date: Mon, 28 Apr 2014 01:53:52 +0000 (+0000) Subject: Make two member variables private. Improve documentation of the enums that are used... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb781cefa648b386912b49197f03c7ad9909a604;p=dealii-svn.git Make two member variables private. Improve documentation of the enums that are used for these variables. Further improve documentation in a couple of places. git-svn-id: https://svn.dealii.org/trunk@32851 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/timer.h b/deal.II/include/deal.II/base/timer.h index c64013c639..98c6fe41dd 100644 --- a/deal.II/include/deal.II/base/timer.h +++ b/deal.II/include/deal.II/base/timer.h @@ -410,9 +410,8 @@ public: }; /** - * Sets whether to generate output every - * time we exit a section, just in the - * end, both, or never. + * An enumeration data type that describes whether to generate output every + * time we exit a section, just in the end, both, or never. */ enum OutputFrequency { @@ -420,36 +419,40 @@ public: summary, every_call_and_summary, never - } - output_frequency; + }; /** - * Sets whether to show CPU times, wall - * times, or both CPU and wall times. + * An enumeration data type that describes whether to show CPU times, wall + * times, or both CPU and wall times whenever we generate output. */ enum OutputType { cpu_times, wall_times, cpu_and_wall_times - } - output_type; + }; /** - * Constructor. Output is written to the stream (of type std::ostream) - * given as first argument. The second and third arguments denote how - * often output is to be generated and what kind of timing the output - * should represent (CPU or wall time). + * Constructor. + * + * @param stream The stream (of type std::ostream) to which output is written. + * @param output_frequency A variable indicating when output is to be written + * to the given stream. + * @param output_type A variable indicating what kind of timing the output + * should represent (CPU or wall time). */ TimerOutput (std::ostream &stream, const enum OutputFrequency output_frequency, const enum OutputType output_type); /** - * Constructor. Output is written to the stream (of type ConditionalOstream) - * given as first argument. The second and third arguments denote how - * often output is to be generated and what kind of timing the output - * should represent (CPU or wall time). + * Constructor. + * + * @param stream The stream (of type ConditionalOstream) to which output is written. + * @param output_frequency A variable indicating when output is to be written + * to the given stream. + * @param output_type A variable indicating what kind of timing the output + * should represent (CPU or wall time). */ TimerOutput (ConditionalOStream &stream, const enum OutputFrequency output_frequency, @@ -464,8 +467,13 @@ public: * MPI network for calculating the CPU * time. * - * Meant for using std::cout as output - * stream. + * @param mpi_comm An MPI communicator across which we should accumulate or + * otherwise synchronize the timing information we produce on every MPI process. + * @param stream The stream (of type std::ostream) to which output is written. + * @param output_frequency A variable indicating when output is to be written + * to the given stream. + * @param output_type A variable indicating what kind of timing the output + * should represent (CPU or wall time). */ TimerOutput (MPI_Comm mpi_comm, std::ostream &stream, @@ -480,8 +488,13 @@ public: * MPI network for calculating the CPU * time. * - * Constructor that takes a - * ConditionalOStream to write output to. + * @param mpi_comm An MPI communicator across which we should accumulate or + * otherwise synchronize the timing information we produce on every MPI process. + * @param stream The stream (of type ConditionalOstream) to which output is written. + * @param output_frequency A variable indicating when output is to be written + * to the given stream. + * @param output_type A variable indicating what kind of timing the output + * should represent (CPU or wall time). */ TimerOutput (MPI_Comm mpi_comm, ConditionalOStream &stream, @@ -564,6 +577,18 @@ public: void reset (); private: + /** + * When to output information to the output stream. + */ + OutputFrequency output_frequency; + + /** + * Whether to show CPU times, wall + * times, or both CPU and wall times. + */ + OutputType output_type; + + /** * A timer object for the overall * run time. If we are using MPI,