4 #include "latlib/o815/o815.h"
11 #include "obs_phi2.hpp"
12 #include "obs_plaq.hpp"
13 //#include "obs_corr.hpp"
15 o815::comoption specOps[] = {
16 { "kappaone", required_argument, NULL, 'r', "set inverse mass kappa_1", "min:max:inc" },
17 { "kappatwo", required_argument, NULL, 's', "set inverse mass kappa_2", "min:max:inc" },
18 { "beta", required_argument, NULL, 'b', "set inverse gauge coupling beta", "min:max:inc" },
19 { "lambdaone", required_argument, NULL, 'p', "set quartic coupling lambda_1", "min:max:inc" },
20 { "lambdatwo", required_argument, NULL, 'q', "set quartic coupling lambda_2", "min:max:inc" },
21 { "kappa", required_argument, NULL, 'k', "set kappa_1 = kappa_2 = kappa", "min:max:inc" },
22 { "lambda", required_argument, NULL, 'l', "set lambda_1 = lambda_2 = lambda", "min:max:inc" },
23 { "muone", required_argument, NULL, 'n', "set chemical potential mu_1", "min:max:inc" },
24 { "mutwo", required_argument, NULL, 'u', "set chemical potential mu_2", "min:max:inc" },
25 { "mu", required_argument, NULL, 'm', "set mu_1 = mu_2 = mu", "min:max:inc" },
26 { "", 0, NULL, 0, "", "" }
31 for (int isopt = 0; isopt < O815->parsedSpecOps.size(); isopt++)
32 switch(O815->parsedSpecOps[isopt].first) {
34 O815->paraQ->addRange("kappaone", O815->parsedSpecOps[isopt].second);
37 O815->paraQ->addRange("kappatwo", O815->parsedSpecOps[isopt].second);
40 O815->paraQ->addRange("beta", O815->parsedSpecOps[isopt].second);
43 O815->paraQ->addRange("lambdaone", O815->parsedSpecOps[isopt].second);
46 O815->paraQ->addRange("lambdatwo", O815->parsedSpecOps[isopt].second);
49 O815->paraQ->addRange("lambdaone", O815->parsedSpecOps[isopt].second);
50 O815->paraQ->linkParas("lambdatwo", "lambdaone");
53 O815->paraQ->addRange("kappaone", O815->parsedSpecOps[isopt].second);
54 O815->paraQ->linkParas("kappatwo", "kappaone");
57 O815->paraQ->addRange("muone", O815->parsedSpecOps[isopt].second);
58 O815->paraQ->linkParas("mutwo", "muone");
61 O815->paraQ->addRange("muone", O815->parsedSpecOps[isopt].second);
64 O815->paraQ->addRange("mutwo", O815->parsedSpecOps[isopt].second);
71 cout << "Usage: ./u1casc-flux [OPTIONS] [obs1] ... [obsN]" << endl << endl;
74 void parseLonelyArgs()
76 for (vector<char*>::iterator lonit = O815->lonelyArgs.begin(); lonit != O815->lonelyArgs.end(); ++lonit) {
77 if ( strcmp(*lonit, "phi2") == 0 ) {
78 *O815->out->log << "MASTER: registered observable: phi2" << endl << flush;
79 O815->observables.push_back(new obs_phi2(O815));
81 else if ( strcmp(*lonit, "plaq") == 0 ) {
82 *O815->out->log << "MASTER: registered observable: plaq" << endl << flush;
83 O815->observables.push_back(new obs_plaq(O815));
86 else if ( strcmp(*lonit, "corr") == 0 ) {
87 *O815->out->log << "MASTER: registered observable: corr" << endl << flush;
88 O815->observables.push_back(new obs_corr(O815));
94 int main (int argc, char *argv[])
96 O815 = new o815(argc, argv, "u1casc-flux", specOps, &helpHeader);
98 O815->addPara("beta", 1);
99 O815->addPara("lambdaone", 1);
100 O815->addPara("lambdatwo", 1);
101 O815->addPara("kappaone", 1);
102 O815->addPara("kappatwo", 1);
103 O815->addPara("muone", 0);
104 O815->addPara("mutwo", 0);
107 O815->postParaInit();
108 O815->Sim = new sim(O815);