meshi.geometry
Class Grid

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

public class Grid
extends java.lang.Object


Field Summary
(package private)  MolecularSystem atoms
           
(package 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
           
(package private)  java.util.ArrayList<AtomCore> movingAtoms
           
(package 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
Grid(double edge, double minSphereRadius)
           
Grid(MolecularSystem atoms, double edge, double minSphereRadius)
           
 
Method Summary
 boolean build()
          Builds the grid.
 boolean failToBuild()
           
 GridCell getCell(AtomCore atom)
           
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

MolecularSystem atoms

cells

GridCell[][][] cells

defaultCell

GridCell defaultCell

prevCoor

double[][] prevCoor

movingAtoms

java.util.ArrayList<AtomCore> movingAtoms

cellCapacity

int cellCapacity

failToBuild

private boolean failToBuild
Constructor Detail

Grid

public Grid(double edge,
            double minSphereRadius)

Grid

public Grid(MolecularSystem 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(AtomCore atom)

round

public static int round(double d)

failToBuild

public boolean failToBuild()