public class AgLattice extends AbstractGrowthLattice
| Modifier and Type | Field and Description |
|---|---|
private Point2D |
centralCartesianLocation |
Y_RATIO| Constructor and Description |
|---|
AgLattice(int hexaSizeI,
int hexaSizeJ,
ModifiedBuffer modified,
HopsPerStep distancePerStep) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addOccupiedNeighbour(AgAtom neighbourAtom,
byte originType,
boolean forceNucleation)
Éste lo ejecutan los primeros vecinos.
|
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(short iHexaOrigin,
short jHexaOrigin,
int distance,
double raw) |
private AbstractGrowthAtom |
chooseClearAreaTerrace(short iHexaOrigin,
short jHexaOrigin,
int distance,
double raw) |
private AgAtom[][] |
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)
The Cartesian X is the location I, plus the half of J.
|
double |
getCartY(int jHexa)
Simple relation between Y (Cartesian) and J (hexagonal), with Y_RATIO (=sin 60º).
|
AgAtom |
getCentralAtom()
Returns the atom that it is in the middle of single flake simulation.
|
Point2D |
getCentralCartesianLocation() |
private int |
getClearAreaStep(short iHexaOrigin,
short jHexaOrigin,
int thresholdDistance) |
private int |
getClearAreaTerrace(short iHexaOrigin,
short jHexaOrigin,
int thresholdDistance) |
AbstractGrowthAtom |
getFarSite(AbstractGrowthAtom atom,
int distance) |
int[] |
getHexagonalCoordinates(double xCart,
double yCart) |
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 |
removeImmobilAddMobile(AgAtom atom) |
private void |
removeMobileAddImmobile(AgAtom atom,
boolean forceNucleation) |
private void |
removeMobileOccupied(AgAtom neighbourAtom)
Computes the removal of one mobile atom.
|
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, setUnitCellSizeprivate final Point2D centralCartesianLocation
public AgLattice(int hexaSizeI,
int hexaSizeJ,
ModifiedBuffer modified,
HopsPerStep distancePerStep)
public AgAtom getCentralAtom()
AbstractGrowthLatticegetCentralAtom in class AbstractGrowthLatticepublic Point2D getCentralCartesianLocation()
getCentralCartesianLocation in class AbstractGrowthLatticepublic float getCartSizeX()
getCartSizeX in class AbstractGrowthLatticepublic float getCartSizeY()
getCartSizeY in class AbstractGrowthLatticepublic Point2D getCartesianLocation(int iHexa, int jHexa)
AbstractGrowthLatticegetCartesianLocation in class AbstractGrowthLatticeiHexa - i index in the hexagonal mesh.jHexa - j index in the hexagonal mesh.public int[] getHexagonalCoordinates(double xCart,
double yCart)
public int getiHexa(double xCart,
double yCart)
getiHexa in class AbstractGrowthLatticexCart - Cartesian X coordinateyCart - Cartesian Y coordinatepublic int getjHexa(double yCart)
getjHexa in class AbstractGrowthLatticeyCart - Cartesian Y coordinate.public double getCartX(int iHexa,
int jHexa)
getCartX in class AbstractGrowthLatticeiHexa - jHexa - public double getCartY(int jHexa)
getCartY in class AbstractGrowthLatticejHexa - public AbstractGrowthAtom getNeighbour(int iHexa, int jHexa, int neighbour)
getNeighbour 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 point.yMouse - absolute Y location of the pressed point.scale - zoom level.private AgAtom[][] createAtoms()
private int createId(int i,
int j)
private int getClearAreaTerrace(short iHexaOrigin,
short jHexaOrigin,
int thresholdDistance)
private AbstractGrowthAtom chooseClearAreaTerrace(short iHexaOrigin, short jHexaOrigin, int distance, double raw)
private int getClearAreaStep(short iHexaOrigin,
short jHexaOrigin,
int thresholdDistance)
private AbstractGrowthAtom chooseClearAreaStep(short iHexaOrigin, short jHexaOrigin, int distance, double raw)
private void removeImmobilAddMobile(AgAtom atom)
private void removeMobileAddImmobile(AgAtom atom, boolean forceNucleation)
private void addOccupiedNeighbour(AgAtom neighbourAtom, byte originType, boolean forceNucleation)
neighbourAtom - neighbour atom of the original atom.originType - type of the original atom.forceNucleation - private void removeMobileOccupied(AgAtom neighbourAtom)
neighbourAtom - neighbour atom of the original atom.