public abstract class AbstractGrowthKmc extends AbstractKmc
Modifier and Type | Field and Description |
---|---|
private DevitaAccelerator |
accelerator |
private ActivationEnergy |
activationEnergy |
private boolean |
aeOutput
Activation energy output at the end of execution
|
private int |
area
Total area of a single flake simulation.
|
private int |
currentArea
Attribute to store temporally the current area of the simulation.
|
private double |
depositionRatePerSite |
private boolean |
extraOutput
Attribute to control the output of data every 1% and nucleation.
|
private boolean |
extraOutput2
Attribute to control the output of extra data of delta time between two attachments and between
an atom is deposited and attached to an island.
|
private boolean |
forceNucleation
If two terraces are together freeze them, in multi-flake simulation mode.
|
private int |
freeArea |
private boolean |
justCentralFlake |
private AbstractGrowthLattice |
lattice |
private float |
maxCoverage
This attribute defines which is the maximum coverage for a multi-flake simulation.
|
private ModifiedBuffer |
modifiedBuffer |
private int |
nucleations |
private RoundPerimeter |
perimeter |
private short |
perimeterType |
private boolean |
periodicSingleFlake |
private Restart |
restart |
private long |
simulatedSteps |
private double |
sumProbabilities |
private double |
terraceToTerraceProbability |
private boolean |
useMaxPerimeter |
Constructor and Description |
---|
AbstractGrowthKmc(Parser parser) |
Modifier and Type | Method and Description |
---|---|
private void |
atomAttachedToIsland(AbstractGrowthAtom destination)
An atom has been attached to an island an so printing this to output files.
|
private int |
calculateAreaAsInKmcCanvas()
Calculates current area or, i.e. the number of current places that simulation has.
|
private int |
calculateAreaAsInLattice()
Calculates the total area of a single flake simulation.
|
private AbstractGrowthAtom |
chooseRandomHop(AbstractGrowthAtom originAtom,
int times)
Selects the next step randomly.
|
private boolean |
depositAtom(AbstractGrowthAtom atom) |
private AbstractGrowthAtom |
depositNewAtom() |
void |
depositSeed() |
private boolean |
diffuseAtom(AbstractGrowthAtom originAtom,
AbstractGrowthAtom destinationAtom)
Moves an atom from origin to destination.
|
DevitaAccelerator |
getAccelerator() |
float |
getCoverage()
Returns the coverage of the simulation.
|
int |
getCurrentRadius()
Takes the current radius from the perimeter attribute.
|
private double |
getEstimatedCoverage()
Method to obtain theoretical coverage from deposition flux and current time.
|
float[][] |
getHexagonalPeriodicSurface(int binX,
int binY) |
AbstractGrowthLattice |
getLattice() |
ModifiedBuffer |
getModifiedBuffer() |
RoundPerimeter |
getPerimeter() |
float[][] |
getSampledSurface(int binX,
int binY)
Returns a sampled topological measurement of the KMC surface
|
void |
initialiseRates(double[] rates)
Initialises the rates of the simulation.
|
boolean |
isJustCentralFlake() |
protected boolean |
performSimulationStep()
Performs a simulation step.
|
private boolean |
perimeterMustBeEnlarged(AbstractGrowthAtom destinationAtom) |
private void |
printData(java.lang.Integer coverage)
Print current information to extra file.
|
void |
reset()
Resets the lattice and the list of atoms.
|
void |
setAccelerator(DevitaAccelerator accelerator) |
void |
setArea(int area) |
(package private) void |
setAtomPerimeter()
Internal method to select the perimeter size and type.
|
(package private) void |
setCurrentOccupiedArea(int occupiedSize)
This has to be called only once from AgKmc or GrapheneKmc.
|
void |
setDepositionRate(double depositionRateML,
double islandDensitySite) |
void |
setLattice(AbstractGrowthLattice lattice) |
void |
setPerimeter(RoundPerimeter perimeter) |
void |
setTerraceToTerraceProbability(double terraceToTerraceProbability) |
int |
simulate()
Does the actual simulation.
|
getIterations, getList, getTime, setIterations, setLattice, simulate, simulate
private AbstractGrowthLattice lattice
private final ModifiedBuffer modifiedBuffer
private final boolean justCentralFlake
private final boolean periodicSingleFlake
private RoundPerimeter perimeter
private final boolean useMaxPerimeter
private final short perimeterType
private DevitaAccelerator accelerator
private final float maxCoverage
private int area
private int currentArea
private double depositionRatePerSite
private int freeArea
private int nucleations
private final boolean extraOutput
private final boolean extraOutput2
private final boolean aeOutput
private final ActivationEnergy activationEnergy
private final boolean forceNucleation
private double terraceToTerraceProbability
private long simulatedSteps
private double sumProbabilities
private Restart restart
public AbstractGrowthKmc(Parser parser)
public final void setDepositionRate(double depositionRateML, double islandDensitySite)
setDepositionRate
in interface IKmc
setDepositionRate
in class AbstractKmc
depositionRateML
- deposition rate per site (synonyms: deposition flux and diffusion mono layer).islandDensitySite
- only used for single flake simulations to properly calculate deposition rate.public void setTerraceToTerraceProbability(double terraceToTerraceProbability)
public int getCurrentRadius()
getCurrentRadius
in class AbstractKmc
public float[][] getHexagonalPeriodicSurface(int binX, int binY)
public float[][] getSampledSurface(int binX, int binY)
IKmc
public float getCoverage()
getCoverage
in class AbstractKmc
public DevitaAccelerator getAccelerator()
public void setAccelerator(DevitaAccelerator accelerator)
public final void setLattice(AbstractGrowthLattice lattice)
lattice
- the lattice to setpublic final ModifiedBuffer getModifiedBuffer()
public boolean isJustCentralFlake()
public RoundPerimeter getPerimeter()
public final void setPerimeter(RoundPerimeter perimeter)
perimeter
- the perimeter to set.public void setArea(int area)
area
- the area to set.public void initialiseRates(double[] rates)
AbstractKmc
initialiseRates
in interface IKmc
initialiseRates
in class AbstractKmc
public void reset()
AbstractKmc
reset
in interface IKmc
reset
in class AbstractKmc
public AbstractGrowthLattice getLattice()
getLattice
in interface IKmc
getLattice
in class AbstractKmc
public int simulate()
AbstractKmc
simulate
in interface IKmc
simulate
in class AbstractKmc
public void depositSeed()
protected boolean performSimulationStep()
performSimulationStep
in class AbstractKmc
void setCurrentOccupiedArea(int occupiedSize)
occupiedSize
- Size of the seed in atoms. Number to calculate free space.void setAtomPerimeter()
private boolean depositAtom(AbstractGrowthAtom atom)
private AbstractGrowthAtom chooseRandomHop(AbstractGrowthAtom originAtom, int times)
originAtom
- atom that has to be moved.times
- how many times it has been called recursivelyprivate void printData(java.lang.Integer coverage)
coverage
- used to have exactly the coverage and to be easily greppable.private int calculateAreaAsInKmcCanvas()
private int calculateAreaAsInLattice()
private boolean diffuseAtom(AbstractGrowthAtom originAtom, AbstractGrowthAtom destinationAtom)
originAtom
- origin atom.destinationAtom
- destination atom.private void atomAttachedToIsland(AbstractGrowthAtom destination)
destination
- destination atom is required to compute time difference.private AbstractGrowthAtom depositNewAtom()
private boolean perimeterMustBeEnlarged(AbstractGrowthAtom destinationAtom)
private double getEstimatedCoverage()