#include <Regridder.h>
Public Member Functions | |
virtual Regridder * | newRegridder (const Grid &p)=0 |
virtual Regridder * | cloneRegridder ()=0 |
virtual bool | isDynamic () |
Tests whether mesh refinement is dynamic. | |
virtual bool | isFlagged (int i) |
Tests whether the specified grid point are flagged. | |
virtual void | setFlagged (int i, bool v) |
Sets flag on a grid point. | |
virtual int | getInvFreqUnit ()=0 |
virtual bool | isErrorEstimated ()=0 |
virtual void | setLastRegridTime (int t)=0 |
virtual int | getLastRegridTime ()=0 |
virtual bool | checkRegriddingIsDue (Grid &g, int maxAllowedLevel, bool onInitialHypersurface, int r, int ir, int errorCheckFreq, int regridFreq)=0 |
virtual void | init (int maxi) |
Initialization. | |
virtual 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)=0 |
Generates a list of new subgrids from the flagged points. | |
virtual void | beginTimeStep (const Grid &baseg)=0 |
Called before each time step. | |
virtual void | endTimeStep (GReal_t t)=0 |
Called after each time step. | |
Protected Member Functions | |
virtual bool | hasUncoveredFlaggedPoint (const Grid &grid, const tvalarray< Grid * > &subGrids, int margin)=0 |
Checks if there exists any flagged point which is not covered by a refined subgrid. | |
int | getFirstIndexForRefinement (const Grid &g, const tvalarray< unsigned char > &pf) const |
Gets the first point to start refinement interval searching. | |
int | findIntervalEndForRefinement (const Grid &g, const tvalarray< unsigned char > &pf, int i) const |
Finds the right edge of an interval that needs refinement. | |
int | intervalRefinedSize (const Grid &g, const IntervalList *iv, int r) const |
int | gridIndexLeftOf (const Grid &g, int i, int dmax) |
int | gridIndexRightOf (const Grid &g, int i, int dmax) |
Static Protected Member Functions | |
static void | blur (const Grid &g, tvalarray< unsigned char > &pf, int i) |
Both neighbors of points with the specified value in an array are set to value plus 1. | |
static void | fixSubgridNearBounds (const Grid &g, IntervalList *l, IntervalList *r, int margin) |
Friends | |
class | Grid |
virtual bool gridripper::amr1d::Regridder::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 in gridripper::amr1d::regridder::DefaultRegridder.
virtual bool gridripper::amr1d::Regridder::isFlagged | ( | int | i | ) | [inline, virtual] |
Tests whether the specified grid point are flagged.
true
if flagged, false
otherwise Reimplemented in gridripper::amr1d::regridder::DefaultRegridder.
virtual void gridripper::amr1d::Regridder::setFlagged | ( | int | i, | |
bool | v | |||
) | [virtual] |
Sets flag on a grid point.
i | point index | |
v | true to flag, false to unflag it |
Reimplemented in gridripper::amr1d::regridder::DefaultRegridder.
virtual void gridripper::amr1d::Regridder::init | ( | int | maxi | ) | [inline, virtual] |
Initialization.
maxi | grid maximum index |
Reimplemented in gridripper::amr1d::regridder::DefaultRegridder.
virtual void gridripper::amr1d::Regridder::checkErrors | ( | Integrator * | integrator, | |
double | critical | |||
) | [inline, virtual] |
Flag the points where the error is larger than critical.
integrator | the grid integrator | |
critical | the critical error value |
Reimplemented in gridripper::amr1d::regridder::DefaultRegridder.
virtual IntervalList* gridripper::amr1d::Regridder::getIntervalList | ( | const Grid & | grid, | |
tvalarray< Grid * > & | newSubSubgrids, | |||
int | minl, | |||
int | maxl, | |||
int | numvel, | |||
int | margin, | |||
int | bufzoneradius, | |||
int | tsc | |||
) | [pure 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 |
Implemented in gridripper::amr1d::regridder::DefaultRegridder.
virtual bool gridripper::amr1d::Regridder::hasUncoveredFlaggedPoint | ( | const Grid & | grid, | |
const tvalarray< Grid * > & | subGrids, | |||
int | margin | |||
) | [protected, pure virtual] |
Checks if there exists any flagged point which is not covered by a refined subgrid.
Implemented in gridripper::amr1d::regridder::DefaultRegridder.
static void gridripper::amr1d::Regridder::blur | ( | const Grid & | g, | |
tvalarray< unsigned char > & | pf, | |||
int | i | |||
) | [static, protected] |
Both neighbors of points with the specified value in an array are set to value plus 1.
g | the grid | |
pf | nonzero values in this array indicate the need of refinement | |
i | the value |
int gridripper::amr1d::Regridder::getFirstIndexForRefinement | ( | const Grid & | g, | |
const tvalarray< unsigned char > & | pf | |||
) | const [protected] |
Gets the first point to start refinement interval searching.
g | the grid | |
pf | nonzero values in this array indicate the need of refinement |
int gridripper::amr1d::Regridder::findIntervalEndForRefinement | ( | const Grid & | g, | |
const tvalarray< unsigned char > & | pf, | |||
int | i | |||
) | const [protected] |
Finds the right edge of an interval that needs refinement.
g | the grid | |
pf | nonzero values in this array indicate the need of refinement | |
i | the left edge index |