#include <BoundedGrid.h>

Public Member Functions | |
| BoundedGrid (GReal_t minx, GReal_t maxx, int maxi, int npabovemax, int nc, Integrator *proto, Regridder *refproto, int r) | |
| Creates a base grid. | |
| Grid * | cloneGrid () const |
| Clones this grid. | |
| int | getLeftmostI () const |
| int | getRightmostI () const |
| bool | isPeriodic () const |
| int | getMarginLeft (int ir) const |
| Gets the left margin size. | |
| int | getMarginRight (int ir) const |
| Gets the right margin size. | |
| int | distanceFromLeft (int i) const |
| Gets the distance from the left edge. | |
| int | distanceFromRight (int i) const |
| Gets the distance from the right edge. | |
| virtual int | getNumPointsAboveMaxX () const |
| Gets number of grid points above infinity (Xmax). | |
| GReal_t | getLocationX (int i) const |
| Gets the location of the point with index i. | |
| GReal_t | getSizeX () const |
| Gets the grid width. | |
| void | initRefinedDataExistenceArray () |
| Initializes the refinedDataExists array. | |
| bool | hasRefinedData (int i) const |
| Checks whether refined data at the specified index exists or not. | |
| void | getRefinedData (int i, GReal_t yout[]) const |
| Gets the refined data at the specified grid point if exists. | |
| Grid * | createTemporaryGrid (int dmargin_L, int dmargin_R, GReal_t xshift) |
| void | setTemporaryGridMargins (const Grid &p, int dmargin_L, int dmargin_R) |
| Sets the margins and the shift for a temporary grid. | |
| Grid * | createRefinedGrid (IntervalList *iv, int margin, int vmargin, int minLevel, int r1) |
| Creates a refined grid. | |
| void | interpolateMargins (PDE *pde) |
| int | getAbsoluteIndex (int i, int mul) const |
Protected Member Functions | |
| BoundedGrid (const BoundedGrid &g) | |
| Copy constructor. | |
| BoundedGrid (const BoundedGrid &p, int dmargin_L, int dmargin_R, GReal_t xshift) | |
| Creates a temporary grid. | |
| BoundedGrid (Grid *p, int r1, int loci, int maxi, int margin, int vmargin, int minLevel) | |
| Creates a refined grid. | |
| int | getInternalIndex (int i) const |
| Gets the internal array index. | |
| int | getSubgridIndexFromIndex (const Grid *g, int i) const |
| int | getIndexFromSubgridIndex (const Grid *g, int j) const |
| void | fillRefinedDataArray () |
| Fills the refinedData array. | |
| void | blur (tvalarray< unsigned char > &pf, int i) const |
| Both neighbors of points with the specified value in an array are set to value plus 1. | |
| int | getFirstIndexForRefinement (const tvalarray< unsigned char > &pf) const |
| Gets the first point to start refinement interval searching. | |
| int | findIntervalEndForRefinement (const tvalarray< unsigned char > &pf, int i) const |
| Finds the right edge of an interval that needs refinement. | |
| int | intervalRefinedSize (const IntervalList *iv, int r) const |
| int | gridIndexLeftOf (int i, int dmax) const |
| int | gridIndexRightOf (int i, int dmax) const |
| void | fixSubgridNearBounds (IntervalList *left, IntervalList *right, int margin) const |
| Check if refined grid + margin would extend beyond parent grid boundaries. | |
| int | calcNewSubSubgridLocation (int ssloc, int osloc, int nsloc) |
| Calculates the new location of a sub-subgrid (relative to the parent) if its parent (a subgrid) changed. | |
| gridripper::amr1d::BoundedGrid::BoundedGrid | ( | const BoundedGrid & | g | ) | [protected] |
Copy constructor.
| g | the grid to copy |
| gridripper::amr1d::BoundedGrid::BoundedGrid | ( | Grid * | p, | |
| int | r1, | |||
| int | loci, | |||
| int | maxi, | |||
| int | margin, | |||
| int | vmargin, | |||
| int | minLevel | |||
| ) | [protected] |
Creates a refined grid.
| p | the parent grid | |
| r1 | refinement ratio for the refined grid's future subgrids | |
| loci | location of origin in parent grid | |
| maxi | maximum grid index | |
| margin | the margin size | |
| vmargin | numerical error propagation velocity | |
| minLevel | set grandparent's sub-subgrid list if its level is larger than or equal to minLevel |
| Grid* gridripper::amr1d::BoundedGrid::cloneGrid | ( | ) | const [inline, virtual] |
| int gridripper::amr1d::BoundedGrid::getMarginLeft | ( | int | ir | ) | const [inline, virtual] |
Gets the left margin size.
| ir | step count |
Implements gridripper::amr1d::Grid.
| int gridripper::amr1d::BoundedGrid::getMarginRight | ( | int | ir | ) | const [inline, virtual] |
Gets the right margin size.
| ir | step count |
Implements gridripper::amr1d::Grid.
| int gridripper::amr1d::BoundedGrid::distanceFromLeft | ( | int | i | ) | const [inline, virtual] |
Gets the distance from the left edge.
| i | grid point index |
Implements gridripper::amr1d::Grid.
| int gridripper::amr1d::BoundedGrid::distanceFromRight | ( | int | i | ) | const [inline, virtual] |
Gets the distance from the right edge.
| i | grid point index |
Implements gridripper::amr1d::Grid.
| virtual int gridripper::amr1d::BoundedGrid::getNumPointsAboveMaxX | ( | ) | const [inline, virtual] |
Gets number of grid points above infinity (Xmax).
Reimplemented from gridripper::amr1d::Grid.
| GReal_t gridripper::amr1d::BoundedGrid::getLocationX | ( | int | i | ) | const [virtual] |
Gets the location of the point with index i.
| i | the point index |
Implements gridripper::amr1d::Grid.
| GReal_t gridripper::amr1d::BoundedGrid::getSizeX | ( | ) | const [inline, virtual] |
| bool gridripper::amr1d::BoundedGrid::hasRefinedData | ( | int | i | ) | const [inline, virtual] |
Checks whether refined data at the specified index exists or not.
| i | refined grid index |
Implements gridripper::amr1d::Grid.
| void gridripper::amr1d::BoundedGrid::getRefinedData | ( | int | i, | |
| GReal_t | yout[] | |||
| ) | const [inline, virtual] |
Gets the refined data at the specified grid point if exists.
| i | refined grid index | |
| yout | the output array |
Implements gridripper::amr1d::Grid.
| void gridripper::amr1d::BoundedGrid::setTemporaryGridMargins | ( | const Grid & | p, | |
| int | dmargin_L, | |||
| int | dmargin_R | |||
| ) | [virtual] |
Sets the margins and the shift for a temporary grid.
| p | the parent grid | |
| dmargin_L | the left margin | |
| dmargin_R | the right margin |
Implements gridripper::amr1d::Grid.
| Grid* gridripper::amr1d::BoundedGrid::createRefinedGrid | ( | IntervalList * | iv, | |
| int | margin, | |||
| int | vmargin, | |||
| int | minLevel, | |||
| int | r1 | |||
| ) | [virtual] |
Creates a refined grid.
| p | the parent grid | |
| iv | the left and right edge in the parent grid | |
| margin | margin size | |
| vmargin | numerical error propagation velocity | |
| minLevel | set grandparent's sub-subgrid list if its level is larger than or equal to minLevel | |
| r1 | the refinement ratio value if the created grid can be refined further, 1 otherwise |
Implements gridripper::amr1d::Grid.
| int gridripper::amr1d::BoundedGrid::getInternalIndex | ( | int | i | ) | const [inline, protected, virtual] |
Gets the internal array index.
The internal array index is the sum of the "real" index and the left margin size if present.
| i | the index |
Implements gridripper::amr1d::Grid.
| void gridripper::amr1d::BoundedGrid::fillRefinedDataArray | ( | ) | [protected, virtual] |
Fills the refinedData array.
Should only be called after interpolateMargins!
Implements gridripper::amr1d::Grid.
| void gridripper::amr1d::BoundedGrid::blur | ( | tvalarray< unsigned char > & | pf, | |
| int | i | |||
| ) | const [protected, virtual] |
Both neighbors of points with the specified value in an array are set to value plus 1.
| pf | nonzero values in this array indicate the need of refinement | |
| i | the value |
Implements gridripper::amr1d::Grid.
| int gridripper::amr1d::BoundedGrid::getFirstIndexForRefinement | ( | const tvalarray< unsigned char > & | pf | ) | const [inline, protected, virtual] |
Gets the first point to start refinement interval searching.
| pf | nonzero values in this array indicate the need of refinement |
Implements gridripper::amr1d::Grid.
| int gridripper::amr1d::BoundedGrid::findIntervalEndForRefinement | ( | const tvalarray< unsigned char > & | pf, | |
| int | i | |||
| ) | const [protected, virtual] |
Finds the right edge of an interval that needs refinement.
| pf | nonzero values in this array indicate the need of refinement | |
| i | the left edge index |
Implements gridripper::amr1d::Grid.
| int gridripper::amr1d::BoundedGrid::calcNewSubSubgridLocation | ( | int | ssloc, | |
| int | osloc, | |||
| int | nsloc | |||
| ) | [inline, protected, virtual] |
Calculates the new location of a sub-subgrid (relative to the parent) if its parent (a subgrid) changed.
| ssloc | old sub-subgrid's (relative) location | |
| osloc | its old parent's location (relative to this grid) | |
| nsloc | new parent's location (relative to this grid) |
Implements gridripper::amr1d::Grid.
1.5.6