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
22 class RefinementControl;
23 class RefinementControlService;
24}
25
26
32
33std::string toString( exahype2::RefinementCommand value );
34
98 public:
99 typedef std::list< std::pair<peano4::grid::GridControlEvent,int> > NewEvents;
100
102
108 RefinementControl(double tolerance = 0.01);
109 virtual ~RefinementControl();
110
120 void clear();
121
122
143 void addCommand(
147 int lifetime
148 );
149
150 std::string toString() const;
151
152 private:
154
156
160 const double _Tolerance;
161
167
168};
169
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.
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.
static tarch::multicore::BooleanSemaphore _semaphore
std::list< std::pair< peano4::grid::GridControlEvent, int > > NewEvents
Log Device.
Definition Log.h:516
For the generic kernels that I use here most of the time.
Definition CellAccess.h:13
RefinementCommand getDefaultRefinementCommand()
The default is coarsen as this is the lowest priority command.
Simple vector class.
Definition Vector.h:134