Peano
examples::regulargridupscaling::MyObserver Class Reference

#include <MyObserver.h>

Inheritance diagram for examples::regulargridupscaling::MyObserver:
Collaboration diagram for examples::regulargridupscaling::MyObserver:

Public Member Functions

 MyObserver (int spacetreeId, double h, int flopsPerCell)
 
virtual ~MyObserver ()
 
void beginTraversal (const tarch::la::Vector< DIMENSIONS, double > &x, const tarch::la::Vector< DIMENSIONS, double > &h) override
 
void endTraversal (const tarch::la::Vector< DIMENSIONS, double > &x, const tarch::la::Vector< DIMENSIONS, double > &h) override
 
void enterCell (const peano4::grid::GridTraversalEvent &event) override
 
void leaveCell (const peano4::grid::GridTraversalEvent &event) override
 
TraversalObserver * clone (int spacetreeId) override
 I use the clone to create one observer object per traversal thread. More...
 
std::vector< peano4::grid::GridControlEvent > getGridControlEvents () override
 

Static Public Attributes

static constexpr int RanksObserverTemplate = 1
 
static double FractionOfCellsYieldingIntegrationTask
 
static int IntegrationAccuracy
 

Private Attributes

const int _spacetreeId
 
const double _h
 
const int _flopsPerCell
 
double _accumulator
 I use an accumulator just to ensure that the flop calculations are not removed. More...
 
double _taskAccumulator
 

Static Private Attributes

static tarch::logging::Log _log
 

Detailed Description

Definition at line 18 of file MyObserver.h.

Constructor & Destructor Documentation

◆ MyObserver()

examples::regulargridupscaling::MyObserver::MyObserver ( int  spacetreeId,
double  h,
int  flopsPerCell 
)

Definition at line 13 of file MyObserver.cpp.

◆ ~MyObserver()

examples::regulargridupscaling::MyObserver::~MyObserver ( )
virtual

Definition at line 28 of file MyObserver.cpp.

Member Function Documentation

◆ beginTraversal()

void examples::regulargridupscaling::MyObserver::beginTraversal ( const tarch::la::Vector< DIMENSIONS, double > &  x,
const tarch::la::Vector< DIMENSIONS, double > &  h 
)
override

Definition at line 28 of file MyObserver.cpp.

References swe::h, and ModeCalc::x.

◆ clone()

peano4::grid::TraversalObserver * examples::regulargridupscaling::MyObserver::clone ( int  spacetreeId)
override

I use the clone to create one observer object per traversal thread.

So between different spacetrees of one spacetree set, there can be no race condition. Yet, the clone() itself could be called in parallel.

Definition at line 66 of file MyObserver.cpp.

◆ endTraversal()

void examples::regulargridupscaling::MyObserver::endTraversal ( const tarch::la::Vector< DIMENSIONS, double > &  x,
const tarch::la::Vector< DIMENSIONS, double > &  h 
)
override

Definition at line 38 of file MyObserver.cpp.

References swe::h, and ModeCalc::x.

◆ enterCell()

void examples::regulargridupscaling::MyObserver::enterCell ( const peano4::grid::GridTraversalEvent &  event)
override

Definition at line 48 of file MyObserver.cpp.

◆ getGridControlEvents()

std::vector< peano4::grid::GridControlEvent > examples::regulargridupscaling::MyObserver::getGridControlEvents ( )
override

Definition at line 84 of file MyObserver.cpp.

◆ leaveCell()

void examples::regulargridupscaling::MyObserver::leaveCell ( const peano4::grid::GridTraversalEvent &  event)
override

Definition at line 57 of file MyObserver.cpp.

Field Documentation

◆ _accumulator

double examples::regulargridupscaling::MyObserver::_accumulator
private

I use an accumulator just to ensure that the flop calculations are not removed.

Definition at line 29 of file MyObserver.h.

◆ _flopsPerCell

const int examples::regulargridupscaling::MyObserver::_flopsPerCell
private

Definition at line 24 of file MyObserver.h.

◆ _h

const double examples::regulargridupscaling::MyObserver::_h
private

Definition at line 23 of file MyObserver.h.

◆ _log

tarch::logging::Log examples::regulargridupscaling::MyObserver::_log
staticprivate

Definition at line 20 of file MyObserver.h.

◆ _spacetreeId

const int examples::regulargridupscaling::MyObserver::_spacetreeId
private

Definition at line 22 of file MyObserver.h.

◆ _taskAccumulator

double examples::regulargridupscaling::MyObserver::_taskAccumulator
private

Definition at line 31 of file MyObserver.h.

◆ FractionOfCellsYieldingIntegrationTask

double examples::regulargridupscaling::MyObserver::FractionOfCellsYieldingIntegrationTask
static

Definition at line 36 of file MyObserver.h.

Referenced by main().

◆ IntegrationAccuracy

int examples::regulargridupscaling::MyObserver::IntegrationAccuracy
static

Definition at line 37 of file MyObserver.h.

Referenced by main().

◆ RanksObserverTemplate

constexpr int examples::regulargridupscaling::MyObserver::RanksObserverTemplate = 1
staticconstexpr

Definition at line 34 of file MyObserver.h.

Referenced by runParallel().


The documentation for this class was generated from the following files: