]> git.treefish.org Git - phys/heatbath.git/blobdiff - heatbath.cpp
Setup o815 skeleton.
[phys/heatbath.git] / heatbath.cpp
diff --git a/heatbath.cpp b/heatbath.cpp
new file mode 100644 (file)
index 0000000..70e2140
--- /dev/null
@@ -0,0 +1,46 @@
+#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;
+}