meshi.geometry
Class OldGrid

java.lang.Object
  extended by meshi.geometry.OldGrid

public class OldGrid
extends java.lang.Object


Field Summary
(package private)  Atom[] atoms
           
private  int cellCapacity
           
(package private)  GridCell[][][] cells
           
(package private)  GridCell defaultCell
           
 double edge
           
private  boolean failToBuild
           
private  long MAX_GRID_SIZE
           
 double maxX
           
 double maxY
           
 double maxZ
           
private  int minSphereRadiusToEdge
           
 double minX
           
 double minY
           
 double minZ
           
private  AtomList movingAtoms
           
private  double[][] prevCoor
           
private  double SPHERE_COND
           
(package private)  int xSize
           
(package private)  int xSizeNew
           
(package private)  int ySize
           
(package private)  int ySizeNew
           
(package private)  int zSize
           
(package private)  int zSizeNew
           
 
Constructor Summary
OldGrid(Atom[] atoms, double edge, double minSphereRadius)
           
 
Method Summary
 boolean build()
          Builds the grid.
 boolean failToBuild()
           
 GridCell getCell(Atom atom)
           
private static int maxAtomNumber(Atom[] atoms)
           
static int round(double d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edge

public final double edge

minSphereRadiusToEdge

private final int minSphereRadiusToEdge

MAX_GRID_SIZE

private final long MAX_GRID_SIZE
See Also:
Constant Field Values

SPHERE_COND

private final double SPHERE_COND
See Also:
Constant Field Values

xSize

int xSize

ySize

int ySize

zSize

int zSize

xSizeNew

int xSizeNew

ySizeNew

int ySizeNew

zSizeNew

int zSizeNew

minX

public double minX

minY

public double minY

minZ

public double minZ

maxX

public double maxX

maxY

public double maxY

maxZ

public double maxZ

atoms

Atom[] atoms

cells

GridCell[][][] cells

defaultCell

GridCell defaultCell

prevCoor

private double[][] prevCoor

movingAtoms

private AtomList movingAtoms

cellCapacity

private int cellCapacity

failToBuild

private boolean failToBuild
Constructor Detail

OldGrid

public OldGrid(Atom[] atoms,
               double edge,
               double minSphereRadius)
        throws UpdateableException
Throws:
UpdateableException
Method Detail

build

public boolean build()
              throws UpdateableException
Builds the grid. Return false upon failure (say, if the atoms are too spread around in a space that is too large to be devided into cells without a memory failure.

Throws:
UpdateableException

getCell

public GridCell getCell(Atom atom)

round

public static int round(double d)

failToBuild

public boolean failToBuild()

maxAtomNumber

private static int maxAtomNumber(Atom[] atoms)