add_subdirectory(latlib)
-add_executable(heatbath heatbath.cc)
+add_executable(heatbath heatbath.cpp)
#set_target_properties(phi4iso-local PROPERTIES COMPILE_DEFINITIONS "LOCAL_UPDATE_ALGORITHM")
-target_link_libraries(heatbath o815)
+target_link_libraries(heatbath o815 gsl gslcblas lat_neigh)
+++ /dev/null
-int main (int argc, char *argv[])
-{
-
- return 0;
-}
--- /dev/null
+#include "latlib/o815/o815.h"
+
+#include "sim.hpp"
+
+o815 *O815;
+sim *Sim;
+
+o815::comoption specOps[] = {
+ { "mass", required_argument, NULL, 'm', "set mass", "min:max:inc" },
+ { "", 0, NULL, 0, "", "" }
+};
+
+void parseSpecOps()
+{
+ for (int isopt = 0; isopt < O815->parsedSpecOps.size(); isopt++)
+ switch(O815->parsedSpecOps[isopt].first) {
+ case 'm':
+ O815->paraQ->addRange("mass", O815->parsedSpecOps[isopt].second);
+ break;
+ }
+}
+
+void helpHeader()
+{
+ cout << "Usage: ./heatbath [OPTIONS] [obs1] ... [obsN]" << endl << endl;
+}
+
+int main (int argc, char *argv[])
+{
+ O815 = new o815(argc, argv, "heatbath", specOps, &helpHeader);
+
+ O815->addPara("mass", 1);
+
+ parseSpecOps();
+
+ O815->postParaInit();
+
+ O815->Sim = new sim(O815);
+
+ //parseLonelyArgs();
+
+ O815->mainLoop();
+
+ delete O815;
+ return 0;
+}
-Subproject commit 2918744d037d9254538dd84311aa346576e0fe04
+Subproject commit a2b065a04a23009d81caab4ce169497b042b352b
--- /dev/null
+#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