public class GridGenerator extends Object
Constructor and Description |
---|
GridGenerator() |
GridGenerator(double[] minMax,
double initialValue,
boolean cubicGridFlag) |
GridGenerator(double min,
double max) |
GridGenerator(double min,
double max,
double initialValue) |
Modifier and Type | Method and Description |
---|---|
void |
generateGrid()
Main method creates a grid between given boundaries (dimensions).
|
javax.vecmath.Point3d |
getCoordinatesFromGridPoint(int gridPoint)
Method calculates coordiantes from a given grid array position.
|
javax.vecmath.Point3d |
getCoordinatesFromGridPoint(javax.vecmath.Point3d gridPoint)
Method calculates coordiantes from a given grid point.
|
int[] |
getDim() |
double |
getExtendGrid() |
double[][][] |
getGrid() |
double[] |
getGridArray() |
javax.vecmath.Point3d |
getGridPointFrom3dCoordinates(javax.vecmath.Point3d coord)
Method calculates the nearest grid point from given coordinates.
|
double |
getLatticeConstant() |
double |
getMaxx() |
double |
getMaxy() |
double |
getMaxz() |
double |
getMinx() |
double |
getMiny() |
double |
getMinz() |
double[] |
gridToGridArray(double[][][] grid)
Method transforms the grid to an array.
|
void |
initializeGrid(double value)
Method initialise the given grid points with a value.
|
double[][][] |
initializeGrid(double[][][] grid,
double value)
Method initialise the given grid points with a value.
|
void |
setDim(int[] dim) |
void |
setDimension(double[] minMax,
boolean cubicGridFlag)
Method sets the maximal 3d dimensions to given min and max values.
|
void |
setDimension(double min,
double max)
Method sets the maximal 3d dimensions to given min and max values.
|
void |
setDimension(double minx,
double maxx,
double miny,
double maxy,
double minz,
double maxz)
Method sets the maximal 3d dimensions to given min and max values.
|
void |
setExtendGrid(double extendGrid) |
void |
setGrid(double[][][] grid) |
void |
setLatticeConstant(double latticeConstant) |
String |
toString() |
void |
writeGridInPmeshFormat(String outPutFileName)
Method transforms the grid into pmesh format.
|
void |
writeGridInPmeshFormat(String outPutFileName,
double cutOff)
Method transforms the grid into pmesh format.
|
public GridGenerator()
public GridGenerator(double min, double max)
public GridGenerator(double min, double max, double initialValue)
initialValue
- used as initial value for the grid pointspublic GridGenerator(double[] minMax, double initialValue, boolean cubicGridFlag)
public void setDimension(double min, double max)
public void setDimension(double[] minMax, boolean cubicGridFlag)
public void setDimension(double minx, double maxx, double miny, double maxy, double minz, double maxz)
public void generateGrid()
public void initializeGrid(double value)
public double[][][] initializeGrid(double[][][] grid, double value)
public double[] gridToGridArray(double[][][] grid)
public javax.vecmath.Point3d getCoordinatesFromGridPoint(javax.vecmath.Point3d gridPoint)
public javax.vecmath.Point3d getCoordinatesFromGridPoint(int gridPoint)
public javax.vecmath.Point3d getGridPointFrom3dCoordinates(javax.vecmath.Point3d coord) throws Exception
Exception
public void writeGridInPmeshFormat(String outPutFileName) throws IOException
IOException
public void writeGridInPmeshFormat(String outPutFileName, double cutOff) throws IOException
cutoff <0, the values considered must be <=cutoff cutoff >0, the values considered must be >=cutoff
IOException
public int[] getDim()
public void setDim(int[] dim)
dim
- The dim to set.public double getExtendGrid()
public void setExtendGrid(double extendGrid)
extendGrid
- The extendGrid to set.public double[][][] getGrid()
public void setGrid(double[][][] grid)
grid
- The grid to set.public double getLatticeConstant()
public void setLatticeConstant(double latticeConstant)
latticeConstant
- The latticeConstant to set.public double[] getGridArray()
public double getMaxx()
public double getMaxy()
public double getMaxz()
public double getMinx()
public double getMiny()
public double getMinz()