public class BasicGrowthLattice extends AbstractGrowthLattice
| Modifier and Type | Field and Description |
|---|---|
private boolean |
simple |
Y_RATIO| Constructor and Description |
|---|
BasicGrowthLattice(int hexaSizeI,
int hexaSizeJ,
ModifiedBuffer modified,
boolean simple) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addNeighbour(BasicGrowthAtom neighbourAtom,
int neighbourPosition,
boolean forceNucleation)
A new occupied atom was added before calling this method, here, updating the first and the
second neighbourhood.
|
void |
changeOccupationByHand(double xMouse,
double yMouse,
int scale)
Changes the occupation of the clicked atom from unoccupied to occupied, or vice versa.
|
private AbstractGrowthAtom |
chooseClearAreaStep(AbstractGrowthAtom atom,
int distance) |
private AbstractGrowthAtom |
chooseClearAreaTerrace(AbstractGrowthAtom atom,
int distance)
Chooses the randomly a far atom.
|
private BasicGrowthAtom[][] |
createAtoms() |
private int |
createId(int i,
int j) |
void |
deposit(AbstractGrowthAtom a,
boolean forceNucleation) |
double |
extract(AbstractGrowthAtom a)
Extract the given atom from the lattice.
|
int |
getAvailableDistance(AbstractGrowthAtom atom,
int thresholdDistance) |
Point2D |
getCartesianLocation(int iHexa,
int jHexa)
Obtains the spatial location of certain atom, the distance between atoms is considered as 1
Returns the Cartesian position, given the hexagonal (lattice) location.
|
float |
getCartSizeX() |
float |
getCartSizeY() |
double |
getCartX(int iHexa,
int jHexa) |
double |
getCartY(int jHexa) |
BasicGrowthAtom |
getCentralAtom()
Returns the atom that it is in the middle of single flake simulation.
|
Point2D |
getCentralCartesianLocation() |
private int |
getClearAreaStep(AbstractGrowthAtom atom,
int thresholdDistance) |
private int |
getClearAreaTerrace(AbstractGrowthAtom atom,
int thresholdDistance)
We only care about the largest possible distance atoms.
|
AbstractGrowthAtom |
getFarSite(AbstractGrowthAtom atom,
int distance) |
int |
getiHexa(double xCart,
double yCart)
Knowing the X and Y Cartesian location, returns closest atom hexagonal coordinate.
|
int |
getjHexa(double yCart)
Knowing the X and Y Cartesian location, returns closest atom hexagonal coordinate.
|
AbstractGrowthAtom |
getNeighbour(int iHexa,
int jHexa,
int neighbour) |
void |
init() |
private void |
removeNeighbour(BasicGrowthAtom neighbourAtom,
int neighbourPosition)
Computes the removal of one atom.
|
private void |
updateSecondNeighbour(BasicGrowthAtom secondNeighbourAtom) |
addAtom, addBondAtom, addOccupied, countIslands, countPerimeter, getAtom, getAtom, getAtom, getAtom, getAtomTypesCounter, getAverageGyradius, getCentreOfMass, getCmDistance, getCoverage, getDistancesToCentre, getDistanceToCenter, getDistanceToCenter, getEmptyTypesCounter, getInnerPerimeterLenght, getIsland, getIslandCount, getIslandIterator, getMobileAtoms, getMonomerCount, getMultiAtom, getMultiAtomCount, getMultiAtomIterator, getMultiAtomsIterator, getOccupied, getOuterPerimeterLenght, getTotalHops, getTracerDistance, getUc, getUc, identifyAddMultiAtom, identifyIsland, identifyRemoveMultiAtomIsland, initialiseRates, printDistances, reset, resetOccupied, setAngles, setAtoms, setAtomsTypesCounter, setInsideCircle, setInsideSquare, size, subtractOccupied, swapAtomsInMultiAtom, swapIslandgetHexaSizeI, getHexaSizeJ, getHexaSizeK, getUnitCellSize, isPaused, setHexaSizeI, setHexaSizeJ, setHexaSizeK, setPaused, setProbabilities, setUnitCellSizepublic BasicGrowthLattice(int hexaSizeI,
int hexaSizeJ,
ModifiedBuffer modified,
boolean simple)
public BasicGrowthAtom getCentralAtom()
AbstractGrowthLatticegetCentralAtom in class AbstractGrowthLatticepublic AbstractGrowthAtom getNeighbour(int iHexa, int jHexa, int neighbour)
getNeighbour in class AbstractGrowthLatticepublic float getCartSizeX()
getCartSizeX in class AbstractGrowthLatticepublic float getCartSizeY()
getCartSizeY in class AbstractGrowthLatticepublic double getCartX(int iHexa,
int jHexa)
getCartX in class AbstractGrowthLatticepublic double getCartY(int jHexa)
getCartY in class AbstractGrowthLatticepublic int getiHexa(double xCart,
double yCart)
AbstractGrowthLatticegetiHexa in class AbstractGrowthLatticexCart - Cartesian X coordinate.yCart - Cartesian Y coordinate.public int getjHexa(double yCart)
AbstractGrowthLatticegetjHexa in class AbstractGrowthLatticeyCart - Cartesian Y coordinate.public Point2D getCartesianLocation(int iHexa, int jHexa)
AbstractGrowthLatticegetCartesianLocation in class AbstractGrowthLatticeiHexa - i index in the hexagonal mesh.jHexa - j index in the hexagonal mesh.public Point2D getCentralCartesianLocation()
getCentralCartesianLocation in class AbstractGrowthLatticepublic int getAvailableDistance(AbstractGrowthAtom atom, int thresholdDistance)
public AbstractGrowthAtom getFarSite(AbstractGrowthAtom atom, int distance)
public void init()
public void deposit(AbstractGrowthAtom a, boolean forceNucleation)
deposit in class AbstractGrowthLatticepublic double extract(AbstractGrowthAtom a)
AbstractGrowthLatticeextract in class AbstractGrowthLatticea - the atom to be extracted.public void changeOccupationByHand(double xMouse,
double yMouse,
int scale)
changeOccupationByHand in class AbstractGrowthLatticexMouse - absolute X location of the pressed pointyMouse - absolute Y location of the pressed pointscale - zoom levelprivate int createId(int i,
int j)
private BasicGrowthAtom[][] createAtoms()
private int getClearAreaTerrace(AbstractGrowthAtom atom, int thresholdDistance)
atom - thresholdDistance - private AbstractGrowthAtom chooseClearAreaTerrace(AbstractGrowthAtom atom, int distance)
atom - origin atom.distance - how far we have to move.private int getClearAreaStep(AbstractGrowthAtom atom, int thresholdDistance)
private AbstractGrowthAtom chooseClearAreaStep(AbstractGrowthAtom atom, int distance)
private void addNeighbour(BasicGrowthAtom neighbourAtom, int neighbourPosition, boolean forceNucleation)
neighbourAtom - current atom.neighbourPosition - the position of the neighbour.forceNucleation - private void updateSecondNeighbour(BasicGrowthAtom secondNeighbourAtom)
private void removeNeighbour(BasicGrowthAtom neighbourAtom, int neighbourPosition)
neighbourAtom - neighbour atom of the original atom.