#include <lattice.h>
Public Methods | |
Layer () | |
Layer (MainFrame *, Configuration *, const char *name, Int_t ww, Int_t wh, Int_t winid) | |
winid is taken to associate the canvas with a TRootEmbeddedCanvas | |
~Layer () | |
Lattice * | GetLattice () |
Pointer to the current lattice. | |
MainFrame * | GetMainFrame () |
Double_t | GetCurEnergy () |
Double_t | GetBoltzConst () |
Double_t | GetTemp () |
Bool_t | RunSimulation () |
void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
Changing mouse behaviour. | |
void | SetLattice (Int_t, Int_t, Int_t, Double_t) |
Setting a lattice. | |
void | SetFormula (TEFormula *f) |
Set the TEFormula. | |
void | SetCurEnergy (Double_t e) |
Set the current energy. | |
void | SetIntLimit (Double_t l) |
Set the cutoff for the periodic boundary conditions. | |
void | StopSimulation () |
Halt the simulation. | |
Bool_t | MoveDefect (Double_t &) |
Move a defect one unit, returns the energy difference. | |
void | UndoMoveDefect () |
Undo move. | |
Double_t | CompEnergy () |
Compute the total energy. | |
Double_t | CompPartEnergy (Atom *) |
Compute the energy for one defect. | |
Int_t | MonteCarloStart (MainFrame *) |
Int_t | MonteCarloStop () |
Configuration * | GetConfig () |
Static Public Methods | |
void | MonteCarlo (void *) |
Monte-Carlo Algorithm. | |
Private Attributes | |
Int_t | oldAtomIndex |
Int_t | newAtomIndex |
Bool_t | runSimulation |
Double_t | intLimit |
Double_t | curEnergy |
Lattice * | pLattice |
TEFormula * | pEFormula |
TText * | pInfoText |
MainFrame * | pMainFrame |
Configuration * | pConfig |
TThread * | mcThread |
The Layer class serves as the basic canvas for drawing a lattice and the defects. It has a modified mouse behaviour for reacting on atoms and defects.
Definition at line 26 of file lattice.h.
|
|
|
winid is taken to associate the canvas with a TRootEmbeddedCanvas
Definition at line 13 of file layer.cpp. References mcThread, pConfig, pEFormula, pInfoText, pLattice, pMainFrame, and runSimulation. |
|
Definition at line 28 of file layer.cpp. References pLattice. |
|
Compute the total energy.
Definition at line 103 of file layer.cpp. References curEnergy, Lattice::GetDefects(), intLimit, pEFormula, and pLattice. Referenced by MainFrame::HandleMenu(), and MonteCarlo(). |
|
Compute the energy for one defect.
Definition at line 222 of file layer.cpp. References Lattice::GetDefects(), Atom::index, intLimit, pEFormula, and pLattice. Referenced by Atom::CompPartEnergy(), and MoveDefect(). |
|
Changing mouse behaviour.
|
|
Definition at line 38 of file lattice.h. References Configuration::GetBoltzConst(), and pConfig. Referenced by MonteCarlo(). |
|
Definition at line 68 of file lattice.h. References pConfig. Referenced by Lattice::Lattice(), and MonteCarlo(). |
|
Definition at line 37 of file lattice.h. References curEnergy. Referenced by MonteCarlo(). |
|
Pointer to the current lattice.
Definition at line 35 of file lattice.h. References pLattice. Referenced by MainFrame::DoButtons(), MainFrame::HandleMenu(), and MonteCarlo(). |
|
Definition at line 36 of file lattice.h. References pMainFrame. Referenced by Atom::InsertDefect(), and Atom::RemoveDefect(). |
|
Definition at line 39 of file lattice.h. References Configuration::GetTemp(), and pConfig. Referenced by MonteCarlo(). |
|
Monte-Carlo Algorithm.
Definition at line 337 of file layer.cpp. References Configuration::AutoSave(), CompEnergy(), GetBoltzConst(), GetConfig(), GetCurEnergy(), Configuration::GetImageFormat(), Configuration::GetImagePath(), Configuration::GetImagePrefix(), GetLattice(), MainFrame::GetLayer(), Configuration::GetSaveInterval(), GetTemp(), Configuration::GetUpdateInterval(), MainFrame::IsInfoEnabled(), MoveDefect(), pConfig, pMainFrame, RunSimulation(), SetCurEnergy(), Lattice::SetInfo(), MainFrame::SetInfoEnergy(), MainFrame::SetInfoImages(), MainFrame::SetInfoMoves(), MainFrame::SetInfoStatus(), UndoMoveDefect(), and Configuration::UpdateCanvas(). Referenced by MonteCarloStart(). |
|
Definition at line 474 of file layer.cpp. References mcThread, MonteCarlo(), and runSimulation. Referenced by MainFrame::DoButtons(). |
|
Definition at line 487 of file layer.cpp. References mcThread, and runSimulation. Referenced by MainFrame::DoButtons(). |
|
Move a defect one unit, returns the energy difference.
Definition at line 63 of file layer.cpp. References CompPartEnergy(), Lattice::GetAtomNeighbor(), Lattice::GetDefects(), Lattice::GetNAtoms(), Atom::index, Atom::InsertDefect(), newAtomIndex, oldAtomIndex, and pLattice. Referenced by MonteCarlo(). |
|
Definition at line 40 of file lattice.h. References runSimulation. Referenced by MainFrame::HandleMenu(), MonteCarlo(), and MainFrame::SetInfoStatus(). |
|
Set the current energy.
Definition at line 48 of file lattice.h. References curEnergy. Referenced by MonteCarlo(). |
|
Set the TEFormula.
Definition at line 46 of file lattice.h. References pEFormula. Referenced by MainFrame::MainFrame(). |
|
Set the cutoff for the periodic boundary conditions.
Definition at line 50 of file lattice.h. References intLimit. |
|
Setting a lattice.
Definition at line 45 of file layer.cpp. References intLimit, kLHexagonal, kLSquare, pConfig, pLattice, and Configuration::SetInteractionLimit(). Referenced by LatticeDlg::DoButtons(). |
|
Halt the simulation.
Definition at line 52 of file lattice.h. References runSimulation. |
|
Undo move.
Definition at line 90 of file layer.cpp. References Lattice::GetAtoms(), newAtomIndex, oldAtomIndex, and pLattice. Referenced by MonteCarlo(). |
|
The current systems energy Definition at line 75 of file lattice.h. Referenced by CompEnergy(), GetCurEnergy(), and SetCurEnergy(). |
|
The cutoff for the interaction range Definition at line 74 of file lattice.h. Referenced by CompEnergy(), CompPartEnergy(), SetIntLimit(), and SetLattice(). |
|
Thread executing MonteCarlo algorithm Definition at line 81 of file lattice.h. Referenced by Layer(), MonteCarloStart(), and MonteCarloStop(). |
|
Definition at line 72 of file lattice.h. Referenced by MoveDefect(), and UndoMoveDefect(). |
|
Definition at line 71 of file lattice.h. Referenced by MoveDefect(), and UndoMoveDefect(). |
|
The configuration object Definition at line 80 of file lattice.h. Referenced by GetBoltzConst(), GetConfig(), GetTemp(), Layer(), MonteCarlo(), and SetLattice(). |
|
A modified TFormula object, holding the current interaction energy function Definition at line 77 of file lattice.h. Referenced by CompEnergy(), CompPartEnergy(), Layer(), and SetFormula(). |
|
Is drawn when the canvas is not up to date Definition at line 78 of file lattice.h. Referenced by Layer(). |
|
The current lattice Definition at line 76 of file lattice.h. Referenced by CompEnergy(), CompPartEnergy(), GetLattice(), Layer(), MoveDefect(), SetLattice(), UndoMoveDefect(), and ~Layer(). |
|
Reference to the main gui Definition at line 79 of file lattice.h. Referenced by GetMainFrame(), Layer(), and MonteCarlo(). |
|
Definition at line 73 of file lattice.h. Referenced by Layer(), MonteCarloStart(), MonteCarloStop(), RunSimulation(), and StopSimulation(). |