Classes
observers::protocols::ReductionDataFormatter Struct Reference

Conforming classes can create an informative message from reduction data. The message will be printed to screen when the formatter is passed to a reduction action such as observers::Actions::ContributeReductionData. More...

#include <ReductionDataFormatter.hpp>

Classes

struct  test
 

Detailed Description

Conforming classes can create an informative message from reduction data. The message will be printed to screen when the formatter is passed to a reduction action such as observers::Actions::ContributeReductionData.

Conforming classes must provide the following type aliases:

Conforming classes must implement the following member functions:

Here's an example for a formatter:

struct FormatErrors
: tt::ConformsTo<observers::protocols::ReductionDataFormatter> {
using reduction_data = helpers::reduction_data_from_doubles;
std::string operator()(const double time, const size_t num_points,
const double error1, const double error2) const
noexcept {
return "Errors at time " + std::to_string(time) + " over " +
std::to_string(num_points) +
" grid points:\n Field1: " + std::to_string(error1) +
"\n Field2: " + std::to_string(error2);
}
// NOLINTNEXTLINE
void pup(PUP::er& /*p*/) noexcept {}
};

The documentation for this struct was generated from the following file:
std::string
PhaseControl::reduction_data
Parallel::ReductionData< Parallel::ReductionDatum< tuples::tagged_tuple_from_typelist< TagsAndCombinesPresent >, TaggedTupleCombine > > reduction_data
A Parallel::ReductionData with a single Parallel::ReductionDatum for a given tagged tuple type determ...
Definition: PhaseControlTags.hpp:92
tt::ConformsTo
Indicate a class conforms to the Protocol.
Definition: ProtocolHelpers.hpp:22