diff --git a/triqs/mc_tools/mc_basic_step.hpp b/triqs/mc_tools/mc_basic_step.hpp index e0d42778..d767cc78 100644 --- a/triqs/mc_tools/mc_basic_step.hpp +++ b/triqs/mc_tools/mc_basic_step.hpp @@ -26,26 +26,34 @@ #include #include "mc_move_set.hpp" -namespace triqs { namespace mc_tools { namespace Step { +namespace triqs { +namespace mc_tools { + namespace Step { - // Performs one Metropolis step - template - struct Metropolis { - static void do_it (move_set & MoveGroup, random_generator & RNG, MCSignType & signe){ - double r = MoveGroup.attempt(); - if (RNG() < std::min(1.0,r)) { - signe *= MoveGroup.accept(); -#ifdef DEBUG - std::cerr<<" Metropolis sign = "<< signe < struct Metropolis { + static void do_it(move_set& MoveGroup, random_generator& RNG, MCSignType& signe) { + double r = MoveGroup.attempt(); + if (RNG() < std::min(1.0, r)) { +#ifdef TRIQS_MCTOOLS_DEBUG + std::cerr << " Move accepted " << std::endl; #endif + signe *= MoveGroup.accept(); +#ifdef TRIQS_MCTOOLS_DEBUG + std::cerr << " New sign = " << signe << std::endl; +#endif + } else { +#ifdef TRIQS_MCTOOLS_DEBUG + std::cerr << " Move rejected " << std::endl; +#endif + MoveGroup.reject(); } - else MoveGroup.reject(); } }; - // Put heat Bath here .... - -}}} + // Put heat Bath here .... + } +} +} #endif -