|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.math.r3.Grid
Represents a regular grid in three dimensions. Grid resolution may vary in each dimension, however, no uneven mesh spacing is permitted. Consequently, operations on this grid are less general but faster.
| Constructor Summary | |
Grid(int n1,
int n2,
int n3)
Allocate a new Grid |
|
Grid(int n1,
int n2,
int n3,
ClosedBox boxDom)
Allocate a new instance of GridR3 and set the domain. |
|
| Method Summary | |
protected gov.sns.tools.math.r3.Grid.GridCell[][][] |
allocateCells(int n1,
int n2,
int n3)
Allocates the array of grid cell objects. |
protected gov.sns.tools.math.r3.Grid.GridPt[][][] |
allocatePts(int n1,
int n2,
int n3)
Allocates the array of grid point objects. |
gov.sns.tools.math.r3.Grid.GridCell |
compCellContaining(R3 pt)
Return the grid cell containing this point. |
Z3 |
compCellIndex(R3 pt)
Compute the base vertex index of grid cell containing this point. |
R3 |
compPtCoords(int i,
int j,
int k)
Return the coordinates in R3 of the grid point at index (i,j,k) |
R3 |
compPtCoords(Z3 vecIndex)
Return the coordinates in R3 of the grid point at index (i,j,k) |
protected gov.sns.tools.math.r3.Grid.GridCell |
getGridCell(int i,
int j,
int k)
Return the grid cell object located at grid point index. |
protected gov.sns.tools.math.r3.Grid.GridCell |
getGridCell(Z3 vecInd)
Return the grid cell object located at grid cell index. |
ClosedBox |
getGridDomain()
Get the domain of the grid in R3. |
R3 |
getGridOrigin()
Get the coordinates of the grid origin, i.e., the first grid vertex. |
protected gov.sns.tools.math.r3.Grid.GridPt |
getGridPt(int i,
int j,
int k)
Return the grid point object located at grid point index. |
protected gov.sns.tools.math.r3.Grid.GridPt |
getGridPt(Z3 vecInd)
Return the grid point object located at grid point index. |
R3 |
getGridResolution()
Get grid resolution. |
Z3 |
getGridSize()
Get the size of the supporting object array. |
double |
getPtValue(int i,
int j,
int k)
Get the function value at the grid point indexed by (i,j,k) |
R3 |
interpolateGradient(R3 pt)
Compute and return the interpolated function gradient at the point pt. |
double |
interpolateValue(R3 pt)
Compute and return the interpolated function value at the point pt |
static void |
main(java.lang.String[] args)
Testing engine |
boolean |
membershipGrid(R3 pt)
Determine whether a point is an element of the domain of definition for this grid. |
void |
print(java.io.PrintWriter os)
Print out grid parameters on an output stream |
void |
setGridDomain(ClosedBox boxDom)
Set the domain in R3 which the grid occupies. |
void |
setPtValue(int i,
int j,
int k,
double dblVal)
Set the function value at grid point given by index |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Grid(int n1,
int n2,
int n3)
throws GridException
n1 - number of grid points in first dimensionn2 - number of grid points in second dimensionn3 - number of grid points in third dimension
GridException - unable to allocate grid objects
public Grid(int n1,
int n2,
int n3,
ClosedBox boxDom)
throws GridException
n1 - number of grid points in first dimensionn2 - number of grid points in second dimensionn3 - number of grid points in third dimensionboxDom - descriptor of grid domain in R3
GridException - invalid size vector encountered| Method Detail |
public void setGridDomain(ClosedBox boxDom)
throws GridException
boxDom - description of the grid position and size in R3
GridException
public void setPtValue(int i,
int j,
int k,
double dblVal)
i - first dimension index of grid pointj - second dimension index of grid pointk - third dimension index of grid pointdblVal - value of the function at grid point (i,j,k)public Z3 getGridSize()
public ClosedBox getGridDomain()
public R3 getGridResolution()
public R3 getGridOrigin()
public double getPtValue(int i,
int j,
int k)
i - index of the first grid dimentionj - index of the second grid dimensionk - index of the third grid dimension
public boolean membershipGrid(R3 pt)
pt - point in R3 to check membership
public Z3 compCellIndex(R3 pt)
pt - pt in R3 (within the grid's domain of definition)
public R3 compPtCoords(int i,
int j,
int k)
i - x-dimension index of grid pointj - y-dimension index of grid pointk - k-dimension index of grid point
public R3 compPtCoords(Z3 vecIndex)
vecIndex - (i,j,k) index vector of grid point
public gov.sns.tools.math.r3.Grid.GridCell compCellContaining(R3 pt)
pt - pt in R3 (within the grid's domain of definition)
public double interpolateValue(R3 pt)
pt - interpolation point
public R3 interpolateGradient(R3 pt)
pt - interpolation point
public void print(java.io.PrintWriter os)
os - output stream to receive text description of gridpublic static void main(java.lang.String[] args)
protected gov.sns.tools.math.r3.Grid.GridPt getGridPt(int i,
int j,
int k)
i - 1st dimension grid point indexj - 2nd dimension grid point indexk - 3rd dimension grid point index
protected gov.sns.tools.math.r3.Grid.GridPt getGridPt(Z3 vecInd)
vecInd - vector index (i,j,k) of grid point
protected gov.sns.tools.math.r3.Grid.GridCell getGridCell(int i,
int j,
int k)
i - 1st dimension grid cell indexj - 2nd dimension grid cell indexk - 3rd dimension grid cell index
protected gov.sns.tools.math.r3.Grid.GridCell getGridCell(Z3 vecInd)
vecInd - vector index (i,j,k) of grid cell
protected gov.sns.tools.math.r3.Grid.GridPt[][][] allocatePts(int n1,
int n2,
int n3)
throws GridException
GridException
protected gov.sns.tools.math.r3.Grid.GridCell[][][] allocateCells(int n1,
int n2,
int n3)
throws GridException
GridException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||