#include <DefaultRegridder.h>
Public Member Functions | |
virtual Regridder * | newRegridder (const Grid &p) |
virtual Regridder * | cloneRegridder () |
bool | isFlagged (int i) |
Is the specified grid point flagged? | |
bool | isDynamic () |
Tests whether mesh refinement is dynamic. | |
void | setFlagged (int i, bool v) |
Sets flag on a grid point. | |
int | getInvFreqUnit () |
bool | isErrorEstimated () |
void | setLastRegridTime (int t) |
int | getLastRegridTime () |
virtual bool | checkRegriddingIsDue (Grid &g, int maxAllowedLevel, bool onInitialHypersurface, int r, int ir, int errorCheckFreq, int regridFreq) |
void | init (int maxi) |
Initialization. | |
void | checkErrors (Integrator *integrator, double critical) |
Flag the points where the error is larger than critical. | |
virtual IntervalList * | getIntervalList (const Grid &grid, tvalarray< Grid * > &newSubSubgrids, int minl, int maxl, int numvel, int margin, int bufzoneradius, int tsc) |
Generates a list of new subgrids from the flagged points. | |
virtual void | beginTimeStep (const Grid &baseg) |
Called before each time step. | |
virtual void | endTimeStep (GReal_t t) |
Called after each time step. | |
Protected Member Functions | |
DefaultRegridder (const Grid &p) | |
DefaultRegridder (const DefaultRegridder &r) | |
bool | hasUncoveredFlaggedPoint (const Grid &grid, const tvalarray< Grid * > &subGrids, int margin) |
Checks if there exists any flagged point which is not covered by a refined subgrid. | |
Protected Attributes | |
tvalarray< bool > | pointFlags |
Points are flagged by setting the appropriate array element to true. |
bool gridripper::amr1d::regridder::DefaultRegridder::isFlagged | ( | int | i | ) | [inline, virtual] |
Is the specified grid point flagged?
Reimplemented from gridripper::amr1d::Regridder.
bool gridripper::amr1d::regridder::DefaultRegridder::isDynamic | ( | ) | [inline, virtual] |
Tests whether mesh refinement is dynamic.
Points can only be flagged in case of dynamic refinement.
true
if it is dynamic, false
otherwise setLastRegridTime(int)
Reimplemented from gridripper::amr1d::Regridder.
void gridripper::amr1d::regridder::DefaultRegridder::setFlagged | ( | int | i, | |
bool | v | |||
) | [inline, virtual] |
Sets flag on a grid point.
i | point index | |
v | true to flag, false to unflag it |
Reimplemented from gridripper::amr1d::Regridder.
void gridripper::amr1d::regridder::DefaultRegridder::init | ( | int | maxi | ) | [inline, virtual] |
Initialization.
maxi | grid maximum index |
Reimplemented from gridripper::amr1d::Regridder.
void gridripper::amr1d::regridder::DefaultRegridder::checkErrors | ( | Integrator * | integrator, | |
double | critical | |||
) | [virtual] |
Flag the points where the error is larger than critical.
integrator | the grid integrator | |
critical | the critical error value |
Reimplemented from gridripper::amr1d::Regridder.
virtual IntervalList* gridripper::amr1d::regridder::DefaultRegridder::getIntervalList | ( | const Grid & | grid, | |
tvalarray< Grid * > & | newSubSubgrids, | |||
int | minl, | |||
int | maxl, | |||
int | numvel, | |||
int | margin, | |||
int | bufzoneradius, | |||
int | tsc | |||
) | [virtual] |
Generates a list of new subgrids from the flagged points.
grid | the grid | |
newSubSubgrids | ||
minl | the minimum level to regrid, larger than or equal to zero and smaller than Integer.MAX_VALUE if the grids are regenerated, Integer.MAX_VALUE at the first generation | |
maxl | the maximum allowed refinement level | |
numvel | the error propagation velocity | |
margin | margin for new grids | |
bufzoneradius | size of the buffer zone | |
tsc | time step count |
Implements gridripper::amr1d::Regridder.
bool gridripper::amr1d::regridder::DefaultRegridder::hasUncoveredFlaggedPoint | ( | const Grid & | grid, | |
const tvalarray< Grid * > & | subGrids, | |||
int | margin | |||
) | [protected, virtual] |
Checks if there exists any flagged point which is not covered by a refined subgrid.
Implements gridripper::amr1d::Regridder.
tvalarray<bool> gridripper::amr1d::regridder::DefaultRegridder::pointFlags [protected] |
Points are flagged by setting the appropriate array element to true.