Peano
Loading...
Searching...
No Matches
RefinementControl.h
Go to the documentation of this file.
1// This file is part of the ExaHyPE2 project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include <vector>
7#include <list>
8
11
12namespace exahype2 {
13 enum class RefinementCommand {
15 };
16
21
24}
25
26
32
34
98 public:
99 typedef std::list< std::pair<peano4::grid::GridControlEvent,int> > NewEvents;
100
120
121 typedef std::list< SiblingEraseEvent > NewSiblingEraseEvents;
122
124
130 RefinementControl(double tolerance = 0.01);
132
142 void clear();
143
144
169 int lifetime
170 );
171
191 int lifetime,
192 const tarch::la::Vector<Dimensions,int>& relativePositionWithinFatherCell
193 );
194
195 std::string toString() const;
196
197 private:
199
201
205 const double _Tolerance;
206
212
217
225 ) const;
226
227};
228
std::string toString(exahype2::RefinementCommand value)
exahype2::RefinementCommand operator&&(exahype2::RefinementCommand lhs, exahype2::RefinementCommand rhs)
If one of the flags says refine, then refine.
Manage refine/erase requests within ExaHyPE 2.
NewEvents _newEvents
Container to accumulate new events.
void clear()
Clears the new events, including the sibling erase events.
static tarch::logging::Log _log
RefinementControl(double tolerance=0.01)
void addCommand(const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h, exahype2::RefinementCommand command, int lifetime)
Add a new command.
const double _Tolerance
We blow up the region around refinement criterion slightly.
std::list< SiblingEraseEvent > NewSiblingEraseEvents
static tarch::multicore::BooleanSemaphore _semaphore
NewSiblingEraseEvents _newSiblingEraseEvents
Erase requests of cells which know their parent,.
std::list< std::pair< peano4::grid::GridControlEvent, int > > NewEvents
void addCommand(const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h, exahype2::RefinementCommand command, int lifetime, const tarch::la::Vector< Dimensions, int > &relativePositionWithinFatherCell)
Add a new command of a cell which knows its position within its parent.
std::string toString() const
peano4::grid::GridControlEvent createEraseEvent(const tarch::la::Vector< Dimensions, double > &x, const tarch::la::Vector< Dimensions, double > &h) const
Construct the grid control event which erases the cell with centre x and size h.
Log Device.
Definition Log.h:517
This file is part of the ExaHyPE 2 project within Peano 4.
Definition __init__.py:1
RefinementCommand getDefaultRefinementCommand()
The default is coarsen as this is the lowest priority command.
Erase request of one cell which knows its parent.
int positionWithinParent
Position of the requesting cell within its parent, linearised.
tarch::la::Vector< Dimensions, double > parentCentre
tarch::la::Vector< Dimensions, double > parentH
Simple vector class.
Definition Vector.h:159