gridripper::amr1d::Regridder Class Reference

Regridder base class. More...

#include <Regridder.h>

Inheritance diagram for gridripper::amr1d::Regridder:

gridripper::amr1d::regridder::DefaultRegridder

List of all members.

Public Member Functions

virtual RegriddernewRegridder (const Grid &p)=0
virtual RegriddercloneRegridder ()=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 IntervalListgetIntervalList (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


Detailed Description

Regridder base class.

Version:
0.5, 01/31/2007
Since:
GridRipper 0.3, 02/21/2005
Author:
Peter Csizmadia

Member Function Documentation

virtual bool gridripper::amr1d::Regridder::isDynamic (  )  [inline, virtual]

Tests whether mesh refinement is dynamic.

Points can only be flagged in case of dynamic refinement.

Returns:
true if it is dynamic, false otherwise
See also:
setFlagged(int, boolean)

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.

Returns:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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
Returns:
the list of intervals to refine

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.

Returns:
true if there are such flagged points, false otherwise

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.

Parameters:
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.

Parameters:
g the grid
pf nonzero values in this array indicate the need of refinement
Returns:
the index

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.

Parameters:
g the grid
pf nonzero values in this array indicate the need of refinement
i the left edge index
Returns:
the right edge index


The documentation for this class was generated from the following file:

Generated on Wed Jun 17 18:46:52 2009 for GridRipper by  doxygen 1.5.6