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

Lattice Class Reference

An abstract base class for different lattices. More...

#include <lattice.h>

Inheritance diagram for Lattice:

HexLattice SquareLattice List of all members.

Public Methods

 Lattice ()
 Lattice (Layer *pLayer, Int_t Nx, Int_t Ny, Double_t c)
virtual ~Lattice ()
virtual void CreateLattice ()=0
 Create the lattice in memory (atoms).

virtual AtomGetAtomNeighbor (Atom *)=0
 Getting a neighbor wich is not a defect.

Int_t GetAtomIndex (Atom *atom)
UChar_t GetAtomPos (Atom *atom)
UChar_t GetAtomType (Atom *atom)
Double_t GetCellSize ()
Double_t GetWidth ()
Double_t GetHeight ()
void SetBorderMode (Atom *, Atom *, UChar_t)
 Setting special behaviour for atoms.

void SetCornerMode (Atom *, Atom *, Atom *, Atom *, UChar_t)
void SetAtomType (Atom *atom, UChar_t type)
void SetInfo (Bool_t fl)
virtual void ShowLattice ()
 Draws every atom.

TObjArray * GetDefects ()
 Returning a pointer to the defects.

Atom ** GetAtoms ()
Int_t GetNAtoms ()
Int_t GetNUniqueAtoms ()
Int_t GetNUniqueDefects ()
void SetAtomStyle (Style_t, Size_t, Color_t)
 Setting the style of the atoms.

void SetDefectStyle (Style_t, Size_t, Color_t)
 Setting the style of the defects.

void RndInsertDefect ()
 random insert of defects

void RndRemoveDefect ()
 random remove of defects

void RemoveAllDefects ()
 Remove all defects.

Atom *& operator[] (Int_t i)
 Quick access to atoms over an index.


Protected Attributes

Int_t Nx
Int_t Ny
Int_t N
Int_t Nu
Int_t defCount
Int_t defArrayCount
Double_t c
LayerpLayer
Atom ** atoms
TObjArray * defects
Bool_t bInfo
Style_t atomShape
Style_t defectShape
Size_t atomSize
Size_t defectSize
Color_t atomColor
Color_t defectColor

Friends

class Atom

Detailed Description

An abstract base class for different lattices.

Definition at line 136 of file lattice.h.


Constructor & Destructor Documentation

Lattice::Lattice  
 

Definition at line 123 of file lattice.cpp.

References atomColor, atoms, atomShape, atomSize, bInfo, c, defArrayCount, defCount, defectColor, defects, defectShape, defectSize, N, Nu, Nx, Ny, and pLayer.

Lattice::Lattice Layer   pLayer,
Int_t    Nx,
Int_t    Ny,
Double_t    c
 

Definition at line 138 of file lattice.cpp.

References atomColor, atoms, atomShape, atomSize, bInfo, c, defArrayCount, defCount, defectColor, defects, defectShape, defectSize, Configuration::GetAtomColor(), Configuration::GetAtomShape(), Configuration::GetAtomSize(), Layer::GetConfig(), Configuration::GetDefectColor(), Configuration::GetDefectShape(), Configuration::GetDefectSize(), Nu, Nx, and Ny.

Lattice::~Lattice   [virtual]
 

Definition at line 160 of file lattice.cpp.

References atoms, defects, and N.


Member Function Documentation

virtual void Lattice::CreateLattice   [pure virtual]
 

Create the lattice in memory (atoms).

Implemented in SquareLattice, and HexLattice.

Int_t Lattice::GetAtomIndex Atom   atom [inline]
 

Definition at line 150 of file lattice.h.

References Atom::index.

Referenced by HexLattice::GetAtomNeighbor(), and SquareLattice::GetAtomNeighbor().

virtual Atom* Lattice::GetAtomNeighbor Atom   [pure virtual]
 

Getting a neighbor wich is not a defect.

Implemented in SquareLattice, and HexLattice.

Referenced by Layer::MoveDefect().

UChar_t Lattice::GetAtomPos Atom   atom [inline]
 

Definition at line 151 of file lattice.h.

References Atom::pos.

Referenced by HexLattice::GetAtomNeighbor(), and SquareLattice::GetAtomNeighbor().

Atom** Lattice::GetAtoms   [inline]
 

Definition at line 166 of file lattice.h.

References atoms.

Referenced by Layer::UndoMoveDefect().

UChar_t Lattice::GetAtomType Atom   atom [inline]
 

Definition at line 152 of file lattice.h.

References Atom::type.

Referenced by HexLattice::GetAtomNeighbor().

Double_t Lattice::GetCellSize   [inline]
 

Definition at line 153 of file lattice.h.

References c.

Referenced by MainFrame::HandleMenu(), and SimulationDialog::SimulationDialog().

TObjArray* Lattice::GetDefects   [inline]
 

Returning a pointer to the defects.

Definition at line 165 of file lattice.h.

References defects.

Referenced by Layer::CompEnergy(), Layer::CompPartEnergy(), and Layer::MoveDefect().

Double_t Lattice::GetHeight   [inline]
 

Definition at line 155 of file lattice.h.

References pLayer.

Referenced by SimulationDialog::SimulationDialog().

Int_t Lattice::GetNAtoms   [inline]
 

Definition at line 167 of file lattice.h.

References N.

Referenced by Layer::MoveDefect().

Int_t Lattice::GetNUniqueAtoms   [inline]
 

Definition at line 168 of file lattice.h.

References Nu.

Referenced by MainFrame::HandleMenu().

Int_t Lattice::GetNUniqueDefects   [inline]
 

Definition at line 169 of file lattice.h.

References defArrayCount.

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

Double_t Lattice::GetWidth   [inline]
 

Definition at line 154 of file lattice.h.

References pLayer.

Referenced by SimulationDialog::SimulationDialog().

Atom* & Lattice::operator[] Int_t    i [inline]
 

Quick access to atoms over an index.

Definition at line 181 of file lattice.h.

void Lattice::RemoveAllDefects  
 

Remove all defects.

Definition at line 258 of file lattice.cpp.

References defects, and pLayer.

Referenced by MainFrame::HandleMenu().

void Lattice::RndInsertDefect  
 

random insert of defects

Definition at line 235 of file lattice.cpp.

References atoms, Atom::bDefect, defCount, Atom::InsertDefect(), and N.

Referenced by MainFrame::HandleMenu().

void Lattice::RndRemoveDefect  
 

random remove of defects

Definition at line 248 of file lattice.cpp.

References defCount, and defects.

Referenced by MainFrame::HandleMenu().

void Lattice::SetAtomStyle Style_t   ,
Size_t   ,
Color_t   
 

Setting the style of the atoms.

Definition at line 196 of file lattice.cpp.

References atomColor, atoms, atomShape, atomSize, N, and pLayer.

Referenced by SimulationDialog::DoCancel(), and SimulationDialog::DoTabButtons().

void Lattice::SetAtomType Atom   atom,
UChar_t    type
[inline]
 

Definition at line 159 of file lattice.h.

References Atom::type.

Referenced by HexLattice::CreateLattice().

void Lattice::SetBorderMode Atom  ,
Atom  ,
UChar_t   
 

Setting special behaviour for atoms.

Definition at line 171 of file lattice.cpp.

References Atom::bBorderAtom, Atom::linkedAtom, and Atom::pos.

Referenced by HexLattice::CreateLattice(), and SquareLattice::CreateLattice().

void Lattice::SetCornerMode Atom  ,
Atom  ,
Atom  ,
Atom  ,
UChar_t   
 

Definition at line 178 of file lattice.cpp.

References Atom::bCornerAtom, Atom::linkedAtoms, and Atom::pos.

Referenced by SquareLattice::CreateLattice().

void Lattice::SetDefectStyle Style_t   ,
Size_t   ,
Color_t   
 

Setting the style of the defects.

Definition at line 214 of file lattice.cpp.

References defectColor, defects, defectShape, defectSize, and pLayer.

Referenced by SimulationDialog::DoCancel(), and SimulationDialog::DoTabButtons().

void Lattice::SetInfo Bool_t    fl [inline]
 

Definition at line 160 of file lattice.h.

References bInfo.

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

void Lattice::ShowLattice   [virtual]
 

Draws every atom.

Definition at line 188 of file lattice.cpp.

References atoms, N, and pLayer.

Referenced by HexLattice::HexLattice(), and SquareLattice::SquareLattice().


Friends And Related Function Documentation

friend class Atom [friend]
 

Definition at line 139 of file lattice.h.

Referenced by HexLattice::CreateLattice(), and SquareLattice::CreateLattice().


Member Data Documentation

Color_t Lattice::atomColor [protected]
 

Definition at line 199 of file lattice.h.

Referenced by Lattice(), Atom::RemoveDefect(), and SetAtomStyle().

Atom** Lattice::atoms [protected]
 

All atoms, which build the lattice

Definition at line 192 of file lattice.h.

Referenced by HexLattice::CreateLattice(), SquareLattice::CreateLattice(), HexLattice::GetAtomNeighbor(), SquareLattice::GetAtomNeighbor(), GetAtoms(), Lattice(), RndInsertDefect(), SetAtomStyle(), ShowLattice(), and ~Lattice().

Style_t Lattice::atomShape [protected]
 

Definition at line 195 of file lattice.h.

Referenced by Atom::Atom(), Lattice(), Atom::RemoveDefect(), and SetAtomStyle().

Size_t Lattice::atomSize [protected]
 

Definition at line 197 of file lattice.h.

Referenced by Atom::Atom(), Lattice(), Atom::RemoveDefect(), and SetAtomStyle().

Bool_t Lattice::bInfo [protected]
 

update the defect number in info panel?

Definition at line 194 of file lattice.h.

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

Double_t Lattice::c [protected]
 

Typical size parameter for one cell

Definition at line 190 of file lattice.h.

Referenced by HexLattice::CreateLattice(), SquareLattice::CreateLattice(), GetCellSize(), HexLattice::HexLattice(), Lattice(), and SquareLattice::SquareLattice().

Int_t Lattice::defArrayCount [protected]
 

Number of unique defects

Definition at line 189 of file lattice.h.

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

Int_t Lattice::defCount [protected]
 

Number of drawn defects

Definition at line 188 of file lattice.h.

Referenced by Atom::InsertDefect(), Lattice(), Atom::RemoveDefect(), RndInsertDefect(), and RndRemoveDefect().

Color_t Lattice::defectColor [protected]
 

Definition at line 200 of file lattice.h.

Referenced by Atom::InsertDefect(), Lattice(), and SetDefectStyle().

TObjArray* Lattice::defects [protected]
 

All defects, for faster calculation

Definition at line 193 of file lattice.h.

Referenced by HexLattice::CreateLattice(), SquareLattice::CreateLattice(), GetDefects(), Atom::InsertDefect(), Lattice(), RemoveAllDefects(), Atom::RemoveDefect(), RndRemoveDefect(), SetDefectStyle(), and ~Lattice().

Style_t Lattice::defectShape [protected]
 

Definition at line 196 of file lattice.h.

Referenced by Atom::InsertDefect(), Lattice(), and SetDefectStyle().

Size_t Lattice::defectSize [protected]
 

Definition at line 198 of file lattice.h.

Referenced by Atom::InsertDefect(), Lattice(), and SetDefectStyle().

Int_t Lattice::N [protected]
 

Total number of atoms

Definition at line 186 of file lattice.h.

Referenced by HexLattice::CreateLattice(), SquareLattice::CreateLattice(), HexLattice::GetAtomNeighbor(), SquareLattice::GetAtomNeighbor(), GetNAtoms(), HexLattice::HexLattice(), Lattice(), RndInsertDefect(), SetAtomStyle(), ShowLattice(), SquareLattice::SquareLattice(), and ~Lattice().

Int_t Lattice::Nu [protected]
 

Number of unique atoms

Definition at line 187 of file lattice.h.

Referenced by GetNUniqueAtoms(), HexLattice::HexLattice(), Lattice(), and SquareLattice::SquareLattice().

Int_t Lattice::Nx [protected]
 

Number of cells in x direction

Definition at line 184 of file lattice.h.

Referenced by HexLattice::CreateLattice(), SquareLattice::CreateLattice(), HexLattice::GetAtomNeighbor(), SquareLattice::GetAtomNeighbor(), HexLattice::HexLattice(), Lattice(), and SquareLattice::SquareLattice().

Int_t Lattice::Ny [protected]
 

Number of cells in y direction

Definition at line 185 of file lattice.h.

Referenced by HexLattice::CreateLattice(), SquareLattice::CreateLattice(), HexLattice::HexLattice(), Lattice(), and SquareLattice::SquareLattice().

Layer* Lattice::pLayer [protected]
 

The layer, on which the lattice is drawn

Definition at line 191 of file lattice.h.

Referenced by Atom::CompPartEnergy(), GetHeight(), GetWidth(), Atom::InsertDefect(), Lattice(), RemoveAllDefects(), Atom::RemoveDefect(), SetAtomStyle(), SetDefectStyle(), and ShowLattice().


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