00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef METROPOLIS_HPP
00020 #define METROPOLIS_HPP
00021
00022 #include "Arrhenius.hpp"
00023 #include "Lattice.hpp"
00024
00026 namespace Algorithms {
00027
00050 class Metropolis {
00051 public:
00056 Metropolis(Surface::Lattice::iterator first,
00057 Surface::Lattice::iterator last,
00058 const Interactions::TwoBody::Geometry& neighbors):
00059 first_(first), last_(last),
00060 neighbors_(neighbors), species_(Surface::Species("Any species", 0))
00061 { };
00062
00068 Metropolis(Surface::Lattice::iterator first,
00069 Surface::Lattice::iterator last,
00070 const Interactions::TwoBody::Geometry& neighbors,
00071 const Surface::Species species):
00072 first_(first), last_(last),
00073 neighbors_(neighbors), species_(species)
00074 { };
00075
00077 void operator()() const;
00078
00079 private:
00080
00081 Surface::Site* get_origin() const;
00082
00083 Surface::Site* get_destination(const Surface::Site* origin_ptr) const;
00084
00085 Surface::Lattice::iterator first_, last_;
00086
00087 Interactions::TwoBody::Geometry neighbors_;
00088
00089 Surface::Species species_;
00090 };
00091
00092 }
00093
00094 #endif