]> git.treefish.org Git - phys/heatbath.git/commitdiff
Added 0 algorithms.
authorAlexander Schmidt <alex@treefish.org>
Thu, 28 Nov 2013 08:23:55 +0000 (09:23 +0100)
committerAlexander Schmidt <alex@treefish.org>
Thu, 28 Nov 2013 08:23:55 +0000 (09:23 +0100)
.gitignore
CMakeLists.txt
heatbath.cpp
sim-nonmetro.hpp

index 8e579720db0f0a4121a451016f12c7fe6363f719..50f1688a013ba5e08b7dd363280125766a9a13be 100644 (file)
@@ -9,3 +9,7 @@ heatbath-AhbMor
 heatbath-AorMor
 heatbath-AorMhb
 heatbath-metro
 heatbath-AorMor
 heatbath-AorMhb
 heatbath-metro
+heatbath-A0Mhb
+heatbath-A0Mor
+heatbath-AhbM0
+heatbath-AorM0
index d631271a5e48697199ceb89112455e5c010ecc3e..c07148c14309253ff7d05f802e5220f960987d50 100644 (file)
@@ -35,3 +35,19 @@ target_link_libraries(heatbath-AorMhb o815 gsl gslcblas lat_neigh)
 add_executable(heatbath-AorMor heatbath.cpp)
 set_target_properties(heatbath-AorMor PROPERTIES COMPILE_DEFINITIONS "ALGORITHM_AORMOR")
 target_link_libraries(heatbath-AorMor o815 gsl gslcblas lat_neigh)
 add_executable(heatbath-AorMor heatbath.cpp)
 set_target_properties(heatbath-AorMor PROPERTIES COMPILE_DEFINITIONS "ALGORITHM_AORMOR")
 target_link_libraries(heatbath-AorMor o815 gsl gslcblas lat_neigh)
+
+add_executable(heatbath-AorM0 heatbath.cpp)
+set_target_properties(heatbath-AorM0 PROPERTIES COMPILE_DEFINITIONS "ALGORITHM_AORM0")
+target_link_libraries(heatbath-AorM0 o815 gsl gslcblas lat_neigh)
+
+add_executable(heatbath-AhbM0 heatbath.cpp)
+set_target_properties(heatbath-AhbM0 PROPERTIES COMPILE_DEFINITIONS "ALGORITHM_AHBM0")
+target_link_libraries(heatbath-AhbM0 o815 gsl gslcblas lat_neigh)
+
+add_executable(heatbath-A0Mor heatbath.cpp)
+set_target_properties(heatbath-A0Mor PROPERTIES COMPILE_DEFINITIONS "ALGORITHM_A0MOR")
+target_link_libraries(heatbath-A0Mor o815 gsl gslcblas lat_neigh)
+
+add_executable(heatbath-A0Mhb heatbath.cpp)
+set_target_properties(heatbath-A0Mhb PROPERTIES COMPILE_DEFINITIONS "ALGORITHM_A0MHB")
+target_link_libraries(heatbath-A0Mhb o815 gsl gslcblas lat_neigh)
index 9744b3304206bef8e913ded9c644c237d1a69f61..8464a05a02afba8d7a6e963e974417df3403c0a6 100644 (file)
 #elif ALGORITHM_AORMOR
 #include "sim-nonmetro.hpp"
 #define ALGORITHM "AorMor"
 #elif ALGORITHM_AORMOR
 #include "sim-nonmetro.hpp"
 #define ALGORITHM "AorMor"
+#elif ALGORITHM_AORM0
+#include "sim-nonmetro.hpp"
+#define ALGORITHM "AorM0"
+#elif ALGORITHM_AHBM0
+#include "sim-nonmetro.hpp"
+#define ALGORITHM "AhbM0"
+#elif ALGORITHM_A0MOR
+#include "sim-nonmetro.hpp"
+#define ALGORITHM "A0Mor"
+#elif ALGORITHM_A0MHB
+#include "sim-nonmetro.hpp"
+#define ALGORITHM "A0Mhb"
 #else
 #error NO UPDATE-ALGORITHM DEFINED!
 #endif
 #else
 #error NO UPDATE-ALGORITHM DEFINED!
 #endif
index 9eb818b93f1f2dd08567378252a3a25f9f9f5d36..064a7bbb8fd77e8d5d3a9289c7aa17de0a4117c1 100644 (file)
@@ -53,18 +53,18 @@ void sim::updatePhi (const int& x)
   for (int nu=0; nu<4; nu++)
     V += conf[ (*nb)[x*4+nu] ].phi;
 
   for (int nu=0; nu<4; nu++)
     V += conf[ (*nb)[x*4+nu] ].phi;
 
-#if defined(ALGORITHM_AHBMHB) || defined(ALGORITHM_AHBMOR)
+#if defined(ALGORITHM_AHBMHB) || defined(ALGORITHM_AHBMOR) || defined(ALGORITHM_AHBM0)
   Y = polar( abs(Y), gsl_rng_uniform(rangsl) * 2*M_PI );
   Y = polar( abs(Y), gsl_rng_uniform(rangsl) * 2*M_PI );
-#elif defined(ALGORITHM_AORMHB) || defined(ALGORITHM_AORMOR)
+#elif defined(ALGORITHM_AORMHB) || defined(ALGORITHM_AORMOR) || defined(ALGORITHM_AORM0)
   const double V2diff = pow(real(V), 2) - pow(imag(V), 2);
   const double Vprod = real(V)*imag(V);
   Y = complex<double> ( + real(Y) * V2diff + 2 * imag(Y) * Vprod,
                        - imag(Y) * V2diff + 2 * real(Y) * Vprod ) / norm(V);
 #endif
   
   const double V2diff = pow(real(V), 2) - pow(imag(V), 2);
   const double Vprod = real(V)*imag(V);
   Y = complex<double> ( + real(Y) * V2diff + 2 * imag(Y) * Vprod,
                        - imag(Y) * V2diff + 2 * real(Y) * Vprod ) / norm(V);
 #endif
   
-#if defined(ALGORITHM_AHBMHB) || defined(ALGORITHM_AORMHB)
+#if defined(ALGORITHM_AHBMHB) || defined(ALGORITHM_AORMHB) || defined(ALGORITHM_A0MHB)
   Y = polar( magnYOfR( gsl_rng_uniform(rangsl) ), arg(Y) );
   Y = polar( magnYOfR( gsl_rng_uniform(rangsl) ), arg(Y) );
-#elif defined(ALGORITHM_AHBMOR) || defined(ALGORITHM_AORMOR)
+#elif defined(ALGORITHM_AHBMOR) || defined(ALGORITHM_AORMOR) || defined(ALGORITHM_A0MOR)
   Y = polar( magnYOfR( 1 - exp(-norm(Y)) ), arg(Y) ); //!!!!
 #endif
 }
   Y = polar( magnYOfR( 1 - exp(-norm(Y)) ), arg(Y) ); //!!!!
 #endif
 }