46 _Tolerance( tolerance ) {
71 case ::exahype2::RefinementCommand::Refine:
85 _newEvents.push_back( std::pair<peano4::grid::GridControlEvent,int>(newEvent, lifetime) );
86 logDebug(
"addCommend()",
"added refinement for x=" << x <<
", h=" << h <<
": " << newEvent.
toString() <<
" (total of " << _newEvents.size() <<
" instructions)" );
89 case ::exahype2::RefinementCommand::Keep:
91 case ::exahype2::RefinementCommand::Erase:
106 _newEvents.push_back( std::pair<peano4::grid::GridControlEvent,int>(newEvent, lifetime) );
107 logDebug(
"addCommend()",
"added erase for x=" << x <<
", h=" << h <<
": " << newEvent.
toString() <<
" (total of " << _newEvents.size() <<
" instructions)" );
116 std::ostringstream msg;
118 <<
"#events=" << _newEvents.size()
#define assertionNumericalEquals1(lhs, rhs, a)
#define logDebug(methodName, logMacroMessageStream)
#define logTraceOutWith1Argument(methodName, argument0)
#define logTraceInWith3Arguments(methodName, argument0, argument1, argument2)
std::string toString(exahype2::RefinementCommand value)
exahype2::RefinementCommand operator&&(exahype2::RefinementCommand lhs, exahype2::RefinementCommand rhs)
If one of the flags says refine, then refine.
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.
static tarch::multicore::BooleanSemaphore _semaphore
std::string toString() const
virtual ~RefinementControl()
Create a lock around a boolean semaphore region.
std::string toString(Filter filter)
RefinementCommand getDefaultRefinementCommand()
The default is coarsen as this is the lowest priority command.
tarch::la::Vector< Dimensions, double > getWidth() const
std::string toString() const
tarch::la::Vector< Dimensions, double > getH() const