3 #ifndef _EXAMPLES_REGULAR_GRID_UPSCALING_MYOBSERVER_H_
4 #define _EXAMPLES_REGULAR_GRID_UPSCALING_MYOBSERVER_H_
7 #include "peano4/grid/TraversalObserver.h"
8 #include "tarch/logging/Log.h"
12 namespace regulargridupscaling {
20 static tarch::logging::Log
_log;
39 MyObserver(
int spacetreeId,
double h,
int flopsPerCell);
43 const tarch::la::Vector<DIMENSIONS,double>&
x,
44 const tarch::la::Vector<DIMENSIONS,double>&
h
48 const tarch::la::Vector<DIMENSIONS,double>&
x,
49 const tarch::la::Vector<DIMENSIONS,double>&
h
53 const peano4::grid::GridTraversalEvent& event
58 const peano4::grid::GridTraversalEvent& event
66 TraversalObserver*
clone(
int spacetreeId)
override;
static tarch::logging::Log _log
void enterCell(const peano4::grid::GridTraversalEvent &event) override
static double FractionOfCellsYieldingIntegrationTask
double _accumulator
I use an accumulator just to ensure that the flop calculations are not removed.
std::vector< peano4::grid::GridControlEvent > getGridControlEvents() override
void leaveCell(const peano4::grid::GridTraversalEvent &event) override
static int IntegrationAccuracy
MyObserver(int spacetreeId, double h, int flopsPerCell)
void endTraversal(const tarch::la::Vector< DIMENSIONS, double > &x, const tarch::la::Vector< DIMENSIONS, double > &h) override
TraversalObserver * clone(int spacetreeId) override
I use the clone to create one observer object per traversal thread.
void beginTraversal(const tarch::la::Vector< DIMENSIONS, double > &x, const tarch::la::Vector< DIMENSIONS, double > &h) override
static constexpr int RanksObserverTemplate