X-Git-Url: http://git.treefish.org/~alex/phys/heatbath.git/blobdiff_plain/e3ebeafe796b180ecf26b7b5c8ac7281467b68db..c721fd42d0e3b23e8aa84d998bc8d97e5d8dfc2d:/heatbath.cpp?ds=sidebyside diff --git a/heatbath.cpp b/heatbath.cpp new file mode 100644 index 0000000..70e2140 --- /dev/null +++ b/heatbath.cpp @@ -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; +}