public abstract class AbstractGrowthLattice extends AbstractLattice implements IDevitaLattice
Modifier and Type | Field and Description |
---|---|
private int |
atomTypesAmount |
private int[] |
atomTypesCounter |
private double |
centreMassDistance |
private int[] |
emptyTypesCounter |
private int |
hexaArea |
private long |
hops |
private java.util.ArrayList<java.lang.Integer> |
includePerimeterList |
private int |
innerPerimeter |
private int |
islandCount |
private java.util.ArrayList<Island> |
islands |
private int |
mobileAtoms |
private ModifiedBuffer |
modified |
private int |
monomerCount |
private int |
multiAtomsIndex |
private java.util.Map<java.lang.Integer,MultiAtom> |
multiAtomsMap |
private int |
occupied |
private int |
outerPerimeter |
private double |
tracerDistance |
private SimpleUc[][] |
ucArray
Unit cell array, where all the atoms are located.
|
static float |
Y_RATIO |
Constructor and Description |
---|
AbstractGrowthLattice(int hexaSizeI,
int hexaSizeJ,
ModifiedBuffer modified) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addAtom(AbstractGrowthAtom atom) |
(package private) void |
addBondAtom(AbstractGrowthAtom atom) |
private MultiAtom |
addMultiAtomIsland(AbstractGrowthAtom atom,
AbstractGrowthAtom neighbour,
int i) |
void |
addOccupied()
Adds an occupied location to the counter.
|
private boolean |
allMultiAtomsDifferent(AbstractGrowthAtom atom,
AbstractGrowthAtom neighbour) |
abstract void |
changeOccupationByHand(double xMouse,
double yMouse,
int scale) |
private double |
computeDiffusivity() |
int |
countIslands(java.io.PrintWriter print)
Counts the number of islands that the simulation has.
|
void |
countPerimeter(java.io.PrintWriter print)
Counts the sum of all islands perimeters.
|
abstract void |
deposit(AbstractGrowthAtom atom,
boolean forceNucleation) |
abstract double |
extract(AbstractGrowthAtom atom)
Extract the given atom from the lattice.
|
AbstractGrowthAtom |
getAtom(int index)
Deprecated.
|
AbstractGrowthAtom |
getAtom(int iHexa,
int jHexa)
Deprecated.
|
AbstractGrowthAtom |
getAtom(int iHexa,
int jHexa,
int unitCellPos) |
AbstractAtom |
getAtom(int iHexa,
int jHexa,
int kHexa,
int unitCellPos) |
java.lang.String |
getAtomTypesCounter() |
float |
getAverageGyradius()
Computes the average distances to the centre of mass for all islands.
|
abstract 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.
|
abstract float |
getCartSizeX() |
abstract float |
getCartSizeY() |
abstract double |
getCartX(int iHexa,
int jHexa) |
abstract double |
getCartY(int jHexa) |
abstract AbstractGrowthAtom |
getCentralAtom()
Returns the atom that it is in the middle of single flake simulation.
|
abstract Point2D |
getCentralCartesianLocation() |
void |
getCentreOfMass()
Calculates the centre of mass of each island.
|
double |
getCmDistance() |
float |
getCoverage() |
void |
getDistancesToCentre()
Computes each atoms distance to the centre of mass.
|
double |
getDistanceToCenter(double x,
double y)
Returns the distance of the given x,y point to the centre.
|
double |
getDistanceToCenter(int iHexa,
int jHexa) |
java.lang.String |
getEmptyTypesCounter() |
abstract int |
getiHexa(double xCart,
double yCart)
Knowing the X and Y Cartesian location, returns closest atom hexagonal coordinate.
|
int |
getInnerPerimeterLenght()
Inner perimeter is the sum of atoms that are occupied and have some neighbour not occupied.
|
Island |
getIsland(int i) |
int |
getIslandCount()
Only defined in growth lattice.
|
java.util.Iterator<Island> |
getIslandIterator() |
abstract int |
getjHexa(double yCart)
Knowing the X and Y Cartesian location, returns closest atom hexagonal coordinate.
|
int |
getMobileAtoms()
How many mobile atoms are.
|
int |
getMonomerCount()
Monomers are atoms without neighbours.
|
MultiAtom |
getMultiAtom(int i) |
int |
getMultiAtomCount() |
java.util.Iterator<MultiAtom> |
getMultiAtomIterator() |
java.util.Iterator |
getMultiAtomsIterator() |
abstract AbstractGrowthAtom |
getNeighbour(int iHexa,
int jHexa,
int neighbour) |
int |
getOccupied() |
int |
getOuterPerimeterLenght()
Outer perimeter is the sum of atoms that are not occupied and are touching an occupied one.
|
long |
getTotalHops()
How many steps has been moved all the atoms.
|
double |
getTracerDistance()
How far in average is an atom from where it was deposited.
|
AbstractGrowthUc |
getUc(int pos) |
AbstractGrowthUc |
getUc(int iLattice,
int jLattice) |
java.util.ArrayList<MultiAtom> |
identifyAddMultiAtom(AbstractGrowthAtom atom)
Counts the number of islands from current atom.
|
void |
identifyIsland(AbstractGrowthAtom atom,
boolean first,
boolean fromNeighbour)
Counts the number of islands from current atom.
|
private void |
identifyIsland(AbstractGrowthAtom atom,
boolean fromNeighbour,
int xDiference,
int yDiference)
Counts the number of islands that the simulation has.
|
double |
identifyRemoveMultiAtomIsland(AbstractGrowthAtom atom) |
void |
initialiseRates(double[][] probabilities)
Default rates to jump from one type to the other.
|
private boolean |
onlyOneNeighbourInCommon(AbstractGrowthAtom atom,
AbstractGrowthAtom neighbour)
Edge diffusion can only happen when two atoms are in an edge.
|
void |
printDistances() |
private double |
removeMultiAtom(AbstractGrowthAtom atom) |
void |
reset() |
void |
resetOccupied()
Resets to zero the number of occupied locations.
|
(package private) void |
setAngles() |
void |
setAtoms(AbstractGrowthAtom[][] atoms) |
void |
setAtomsTypesCounter(int length) |
java.util.List<AbstractGrowthAtom> |
setInsideCircle(int radius,
boolean periodicSingleFlake)
Defines which atoms are inside from the current position (centre) and given radius.
|
java.util.List<AbstractGrowthAtom> |
setInsideSquare(int radius)
Defines which atoms are inside from the current position.
|
int |
size() |
void |
subtractOccupied()
Subtracts an occupied location from the counter.
|
void |
swapAtomsInMultiAtom(AbstractGrowthAtom origin,
AbstractGrowthAtom destination) |
void |
swapIsland(Island origin,
Island destination) |
private double |
toZeroIfTooClose(double value) |
getHexaSizeI, getHexaSizeJ, getHexaSizeK, getUnitCellSize, isPaused, setHexaSizeI, setHexaSizeJ, setHexaSizeK, setPaused, setProbabilities, setUnitCellSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAvailableDistance, getFarSite
public static final float Y_RATIO
private final SimpleUc[][] ucArray
private final ModifiedBuffer modified
private final java.util.ArrayList<java.lang.Integer> includePerimeterList
private final int hexaArea
private int occupied
private int islandCount
private int multiAtomsIndex
private int monomerCount
private int[] atomTypesCounter
private int[] emptyTypesCounter
private int atomTypesAmount
private java.util.ArrayList<Island> islands
private final java.util.Map<java.lang.Integer,MultiAtom> multiAtomsMap
private int innerPerimeter
private int outerPerimeter
private double tracerDistance
private double centreMassDistance
private int mobileAtoms
private long hops
public AbstractGrowthLattice(int hexaSizeI, int hexaSizeJ, ModifiedBuffer modified)
public abstract AbstractGrowthAtom getNeighbour(int iHexa, int jHexa, int neighbour)
public abstract Point2D getCartesianLocation(int iHexa, int jHexa)
iHexa
- i index in the hexagonal mesh.jHexa
- j index in the hexagonal mesh.public abstract Point2D getCentralCartesianLocation()
public abstract float getCartSizeX()
public abstract float getCartSizeY()
public abstract double getCartX(int iHexa, int jHexa)
public abstract double getCartY(int jHexa)
public abstract int getiHexa(double xCart, double yCart)
xCart
- Cartesian X coordinate.yCart
- Cartesian Y coordinate.public abstract int getjHexa(double yCart)
yCart
- Cartesian Y coordinate.@Deprecated public AbstractGrowthAtom getAtom(int index)
index
- @Deprecated public AbstractGrowthAtom getAtom(int iHexa, int jHexa)
iHexa
- jHexa
- public AbstractGrowthAtom getAtom(int iHexa, int jHexa, int unitCellPos)
public abstract AbstractGrowthAtom getCentralAtom()
public AbstractGrowthUc getUc(int pos)
getUc
in class AbstractLattice
public AbstractAtom getAtom(int iHexa, int jHexa, int kHexa, int unitCellPos)
getAtom
in class AbstractLattice
public final void setAtoms(AbstractGrowthAtom[][] atoms)
final void setAngles()
public int getInnerPerimeterLenght()
public int getOuterPerimeterLenght()
public void addOccupied()
public void subtractOccupied()
public void resetOccupied()
public float getCoverage()
public int getOccupied()
public AbstractGrowthUc getUc(int iLattice, int jLattice)
public Island getIsland(int i)
public MultiAtom getMultiAtom(int i)
public java.util.Iterator getMultiAtomsIterator()
public float getAverageGyradius()
getAverageGyradius
in class AbstractLattice
public int getIslandCount()
AbstractLattice
getIslandCount
in class AbstractLattice
public java.util.Iterator<Island> getIslandIterator()
public java.util.Iterator<MultiAtom> getMultiAtomIterator()
public int getMultiAtomCount()
public int size()
size
in class AbstractLattice
public abstract void changeOccupationByHand(double xMouse, double yMouse, int scale)
public abstract void deposit(AbstractGrowthAtom atom, boolean forceNucleation)
public abstract double extract(AbstractGrowthAtom atom)
atom
- the atom to be extracted.public double getDistanceToCenter(int iHexa, int jHexa)
public void getDistancesToCentre()
public double getDistanceToCenter(double x, double y)
x
- Cartesian coordinate.y
- Cartesian coordinate.public int getMonomerCount()
countIslands(java.io.PrintWriter)
, the number of monomers is available.public void getCentreOfMass()
public void setAtomsTypesCounter(int length)
public java.lang.String getAtomTypesCounter()
public java.lang.String getEmptyTypesCounter()
public double getTracerDistance()
countIslands(java.io.PrintWriter)
method.public double getCmDistance()
public long getTotalHops()
public int getMobileAtoms()
countIslands(java.io.PrintWriter)
method.public void initialiseRates(double[][] probabilities)
probabilities
- Default rates.public void reset()
reset
in class AbstractLattice
public java.util.List<AbstractGrowthAtom> setInsideCircle(int radius, boolean periodicSingleFlake)
radius
- public java.util.List<AbstractGrowthAtom> setInsideSquare(int radius)
radius
- is the half of the square side.void addAtom(AbstractGrowthAtom atom)
void addBondAtom(AbstractGrowthAtom atom)
public int countIslands(java.io.PrintWriter print)
print
- to where should print the output: null (nowhere), standard output or a file.public void countPerimeter(java.io.PrintWriter print)
getInnerPerimeterLenght()
and getOuterPerimeterLenght()
to get them.print
- to where should print the output: null (nowhere), standard output or a file.public void printDistances()
private double toZeroIfTooClose(double value)
private double computeDiffusivity()
private void identifyIsland(AbstractGrowthAtom atom, boolean fromNeighbour, int xDiference, int yDiference)
atom
- atom to be classified.fromNeighbour
- whether is called from outside or recursively.public void identifyIsland(AbstractGrowthAtom atom, boolean first, boolean fromNeighbour)
atom
- atom to be classified.first
- previously has detected that a neighbour atom is in an island.fromNeighbour
- whether is called from outside or recursively.public void swapAtomsInMultiAtom(AbstractGrowthAtom origin, AbstractGrowthAtom destination)
public java.util.ArrayList<MultiAtom> identifyAddMultiAtom(AbstractGrowthAtom atom)
atom
- Atom to be classified.private MultiAtom addMultiAtomIsland(AbstractGrowthAtom atom, AbstractGrowthAtom neighbour, int i)
private boolean allMultiAtomsDifferent(AbstractGrowthAtom atom, AbstractGrowthAtom neighbour)
private boolean onlyOneNeighbourInCommon(AbstractGrowthAtom atom, AbstractGrowthAtom neighbour)
atom
- neighbour
- public double identifyRemoveMultiAtomIsland(AbstractGrowthAtom atom)
private double removeMultiAtom(AbstractGrowthAtom atom)