]> git.treefish.org Git - phys/heatbath.git/blobdiff - sim.hpp
Setup o815 skeleton.
[phys/heatbath.git] / sim.hpp
diff --git a/sim.hpp b/sim.hpp
new file mode 100644 (file)
index 0000000..e58c70d
--- /dev/null
+++ b/sim.hpp
@@ -0,0 +1,46 @@
+#ifndef SIM_HPP
+#define SIM_HPP
+
+#include <gsl/gsl_rng.h>
+
+#include "latlib/neigh.h"
+
+class sim : public o815::sim {
+public:
+  struct siteconf {
+    int k[2][4];
+    int l[2][4];
+  };
+  sim(o815 *_O815);
+  siteconf* conf;
+  int LSIZE4;
+
+private:
+  void _makeSweep();
+  void _newParas();
+
+  gsl_rng* rangsl;
+
+  neigh *nb;
+};
+
+sim::sim(o815 *_O815) : o815::sim( _O815, 
+                                  sizeof(siteconf)*
+                                  (_O815->comargs.lsize[0]*_O815->comargs.lsize[0]*_O815->comargs.lsize[0]*_O815->comargs.lsize[1]) ) {
+  conf = (siteconf*)confMem;
+  LSIZE4 = _O815->comargs.lsize[0] * _O815->comargs.lsize[0] * _O815->comargs.lsize[0] * _O815->comargs.lsize[1];
+
+  rangsl = gsl_rng_alloc(gsl_rng_ranlxs0);
+  gsl_rng_set(rangsl, time(NULL));
+
+  nb = new neigh(4, _O815->comargs.lsize[0], _O815->comargs.lsize[0], _O815->comargs.lsize[0], _O815->comargs.lsize[1]);
+}
+
+void sim::_makeSweep() {  
+}
+
+void sim::_newParas() {
+  /* reset variables */
+}
+
+#endif