edu.jhu.cs.cisst.algorithms.optimize.fmg.grid
Class PeriodicBoundaryGrid
java.lang.Object
edu.jhu.cs.cisst.algorithms.optimize.fmg.grid.Grid
edu.jhu.cs.cisst.algorithms.optimize.fmg.grid.BoundaryGrid
edu.jhu.cs.cisst.algorithms.optimize.fmg.grid.PeriodicBoundaryGrid
- All Implemented Interfaces:
- ConstBoundaryGrid, ConstGrid, java.lang.Cloneable
public final class PeriodicBoundaryGrid
- extends BoundaryGrid
An implementation of BoundaryGrid where the boundary elements are periodic images of interior grid elements.
The exact definition of periodic boundary conditions in this context is that any index equal to 0 will
be translated to (size() - 2) and any index equal to (size() - 1) will be translated to 1.
This translation is done independently for each index and the resulting interior element is returned as
the requested boundary element.
- Author:
- Gerald Loeffler (Gerald.Loeffler@univie.ac.at)
Fields inherited from class edu.jhu.cs.cisst.algorithms.optimize.fmg.grid.Grid |
g, level, sx, sy, sz |
Constructor Summary |
PeriodicBoundaryGrid(int sx,
int sy,
int sz,
int level,
double interiorValue)
construct from size and initial value for all elements in the interior. |
Method Summary |
protected double |
getBoundary(int x,
int y,
int z)
implements method from Grid. |
Grid |
newInstance(int sx,
int sy,
int sz,
int level,
double value)
implements method from ConstGrid. |
Methods inherited from class edu.jhu.cs.cisst.algorithms.optimize.fmg.grid.Grid |
add, add, clone, get, getCols, getLevel, getRows, getSlices, isBoundary, isInterior, set, setLevel |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.jhu.cs.cisst.algorithms.optimize.fmg.grid.ConstGrid |
add, clone, get, getCols, getLevel, getRows, getSlices, isBoundary, isInterior, set, setLevel |
PeriodicBoundaryGrid
public PeriodicBoundaryGrid(int sx,
int sy,
int sz,
int level,
double interiorValue)
- construct from size and initial value for all elements in the interior.
- Parameters:
sx
- the dimension in Xsy
- the dimension in Ysz
- the dimension in Zlevel
- the resolution levelinteriorValue
- the value to which all interior grid elements will be set
newInstance
public Grid newInstance(int sx,
int sy,
int sz,
int level,
double value)
- implements method from ConstGrid.
- Parameters:
sx
- the sxsy
- the sysz
- the szlevel
- the levelvalue
- the value to which all interior grid elements are to be set
- Returns:
- the newly constructed grid
- See Also:
ConstGrid.newInstance(int, int, int, int, double)
getBoundary
protected double getBoundary(int x,
int y,
int z)
- implements method from Grid.
- Specified by:
getBoundary
in class Grid
- Parameters:
x
- the x index of the boundary elementy
- the y index of the boundary elementz
- the z index of the boundary element
- Returns:
- the element (a double value) at the specified position
- See Also:
Grid.getBoundary(int, int, int)