8 int main(
int argc,
char *argv[])
14 const int nrow_arr[] = {4, 4, 4, 4};
15 multi1d<int> nrow(
Nd);
17 Layout::setLattSize(nrow);
20 multi1d<LatticeColorMatrix>
u(
Nd);
30 multi1d<LatticeColorMatrix>
p(
Nd);
44 Real betaMC = Real(5.7);
45 Real betaMD = Real(5.7);
55 ExactPureGaugeHamiltonian H_MC(S_pg_MC);
56 ExactPureGaugeHamiltonian H_MD(S_pg_MD);
59 PureGaugeSympUpdates leaps(H_MD);
63 XMLFileWriter lf_xml(
"./LEAPFROG_TESTS");
64 push(lf_xml,
"LeapFrogTests");
68 for(Real dtau=0.01; toBool(dtau < 0.2); dtau +=Real(0.01)) {
70 PureGaugePQPLeapFrog lf(leaps, dtau, tau);
71 PureGaugeFieldState old_state(
p,
u);
72 PureGaugeFieldState working_state(
p,
u);
75 H_MD.mesE(working_state, KE_old, PE_old);
78 lf(working_state, lf_xml);
81 H_MD.mesE(working_state, KE_new, PE_new);
85 working_state.getP()[
mu] *= Real(-1);
90 lf(working_state, lf_xml);
94 working_state.getP()[
mu] *= Real(-1);
98 H_MD.mesE(working_state, KE_new2, PE_new2);
100 Double deltaKE = KE_new - KE_old;
101 Double deltaPE = PE_new - PE_old;
102 Double deltaH = deltaKE + deltaPE;
103 Double ddKE = KE_new2 - KE_old;
104 Double ddPE = PE_new2 - PE_old;
107 push(lf_xml,
"elem");
108 write(lf_xml,
"tau", tau);
109 write(lf_xml,
"dt", dtau);
110 write(lf_xml,
"delH", deltaH);
111 write(lf_xml,
"delKE", deltaKE);
112 write(lf_xml,
"delPE", deltaPE);
113 write(lf_xml,
"delDelH", ddH);
114 write(lf_xml,
"ddPE", ddPE);
115 write(lf_xml,
"ddKE", ddKE);
118 QDPIO::cout <<
" dt = " << dtau <<
" deltaH = " << deltaH << std::endl;
119 QDPIO::cout <<
" delta KE = " << deltaKE
120 <<
" delta PE = " << deltaPE
121 <<
" dPE/dKE = " << deltaPE/deltaKE << std::endl;
123 QDPIO::cout <<
" delta delta H = " << ddH
124 <<
" delta delta KE = " << ddKE
125 <<
" delta delta PE = " << ddPE<< std::endl << std::endl;
134 PureGaugePQPLeapFrog leapfrog(leaps,
dt, tau);
138 PureGaugeHMCTraj
HMC(H_MC, leapfrog);
140 XMLFileWriter monitorHMC(
"HMC");
141 push(monitorHMC,
"HMCTest");
142 PureGaugeFieldState mc_state(
p,
u);
146 for(
int i=0;
i < 100000;
i++) {
149 HMC(mc_state,
true, monitorHMC);
152 push(monitorHMC,
"Measurements");
155 write(monitorHMC,
"HMCtraj",
HMC.getTrajNum()-1);
163 QDPIO::cout <<
"Traj: " <<
HMC.getTrajNum()-1 <<
" w_plaq = " <<
w_plaq << std::endl;
Primary include file for CHROMA in application codes.
Class for counted reference semantics.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void taproj(LatticeColorMatrix &a)
Take the traceless antihermitian projection of a color matrix.
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
FloatingPoint< double > Double
Gauge configuration structure.
int main(int argc, char *argv[])