]> git.treefish.org Git - phys/heatbath.git/commitdiff
Made algorithm names more meaningful.
authorAlexander Schmidt <alex@treefish.org>
Thu, 14 Nov 2013 19:05:04 +0000 (20:05 +0100)
committerAlexander Schmidt <alex@treefish.org>
Thu, 14 Nov 2013 19:05:04 +0000 (20:05 +0100)
.gitignore
CMakeLists.txt
heatbath.cpp
sim-1mr.hpp [new file with mode: 0644]
sim-heatless.hpp [deleted file]
sim-nor.hpp [new file with mode: 0644]
sim-r.hpp [new file with mode: 0644]
sim-relaxedheat.hpp [deleted file]
sim-usualheat.hpp [deleted file]

index abf17c14d1e687afa97506ef0f004826db74b014..356965eb01ab7b0417ce7c809098f77c95ce0a7b 100644 (file)
@@ -1,10 +1,9 @@
 *~
-heatbath
 cmake_install.cmake
 Makefile
 CMakeCache.txt
 CMakeFiles
 data
-heatbath-heatless
-heatbath-relaxedheat
-heatbath-usualheat
+heatbath-nor
+heatbath-1mr
+heatbath-r
index c90e8c9f399cca71796c1e925bbf648f8cb45f3d..1840155ff5dc9d0170dda831b232d6d07bd3fc65 100644 (file)
@@ -11,14 +11,14 @@ SET(CMAKE_BUILD_TYPE Release)
 
 add_subdirectory(latlib)
 
-add_executable(heatbath-heatless heatbath.cpp)
-set_target_properties(heatbath-heatless PROPERTIES COMPILE_DEFINITIONS "HEATLESS_ALGORITHM")
-target_link_libraries(heatbath-heatless o815 gsl gslcblas lat_neigh)
+add_executable(heatbath-nor heatbath.cpp)
+set_target_properties(heatbath-nor PROPERTIES COMPILE_DEFINITIONS "ALGORITHM_NOR")
+target_link_libraries(heatbath-nor o815 gsl gslcblas lat_neigh)
 
-add_executable(heatbath-usualheat heatbath.cpp)
-set_target_properties(heatbath-usualheat PROPERTIES COMPILE_DEFINITIONS "USUALHEAT_ALGORITHM")
-target_link_libraries(heatbath-usualheat o815 gsl gslcblas lat_neigh)
+add_executable(heatbath-r heatbath.cpp)
+set_target_properties(heatbath-r PROPERTIES COMPILE_DEFINITIONS "ALGORITHM_R")
+target_link_libraries(heatbath-r o815 gsl gslcblas lat_neigh)
 
-add_executable(heatbath-relaxedheat heatbath.cpp)
-set_target_properties(heatbath-relaxedheat PROPERTIES COMPILE_DEFINITIONS "RELAXEDHEAT_ALGORITHM")
-target_link_libraries(heatbath-relaxedheat o815 gsl gslcblas lat_neigh)
+add_executable(heatbath-1mr heatbath.cpp)
+set_target_properties(heatbath-1mr PROPERTIES COMPILE_DEFINITIONS "ALGORITHM_1MR")
+target_link_libraries(heatbath-1mr o815 gsl gslcblas lat_neigh)
index e6a7803c3c93ab828170f99df2e12fbc160d9ef9..dbfe63ae7aa2bd0f52455d22a951fe212e87418b 100644 (file)
@@ -2,15 +2,15 @@
 
 #include "latlib/o815/o815.h"
 
-#ifdef HEATLESS_ALGORITHM
-#define ALGORITHM "heatless"
-#include "sim-heatless.hpp"
-#elif USUALHEAT_ALGORITHM
-#define ALGORITHM "usualheat"
-#include "sim-usualheat.hpp"
-#elif RELAXEDHEAT_ALGORITHM
-#define ALGORITHM "relaxedheat"
-#include "sim-relaxedheat.hpp"
+#ifdef ALGORITHM_NOR
+#define ALGORITHM "nor"
+#include "sim-nor.hpp"
+#elif ALGORITHM_R
+#define ALGORITHM "r"
+#include "sim-r.hpp"
+#elif ALGORITHM_1MR
+#define ALGORITHM "1mr"
+#include "sim-1mr.hpp"
 #else
 #error NO UPDATE-ALGORITHM DEFINED!
 #endif
diff --git a/sim-1mr.hpp b/sim-1mr.hpp
new file mode 100644 (file)
index 0000000..aa305ff
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef SIM_HPP
+#define SIM_HPP
+
+#include <gsl/gsl_rng.h>
+#include <complex>
+#include <math.h>
+
+#include "latlib/neigh.h"
+
+class sim : public o815::sim {
+public:
+  struct siteconf {
+    complex<double> phi;
+  };
+  sim(o815 *_O815);
+  siteconf* conf;
+  unsigned int LSIZE2;
+
+private:
+  void _makeSweep();
+  void _newParas();
+
+  gsl_rng* rangsl;
+
+  neigh *nb;
+
+  void updatePhi (const int& x);
+};
+
+
+
+sim::sim(o815 *_O815) : o815::sim( _O815, 
+                                  sizeof(siteconf)*
+                                  (_O815->comargs.lsize[0]*_O815->comargs.lsize[1]) ) {
+  conf = (siteconf*)confMem;
+
+  rangsl = gsl_rng_alloc(gsl_rng_ranlxs0);
+  gsl_rng_set(rangsl, time(NULL));
+
+  LSIZE2 = _O815->comargs.lsize[0] * _O815->comargs.lsize[1];
+
+  nb = new neigh(2, _O815->comargs.lsize[0], _O815->comargs.lsize[1]);
+}
+
+void sim::updatePhi (const int& x) 
+{
+  const double r = gsl_rng_uniform(rangsl);
+  const double theta = gsl_rng_uniform(rangsl) * 2*M_PI;
+}
+
+void sim::_makeSweep() {  
+}
+
+void sim::_newParas() {
+  /* reset variables */
+}
+
+#endif
diff --git a/sim-heatless.hpp b/sim-heatless.hpp
deleted file mode 100644 (file)
index aa305ff..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef SIM_HPP
-#define SIM_HPP
-
-#include <gsl/gsl_rng.h>
-#include <complex>
-#include <math.h>
-
-#include "latlib/neigh.h"
-
-class sim : public o815::sim {
-public:
-  struct siteconf {
-    complex<double> phi;
-  };
-  sim(o815 *_O815);
-  siteconf* conf;
-  unsigned int LSIZE2;
-
-private:
-  void _makeSweep();
-  void _newParas();
-
-  gsl_rng* rangsl;
-
-  neigh *nb;
-
-  void updatePhi (const int& x);
-};
-
-
-
-sim::sim(o815 *_O815) : o815::sim( _O815, 
-                                  sizeof(siteconf)*
-                                  (_O815->comargs.lsize[0]*_O815->comargs.lsize[1]) ) {
-  conf = (siteconf*)confMem;
-
-  rangsl = gsl_rng_alloc(gsl_rng_ranlxs0);
-  gsl_rng_set(rangsl, time(NULL));
-
-  LSIZE2 = _O815->comargs.lsize[0] * _O815->comargs.lsize[1];
-
-  nb = new neigh(2, _O815->comargs.lsize[0], _O815->comargs.lsize[1]);
-}
-
-void sim::updatePhi (const int& x) 
-{
-  const double r = gsl_rng_uniform(rangsl);
-  const double theta = gsl_rng_uniform(rangsl) * 2*M_PI;
-}
-
-void sim::_makeSweep() {  
-}
-
-void sim::_newParas() {
-  /* reset variables */
-}
-
-#endif
diff --git a/sim-nor.hpp b/sim-nor.hpp
new file mode 100644 (file)
index 0000000..aa305ff
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef SIM_HPP
+#define SIM_HPP
+
+#include <gsl/gsl_rng.h>
+#include <complex>
+#include <math.h>
+
+#include "latlib/neigh.h"
+
+class sim : public o815::sim {
+public:
+  struct siteconf {
+    complex<double> phi;
+  };
+  sim(o815 *_O815);
+  siteconf* conf;
+  unsigned int LSIZE2;
+
+private:
+  void _makeSweep();
+  void _newParas();
+
+  gsl_rng* rangsl;
+
+  neigh *nb;
+
+  void updatePhi (const int& x);
+};
+
+
+
+sim::sim(o815 *_O815) : o815::sim( _O815, 
+                                  sizeof(siteconf)*
+                                  (_O815->comargs.lsize[0]*_O815->comargs.lsize[1]) ) {
+  conf = (siteconf*)confMem;
+
+  rangsl = gsl_rng_alloc(gsl_rng_ranlxs0);
+  gsl_rng_set(rangsl, time(NULL));
+
+  LSIZE2 = _O815->comargs.lsize[0] * _O815->comargs.lsize[1];
+
+  nb = new neigh(2, _O815->comargs.lsize[0], _O815->comargs.lsize[1]);
+}
+
+void sim::updatePhi (const int& x) 
+{
+  const double r = gsl_rng_uniform(rangsl);
+  const double theta = gsl_rng_uniform(rangsl) * 2*M_PI;
+}
+
+void sim::_makeSweep() {  
+}
+
+void sim::_newParas() {
+  /* reset variables */
+}
+
+#endif
diff --git a/sim-r.hpp b/sim-r.hpp
new file mode 100644 (file)
index 0000000..aa305ff
--- /dev/null
+++ b/sim-r.hpp
@@ -0,0 +1,58 @@
+#ifndef SIM_HPP
+#define SIM_HPP
+
+#include <gsl/gsl_rng.h>
+#include <complex>
+#include <math.h>
+
+#include "latlib/neigh.h"
+
+class sim : public o815::sim {
+public:
+  struct siteconf {
+    complex<double> phi;
+  };
+  sim(o815 *_O815);
+  siteconf* conf;
+  unsigned int LSIZE2;
+
+private:
+  void _makeSweep();
+  void _newParas();
+
+  gsl_rng* rangsl;
+
+  neigh *nb;
+
+  void updatePhi (const int& x);
+};
+
+
+
+sim::sim(o815 *_O815) : o815::sim( _O815, 
+                                  sizeof(siteconf)*
+                                  (_O815->comargs.lsize[0]*_O815->comargs.lsize[1]) ) {
+  conf = (siteconf*)confMem;
+
+  rangsl = gsl_rng_alloc(gsl_rng_ranlxs0);
+  gsl_rng_set(rangsl, time(NULL));
+
+  LSIZE2 = _O815->comargs.lsize[0] * _O815->comargs.lsize[1];
+
+  nb = new neigh(2, _O815->comargs.lsize[0], _O815->comargs.lsize[1]);
+}
+
+void sim::updatePhi (const int& x) 
+{
+  const double r = gsl_rng_uniform(rangsl);
+  const double theta = gsl_rng_uniform(rangsl) * 2*M_PI;
+}
+
+void sim::_makeSweep() {  
+}
+
+void sim::_newParas() {
+  /* reset variables */
+}
+
+#endif
diff --git a/sim-relaxedheat.hpp b/sim-relaxedheat.hpp
deleted file mode 100644 (file)
index aa305ff..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef SIM_HPP
-#define SIM_HPP
-
-#include <gsl/gsl_rng.h>
-#include <complex>
-#include <math.h>
-
-#include "latlib/neigh.h"
-
-class sim : public o815::sim {
-public:
-  struct siteconf {
-    complex<double> phi;
-  };
-  sim(o815 *_O815);
-  siteconf* conf;
-  unsigned int LSIZE2;
-
-private:
-  void _makeSweep();
-  void _newParas();
-
-  gsl_rng* rangsl;
-
-  neigh *nb;
-
-  void updatePhi (const int& x);
-};
-
-
-
-sim::sim(o815 *_O815) : o815::sim( _O815, 
-                                  sizeof(siteconf)*
-                                  (_O815->comargs.lsize[0]*_O815->comargs.lsize[1]) ) {
-  conf = (siteconf*)confMem;
-
-  rangsl = gsl_rng_alloc(gsl_rng_ranlxs0);
-  gsl_rng_set(rangsl, time(NULL));
-
-  LSIZE2 = _O815->comargs.lsize[0] * _O815->comargs.lsize[1];
-
-  nb = new neigh(2, _O815->comargs.lsize[0], _O815->comargs.lsize[1]);
-}
-
-void sim::updatePhi (const int& x) 
-{
-  const double r = gsl_rng_uniform(rangsl);
-  const double theta = gsl_rng_uniform(rangsl) * 2*M_PI;
-}
-
-void sim::_makeSweep() {  
-}
-
-void sim::_newParas() {
-  /* reset variables */
-}
-
-#endif
diff --git a/sim-usualheat.hpp b/sim-usualheat.hpp
deleted file mode 100644 (file)
index aa305ff..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef SIM_HPP
-#define SIM_HPP
-
-#include <gsl/gsl_rng.h>
-#include <complex>
-#include <math.h>
-
-#include "latlib/neigh.h"
-
-class sim : public o815::sim {
-public:
-  struct siteconf {
-    complex<double> phi;
-  };
-  sim(o815 *_O815);
-  siteconf* conf;
-  unsigned int LSIZE2;
-
-private:
-  void _makeSweep();
-  void _newParas();
-
-  gsl_rng* rangsl;
-
-  neigh *nb;
-
-  void updatePhi (const int& x);
-};
-
-
-
-sim::sim(o815 *_O815) : o815::sim( _O815, 
-                                  sizeof(siteconf)*
-                                  (_O815->comargs.lsize[0]*_O815->comargs.lsize[1]) ) {
-  conf = (siteconf*)confMem;
-
-  rangsl = gsl_rng_alloc(gsl_rng_ranlxs0);
-  gsl_rng_set(rangsl, time(NULL));
-
-  LSIZE2 = _O815->comargs.lsize[0] * _O815->comargs.lsize[1];
-
-  nb = new neigh(2, _O815->comargs.lsize[0], _O815->comargs.lsize[1]);
-}
-
-void sim::updatePhi (const int& x) 
-{
-  const double r = gsl_rng_uniform(rangsl);
-  const double theta = gsl_rng_uniform(rangsl) * 2*M_PI;
-}
-
-void sim::_makeSweep() {  
-}
-
-void sim::_newParas() {
-  /* reset variables */
-}
-
-#endif