public class ConcertedKmc extends AbstractGrowthKmc
Modifier and Type | Field and Description |
---|---|
private ActivationEnergy |
activationEnergy |
private double |
adsorptionRatePerSite |
private boolean |
aeOutput
Activation energy output at the end of execution
|
private boolean |
automaticCollections |
private AtomsCollection |
col
Stores all collections of atoms; either in a tree or an array.
|
private double[] |
diffusionRateMultiAtom |
private double[][] |
diffusionRatePerAtom |
private double[] |
diffusionRatePerIslandSize |
private boolean |
doIslandDiffusion |
private boolean |
doMultiAtomDiffusion |
private boolean |
extraOutput
Attribute to control the output of data every 1% and nucleation.
|
private float |
maxCoverage
This attribute defines which is the maximum coverage for a multi-flake simulation.
|
private long |
maxSteps |
private Restart |
restart |
private long |
simulatedSteps |
private int |
simulationNumber |
private IAtomsCollection[] |
sites |
private double[] |
totalRate |
Constructor and Description |
---|
ConcertedKmc(Parser parser,
java.lang.String restartFolder) |
Modifier and Type | Method and Description |
---|---|
private java.util.Set<ConcertedAtom> |
addModifiedAtoms(java.util.Set<ConcertedAtom> modifiedAtoms,
ConcertedAtom atom)
Includes all the first and second neighbourhood of the current atom in a
list without repeated elements.
|
private void |
changeCollection(byte process,
boolean toTree)
Changes current collection from array/tree to tree/array.
|
private void |
checkMergeIslands(AbstractGrowthAtom atom) |
private void |
checkMergeIslands(Island island) |
private void |
checkSizes()
If a process is stored in a array and it is too big, change to be a tree.
|
private boolean |
depositAtom(ConcertedAtom atom) |
private ConcertedAtom |
depositNewAtom() |
private ConcertedAtom |
depositNewAtom(int id)
Deposit new atom in with the given label.
|
void |
depositSeed() |
private void |
diffuseAtom()
Moves an atom.
|
private void |
diffuseIsland()
Moves an island.
|
private void |
diffuseMultiAtom() |
private double |
getConcertedDiffusionRate(int islandNumber) |
private double |
getDiffusionRate(ConcertedAtom atom,
ConcertedAtom neighbour,
int position) |
private double |
getMultiAtomDiffusionRate(MultiAtom multiAtom) |
private int |
getRandomIsland() |
private MultiAtom |
getRandomMultiAtom() |
private void |
initRates()
Iterates over all lattice sites and initialises adsorption probabilities.
|
private void |
mergeIslands() |
private Island |
moveIsland(Island originIsland,
int direction)
Moves an island and recomputes all the neighbourhood.
|
private Island |
moveMultiAtom(MultiAtom originMultiAtom,
int direction)
A copy of moveIsland(): Moves an island and recomputes all the neighbourhood.
|
protected boolean |
performSimulationStep()
Performs a simulation step.
|
private void |
printData()
Print current information to extra file.
|
private void |
recomputeAdsorptionProbability(ConcertedAtom atom) |
private void |
recomputeCollection(byte process,
ConcertedAtom atom,
double oldRate) |
private void |
recomputeConcertedDiffusionProbability(ConcertedAtom atom)
Doesn't work yet!!
|
private void |
recomputeDiffusionProbability(ConcertedAtom atom) |
private void |
recomputeMultiAtomProbability(ConcertedAtom atom) |
void |
reset()
Resets the lattice and the list of atoms.
|
void |
setRates(AbstractConcertedRates rates) |
int |
simulate()
Does the actual simulation.
|
private void |
updatePossibles() |
private void |
updateRateFromList(byte process) |
private void |
updateRates(java.util.Set<ConcertedAtom> modifiedAtoms)
Updates total adsorption and diffusion probabilities.
|
private void |
updateRatesIslands(ConcertedAtom origin,
ConcertedAtom destination,
boolean wasDimer) |
getAccelerator, getCoverage, getCurrentRadius, getHexagonalPeriodicSurface, getLattice, getModifiedBuffer, getPerimeter, getSampledSurface, initialiseRates, isJustCentralFlake, setAccelerator, setArea, setAtomPerimeter, setCurrentOccupiedArea, setDepositionRate, setLattice, setPerimeter, setTerraceToTerraceProbability
getIterations, getList, getTime, setIterations, setLattice, simulate, simulate
private long simulatedSteps
private int simulationNumber
private final IAtomsCollection[] sites
private AtomsCollection col
private final boolean automaticCollections
private final long maxSteps
private final float maxCoverage
private double adsorptionRatePerSite
private double[][] diffusionRatePerAtom
private double[] diffusionRatePerIslandSize
private double[] diffusionRateMultiAtom
private double[] totalRate
private final boolean extraOutput
private final boolean aeOutput
private final ActivationEnergy activationEnergy
private final Restart restart
private final boolean doIslandDiffusion
private final boolean doMultiAtomDiffusion
public ConcertedKmc(Parser parser, java.lang.String restartFolder)
public void setRates(AbstractConcertedRates rates)
protected boolean performSimulationStep()
performSimulationStep
in class AbstractGrowthKmc
public int simulate()
AbstractKmc
simulate
in interface IKmc
simulate
in class AbstractGrowthKmc
public void depositSeed()
depositSeed
in interface IKmc
depositSeed
in class AbstractGrowthKmc
public void reset()
AbstractKmc
reset
in interface IKmc
reset
in class AbstractGrowthKmc
private boolean depositAtom(ConcertedAtom atom)
private ConcertedAtom depositNewAtom()
private ConcertedAtom depositNewAtom(int id)
id
- if negative, random number is chosen.private void diffuseAtom()
private int getRandomIsland()
private Island moveIsland(Island originIsland, int direction)
originIsland
- Island to be moved.direction
- Moving direction.private Island moveMultiAtom(MultiAtom originMultiAtom, int direction)
originMultiAtom
- Island to be moved.direction
- Moving direction.private void diffuseIsland()
private MultiAtom getRandomMultiAtom()
private void diffuseMultiAtom()
private void checkMergeIslands(Island island)
private void checkMergeIslands(AbstractGrowthAtom atom)
private void mergeIslands()
private void initRates()
private java.util.Set<ConcertedAtom> addModifiedAtoms(java.util.Set<ConcertedAtom> modifiedAtoms, ConcertedAtom atom)
modifiedAtoms
- previously added atoms, can be null.atom
- current central atom.private void updateRates(java.util.Set<ConcertedAtom> modifiedAtoms)
atom
- private void updateRatesIslands(ConcertedAtom origin, ConcertedAtom destination, boolean wasDimer)
private void recomputeAdsorptionProbability(ConcertedAtom atom)
private void recomputeDiffusionProbability(ConcertedAtom atom)
private void recomputeConcertedDiffusionProbability(ConcertedAtom atom)
atom
- private void recomputeMultiAtomProbability(ConcertedAtom atom)
private void recomputeCollection(byte process, ConcertedAtom atom, double oldRate)
private double getDiffusionRate(ConcertedAtom atom, ConcertedAtom neighbour, int position)
private double getConcertedDiffusionRate(int islandNumber)
private double getMultiAtomDiffusionRate(MultiAtom multiAtom)
private void updateRateFromList(byte process)
private void checkSizes()
private void changeCollection(byte process, boolean toTree)
process
- ADSORPTION, SINGLE diffusion, CONCERTED island diffusion or MULTI atom diffusion.toTree
- if true from array to tree, otherwise from tree to array.private void updatePossibles()
private void printData()
coverage
- used to have exactly the coverage and to be easily greppable.