4 #include "latlib/o815/o815.h"
11 //const complex<double> _i_ = complex<double>(0.0,1.0);
13 #include "obs_phi2.hpp"
14 #include "obs_plaq.hpp"
15 #include "obs_corrphiphi.hpp"
16 #include "obs_corrchichi.hpp"
17 #include "obs_corrphichi.hpp"
18 #include "obs_corrphi.hpp"
19 #include "obs_corrchi.hpp"
20 #include "obs_corriso10.hpp"
21 #include "obs_corriso00.hpp"
22 #include "obs_corrtetra.hpp"
23 #include "obs_diagcorr.hpp"
25 o815::comoption specOps[] = {
26 { "kappaone", required_argument, NULL, 'r', "set inverse mass kappa_1", "min:max:inc" },
27 { "kappatwo", required_argument, NULL, 's', "set inverse mass kappa_2", "min:max:inc" },
28 { "beta", required_argument, NULL, 'b', "set inverse gauge coupling beta", "min:max:inc" },
29 { "lambdaone", required_argument, NULL, 'p', "set quartic coupling lambda_1", "min:max:inc" },
30 { "lambdatwo", required_argument, NULL, 'q', "set quartic coupling lambda_2", "min:max:inc" },
31 { "kappa", required_argument, NULL, 'k', "set kappa_1 = kappa_2 = kappa", "min:max:inc" },
32 { "lambda", required_argument, NULL, 'l', "set lambda_1 = lambda_2 = lambda", "min:max:inc" },
33 { "", 0, NULL, 0, "", "" }
38 for (int isopt = 0; isopt < O815->parsedSpecOps.size(); isopt++)
39 switch(O815->parsedSpecOps[isopt].first) {
41 O815->paraQ->addRange("kappaone", O815->parsedSpecOps[isopt].second);
44 O815->paraQ->addRange("kappatwo", O815->parsedSpecOps[isopt].second);
47 O815->paraQ->addRange("beta", O815->parsedSpecOps[isopt].second);
50 O815->paraQ->addRange("lambdaone", O815->parsedSpecOps[isopt].second);
53 O815->paraQ->addRange("lambdatwo", O815->parsedSpecOps[isopt].second);
56 O815->paraQ->addRange("lambdaone", O815->parsedSpecOps[isopt].second);
57 O815->paraQ->linkParas("lambdatwo", "lambdaone");
60 O815->paraQ->addRange("kappaone", O815->parsedSpecOps[isopt].second);
61 O815->paraQ->linkParas("kappatwo", "kappaone");
68 cout << "Usage: ./u1casc-ordinary [OPTIONS] [obs1] ... [obsN]" << endl << endl;
71 void parseLonelyArgs()
73 for (vector<char*>::iterator lonit = O815->lonelyArgs.begin(); lonit != O815->lonelyArgs.end(); ++lonit) {
74 if ( strcmp(*lonit, "phi2") == 0 ) {
75 *O815->out->log << "MASTER: registered observable: phi2" << endl << flush;
76 O815->observables.push_back(new obs_phi2(O815));
78 else if ( strcmp(*lonit, "plaq") == 0 ) {
79 *O815->out->log << "MASTER: registered observable: plaq" << endl << flush;
80 O815->observables.push_back(new obs_plaq(O815));
82 else if ( strcmp(*lonit, "corrphiphi") == 0 ) {
83 *O815->out->log << "MASTER: registered observable: corrphiphi" << endl << flush;
84 O815->observables.push_back(new obs_corrphiphi(O815));
86 else if ( strcmp(*lonit, "corrchichi") == 0 ) {
87 *O815->out->log << "MASTER: registered observable: corrchichi" << endl << flush;
88 O815->observables.push_back(new obs_corrchichi(O815));
90 else if ( strcmp(*lonit, "corrphichi") == 0 ) {
91 *O815->out->log << "MASTER: registered observable: corrphichi" << endl << flush;
92 O815->observables.push_back(new obs_corrphichi(O815));
94 else if ( strcmp(*lonit, "corrphi") == 0 ) {
95 *O815->out->log << "MASTER: registered observable: corrphi" << endl << flush;
96 O815->observables.push_back(new obs_corrphi(O815));
98 else if ( strcmp(*lonit, "corrchi") == 0 ) {
99 *O815->out->log << "MASTER: registered observable: corrchi" << endl << flush;
100 O815->observables.push_back(new obs_corrchi(O815));
102 else if ( strcmp(*lonit, "corriso10") == 0 ) {
103 *O815->out->log << "MASTER: registered observable: corriso10" << endl << flush;
104 O815->observables.push_back(new obs_corriso10(O815));
106 else if ( strcmp(*lonit, "corriso00") == 0 ) {
107 *O815->out->log << "MASTER: registered observable: corriso00" << endl << flush;
108 O815->observables.push_back(new obs_corriso00(O815));
110 else if ( strcmp(*lonit, "corrtetra") == 0 ) {
111 *O815->out->log << "MASTER: registered observable: corrtetra" << endl << flush;
112 O815->observables.push_back(new obs_corrtetra(O815));
114 else if ( strcmp(*lonit, "diagcorr") == 0 ) {
115 *O815->out->log << "MASTER: registered observable: diagcorr" << endl << flush;
116 O815->observables.push_back(new obs_diagcorr(O815));
121 int main (int argc, char *argv[])
123 O815 = new o815(argc, argv, "u1casc-ordinary", specOps, &helpHeader);
125 O815->addPara("beta", 1);
126 O815->addPara("lambdaone", 1);
127 O815->addPara("lambdatwo", 1);
128 O815->addPara("kappaone", 1);
129 O815->addPara("kappatwo", 1);
132 O815->postParaInit();
133 O815->Sim = new sim(O815);