Public Member Functions | |
abstract Regridder | newRegridder (Grid p) |
abstract Regridder | cloneRegridder () |
boolean | isDynamic () |
Tests whether mesh refinement is dynamic. | |
boolean | isFlagged (int i) |
Tests whether the specified grid point are flagged. | |
void | setFlagged (int i, boolean v) |
Sets flag on a grid point. | |
abstract int | getInvFreqUnit () |
abstract boolean | isErrorEstimated () |
abstract void | setLastRegridTime (int t) |
abstract int | getLastRegridTime () |
abstract boolean | checkRegriddingIsDue (Grid g, int maxAllowedLevel, boolean 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. | |
abstract IntervalList | getIntervalList (Grid grid, Grid[] newSubSubgrids, int minl, int maxl, int numvel, int margin, int bufzoneradius, int tsc) |
Generates a list of new subgrids from the flagged points. | |
abstract void | beginTimeStep (Grid baseg) |
Called before each time step. | |
abstract void | endTimeStep (double t) |
Called after each time step. | |
Static Public Member Functions | |
static Regridder | create (String str) throws IllegalArgumentException |
Protected Member Functions | |
abstract boolean | hasUncoveredFlaggedPoint (Grid grid, Grid[] subGrids, int margin) |
Checks if there exists any flagged point which is not covered by a refined subgrid. | |
int | getFirstIndexForRefinement (Grid g, byte[] pf) |
Gets the first point to start refinement interval searching. | |
int | findIntervalEndForRefinement (Grid g, byte[] pf, int i) |
Finds the right edge of an interval that needs refinement. | |
int | intervalRefinedSize (Grid g, IntervalList iv, int r) |
int | gridIndexLeftOf (Grid g, int i, int dmax) |
int | gridIndexRightOf (Grid g, int i, int dmax) |
void | fixSubgridNearBounds (Grid g, IntervalList l, IntervalList r, int margin) |
Static Protected Member Functions | |
static void | blur (Grid g, byte[] pf, int i) |
Both neighbors of points with the specified value in an array are set to value plus 1. |
boolean gridripper::amr1d::Regridder::isDynamic | ( | ) | [inline] |
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.
boolean gridripper::amr1d::Regridder::isFlagged | ( | int | i | ) | [inline] |
Tests whether the specified grid point are flagged.
true
if flagged, false
otherwise Reimplemented in gridripper::amr1d::regridder::DefaultRegridder.
void gridripper::amr1d::Regridder::setFlagged | ( | int | i, | |
boolean | v | |||
) | [inline] |
Sets flag on a grid point.
i | point index | |
v | true to flag, false to unflag it |
Reimplemented in gridripper::amr1d::regridder::DefaultRegridder.
abstract boolean gridripper::amr1d::Regridder::hasUncoveredFlaggedPoint | ( | Grid | grid, | |
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, and gridripper::amr1d::regridder::InRegridder.
void gridripper::amr1d::Regridder::init | ( | int | maxi | ) | [inline] |
Initialization.
maxi | grid maximum index |
Reimplemented in gridripper::amr1d::regridder::DefaultRegridder.
void gridripper::amr1d::Regridder::checkErrors | ( | Integrator | integrator, | |
double | critical | |||
) | [inline] |
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.
abstract IntervalList gridripper::amr1d::Regridder::getIntervalList | ( | Grid | grid, | |
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, gridripper::amr1d::regridder::InRegridder, and gridripper::amr1d::regridder::OutRegridder.
static void gridripper::amr1d::Regridder::blur | ( | Grid | g, | |
byte[] | pf, | |||
int | i | |||
) | [inline, 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 | ( | Grid | g, | |
byte[] | pf | |||
) | [inline, 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 | ( | Grid | g, | |
byte[] | pf, | |||
int | i | |||
) | [inline, 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 |