Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Layer Class Reference

Represents a basic layer, on which a lattice can be drawn. More...

#include <lattice.h>

List of all members.

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 ()
LatticeGetLattice ()
 Pointer to the current lattice.

MainFrameGetMainFrame ()
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 ()
ConfigurationGetConfig ()

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
LatticepLattice
TEFormulapEFormula
TText * pInfoText
MainFramepMainFrame
ConfigurationpConfig
TThread * mcThread


Detailed Description

Represents a basic layer, on which a lattice can be drawn.

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.


Constructor & Destructor Documentation

Layer::Layer  
 

Definition at line 11 of file layer.cpp.

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

Definition at line 13 of file layer.cpp.

References mcThread, pConfig, pEFormula, pInfoText, pLattice, pMainFrame, and runSimulation.

Layer::~Layer  
 

Definition at line 28 of file layer.cpp.

References pLattice.


Member Function Documentation

Double_t Layer::CompEnergy  
 

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().

Double_t Layer::CompPartEnergy Atom  
 

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().

void Layer::ExecuteEvent Int_t    event,
Int_t    px,
Int_t    py
 

Changing mouse behaviour.

Definition at line 33 of file layer.cpp.

Double_t Layer::GetBoltzConst   [inline]
 

Definition at line 38 of file lattice.h.

References Configuration::GetBoltzConst(), and pConfig.

Referenced by MonteCarlo().

Configuration* Layer::GetConfig   [inline]
 

Definition at line 68 of file lattice.h.

References pConfig.

Referenced by Lattice::Lattice(), and MonteCarlo().

Double_t Layer::GetCurEnergy   [inline]
 

Definition at line 37 of file lattice.h.

References curEnergy.

Referenced by MonteCarlo().

Lattice* Layer::GetLattice   [inline]
 

Pointer to the current lattice.

Definition at line 35 of file lattice.h.

References pLattice.

Referenced by MainFrame::DoButtons(), MainFrame::HandleMenu(), and MonteCarlo().

MainFrame* Layer::GetMainFrame   [inline]
 

Definition at line 36 of file lattice.h.

References pMainFrame.

Referenced by Atom::InsertDefect(), and Atom::RemoveDefect().

Double_t Layer::GetTemp   [inline]
 

Definition at line 39 of file lattice.h.

References Configuration::GetTemp(), and pConfig.

Referenced by MonteCarlo().

void Layer::MonteCarlo void *    [static]
 

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().

Int_t Layer::MonteCarloStart MainFrame  
 

Definition at line 474 of file layer.cpp.

References mcThread, MonteCarlo(), and runSimulation.

Referenced by MainFrame::DoButtons().

Int_t Layer::MonteCarloStop  
 

Definition at line 487 of file layer.cpp.

References mcThread, and runSimulation.

Referenced by MainFrame::DoButtons().

Bool_t Layer::MoveDefect Double_t &   
 

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().

Bool_t Layer::RunSimulation   [inline]
 

Definition at line 40 of file lattice.h.

References runSimulation.

Referenced by MainFrame::HandleMenu(), MonteCarlo(), and MainFrame::SetInfoStatus().

void Layer::SetCurEnergy Double_t    e [inline]
 

Set the current energy.

Definition at line 48 of file lattice.h.

References curEnergy.

Referenced by MonteCarlo().

void Layer::SetFormula TEFormula   f [inline]
 

Set the TEFormula.

Definition at line 46 of file lattice.h.

References pEFormula.

Referenced by MainFrame::MainFrame().

void Layer::SetIntLimit Double_t    l [inline]
 

Set the cutoff for the periodic boundary conditions.

Definition at line 50 of file lattice.h.

References intLimit.

void Layer::SetLattice Int_t   ,
Int_t   ,
Int_t   ,
Double_t   
 

Setting a lattice.

Definition at line 45 of file layer.cpp.

References intLimit, kLHexagonal, kLSquare, pConfig, pLattice, and Configuration::SetInteractionLimit().

Referenced by LatticeDlg::DoButtons().

void Layer::StopSimulation   [inline]
 

Halt the simulation.

Definition at line 52 of file lattice.h.

References runSimulation.

void Layer::UndoMoveDefect  
 

Undo move.

Definition at line 90 of file layer.cpp.

References Lattice::GetAtoms(), newAtomIndex, oldAtomIndex, and pLattice.

Referenced by MonteCarlo().


Member Data Documentation

Double_t Layer::curEnergy [private]
 

The current systems energy

Definition at line 75 of file lattice.h.

Referenced by CompEnergy(), GetCurEnergy(), and SetCurEnergy().

Double_t Layer::intLimit [private]
 

The cutoff for the interaction range

Definition at line 74 of file lattice.h.

Referenced by CompEnergy(), CompPartEnergy(), SetIntLimit(), and SetLattice().

TThread* Layer::mcThread [private]
 

Thread executing MonteCarlo algorithm

Definition at line 81 of file lattice.h.

Referenced by Layer(), MonteCarloStart(), and MonteCarloStop().

Int_t Layer::newAtomIndex [private]
 

Definition at line 72 of file lattice.h.

Referenced by MoveDefect(), and UndoMoveDefect().

Int_t Layer::oldAtomIndex [private]
 

Definition at line 71 of file lattice.h.

Referenced by MoveDefect(), and UndoMoveDefect().

Configuration* Layer::pConfig [private]
 

The configuration object

Definition at line 80 of file lattice.h.

Referenced by GetBoltzConst(), GetConfig(), GetTemp(), Layer(), MonteCarlo(), and SetLattice().

TEFormula* Layer::pEFormula [private]
 

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().

TText* Layer::pInfoText [private]
 

Is drawn when the canvas is not up to date

Definition at line 78 of file lattice.h.

Referenced by Layer().

Lattice* Layer::pLattice [private]
 

The current lattice

Definition at line 76 of file lattice.h.

Referenced by CompEnergy(), CompPartEnergy(), GetLattice(), Layer(), MoveDefect(), SetLattice(), UndoMoveDefect(), and ~Layer().

MainFrame* Layer::pMainFrame [private]
 

Reference to the main gui

Definition at line 79 of file lattice.h.

Referenced by GetMainFrame(), Layer(), and MonteCarlo().

Bool_t Layer::runSimulation [private]
 

Definition at line 73 of file lattice.h.

Referenced by Layer(), MonteCarloStart(), MonteCarloStop(), RunSimulation(), and StopSimulation().


The documentation for this class was generated from the following files:
Generated on Sun Jun 16 20:08:06 2002 for XEIS by doxygen1.2.16