Peano
Loading...
Searching...
No Matches
RunMultipleSteps.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5#include <functional>
6#include <string>
7#include <vector>
8
11
12
13namespace peano4 {
14 class RunMultipleSteps;
15}
16
17
33 public:
41 class Report {
42 public:
43 virtual ~Report() = default;
44
48 virtual void reportStep(const RunMultipleSteps& step) = 0;
49
54 virtual void reportFinalResults(const std::vector<std::reference_wrapper<RunMultipleSteps>>& steps) = 0;
55 };
56
57 RunMultipleSteps(const std::string& name, int firstSubstep);
58 virtual ~RunMultipleSteps() = default;
59
63 virtual void run() = 0;
64
66
70 int getFirstSubstep() const;
71
77 std::string getName() const;
78
79 protected:
80
81 const std::string _name;
82
83 const int _firstSubstep;
84
86
91};
Interface for anything that wants to report on a RunMultipleSteps instance (or a whole collection the...
virtual void reportStep(const RunMultipleSteps &step)=0
Report on one particular step sequence right after it has run.
virtual void reportFinalResults(const std::vector< std::reference_wrapper< RunMultipleSteps > > &steps)=0
Report on an arbitrary, unspecified number of step sequences, e.g.
Represents a series of steps which can be called by a runner.
virtual void run()=0
Run the mesh sweeps (Observers) realising this algorithmic phase.
virtual ~RunMultipleSteps()=default
tarch::timing::Measurement getRuntimeMeasurements() const
tarch::timing::Watch _watch
RunMultipleSteps(const std::string &name, int firstSubstep)
int getFirstSubstep() const
Get the first substep which identifies this step sequence.
std::string getName() const
Name of this step sequence, i.e.
tarch::timing::Measurement _runtimeMeasurement
Measure time spent in this particular sequence of steps.
A simple class that has to be included to measure the clock ticks required for an operation.
Definition Watch.h:45