public class NDGrid
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DblMatrix |
LowerBounds |
protected DblMatrix |
UpperBounds |
Constructor and Description |
---|
NDGrid()
Constructs a 1D grid of 11 points on [0,1].
|
NDGrid(DblMatrix Xgrid)
Construct a 1D grid using the given points as coordinate vector.
|
NDGrid(DblMatrix X,
DblMatrix Y)
Construct a 2D grid using the given points as coordinate vector.
|
NDGrid(DblMatrix X,
DblMatrix Y,
DblMatrix Z)
Construct a 3D grid using the given points as coordinate vector.
|
NDGrid(DblMatrix L,
DblMatrix U,
int N)
Creates Cartesean grid with N points in each dimension.
|
NDGrid(DblMatrix L,
DblMatrix U,
int[] N)
Creates Cartesean grid with N[d] points in dimension d.
|
Modifier and Type | Method and Description |
---|---|
DblMatrix[] |
getCoords(int I)
Get the coordinates according to this grid at index I.
|
DblMatrix[] |
getCoords(Subscript[] coords)
Get the coordinates according to this grid at index I.
|
int |
getDimension() |
DblMatrix |
getMinStep()
Return the minimum step over all dimensions.
|
int |
getNpts()
Get the total number of grid points.
|
DblMatrix |
getSpatialStepAt(int index,
int dimension,
double perturb1,
double perturb2)
Gets the spatial step in dimension dim over index I as calculated as the difference in spatial
locations X(d,I+p1)-X(d,I+p2).
|
DblMatrix |
getSpatialStepAt(int index,
int dimension,
int perturb1,
int perturb2)
Gets the spatial step in dimension dim over index I as calculated as the sum across
the two spatial steps h(d,I+p1)+h(d,I+p2).
|
DblMatrix[] |
getUCoords(int I,
int ghostpts)
Gets spatial grid points corresponding to the values in U but adjusting for presence of ghost points.
|
DblMatrix[] |
getUCoords(Subscript[] coords_in,
int ghostpts)
Gets spatial grid points corresponding to the values in U but adjusting for presence of ghost points.
|
int[] |
getUSize(int ghostpts) |
DblMatrix |
getUSpatialStepAt(int index,
int dimension,
double perturb1,
double perturb2,
int ghostpts) |
DblMatrix |
getUSpatialStepAt(int index,
int dimension,
int perturb1,
int perturb2,
int ghostpts) |
boolean |
isGhostPoint(int I,
int ghostpts)
Returns true if the given index would reference a ghost point in the U matrix.
|
boolean |
isGhostPoint(Subscript[] coords,
int ghostpts)
Returns true if the given coordinates would reference a ghost point in the U matrix.
|
boolean |
isLowerBoundary(Subscript[] coords,
int dim,
int ghostpts)
Returns true is the given coordinates of U are at or below the spatial coordinates of the grid
in the indicated dimension.
|
boolean |
isSingleton(int d)
Returns true if the dth dimension of the grid is a singleton.
|
boolean |
isUpperBoundary(Subscript[] coords,
int dim,
int ghostpts)
Returns true is the given coordinates of U are above the spatial coordinates of the grid
in the indicated dimension.
|
int[] |
size()
Returns the number of grid points in each direction.
|
int |
size(int d)
Returns the number of grid points in the given direction.
|
protected DblMatrix LowerBounds
protected DblMatrix UpperBounds
public NDGrid()
public NDGrid(DblMatrix L, DblMatrix U, int N)
public NDGrid(DblMatrix L, DblMatrix U, int[] N)
public NDGrid(DblMatrix Xgrid)
public NDGrid(DblMatrix X, DblMatrix Y)
public int[] getUSize(int ghostpts)
public boolean isSingleton(int d)
public boolean isUpperBoundary(Subscript[] coords, int dim, int ghostpts)
public boolean isLowerBoundary(Subscript[] coords, int dim, int ghostpts)
public boolean isGhostPoint(Subscript[] coords, int ghostpts)
public boolean isGhostPoint(int I, int ghostpts)
public int[] size()
public int size(int d)
public DblMatrix getMinStep()
public int getDimension()
public int getNpts()
public DblMatrix[] getUCoords(int I, int ghostpts)
public DblMatrix[] getUCoords(Subscript[] coords_in, int ghostpts)
public DblMatrix[] getCoords(int I)
public DblMatrix[] getCoords(Subscript[] coords)
public DblMatrix getUSpatialStepAt(int index, int dimension, int perturb1, int perturb2, int ghostpts)
public DblMatrix getSpatialStepAt(int index, int dimension, int perturb1, int perturb2)
public DblMatrix getUSpatialStepAt(int index, int dimension, double perturb1, double perturb2, int ghostpts)
public DblMatrix getSpatialStepAt(int index, int dimension, double perturb1, double perturb2)
Copyright © 2011, 2013. Daniel P. Dougherty