4 int main(
int argc,
char *argv[])
10 const int nrow_arr[] = {4, 4, 4, 4};
11 multi1d<int> nrow(
Nd);
13 Layout::setLattSize(nrow);
16 multi1d<LatticeColorMatrix>
u(
Nd);
25 XMLFileWriter xml_out(
"./XMLDAT");
26 push(xml_out,
"t_gauge_force");
28 multi1d<LatticeColorMatrix>
p(
Nd);
32 typedef multi1d<LatticeColorMatrix>
P;
33 typedef multi1d<LatticeColorMatrix>
Q;
37 Real betaMC = Real(5.7);
40 multi1d<LatticeColorMatrix> dsdu_1(
Nd);
41 multi1d<LatticeColorMatrix> dsdu_2(
Nd);
47 S_g_MC.
deriv(dsdu_1, state1);
55 S_g_MC.
deriv(dsdu_2, state2);
58 push(xml_out,
"ForceDiff");
59 write(xml_out,
"S1", S1);
60 write(xml_out,
"S2", S2);
61 write(xml_out,
"S_diff", norm2(S1-S2));
74 Double sum_diff=norm2(dsdu_1[
mu] - adj(g)*dsdu_2[
mu]*g);
75 QDPIO::cout <<
"Mu = " <<
mu <<
" Sum Diff=" << sum_diff << std::endl;
77 push(xml_out,
"ForceDiff");
79 write(xml_out,
"dsdu1_norm", norm2(dsdu_1[
mu]));
80 write(xml_out,
"dsdu2_norm", norm2(dsdu_2[
mu]));
81 write(xml_out,
"dsdu_diff", sum_diff);
Primary include file for CHROMA in application codes.
Create a simple gauge connection state.
virtual GaugeState< P, Q > * createState(const Q &q) const
Given links, create the state.
Class for counted reference semantics.
void deriv(multi1d< LatticeColorMatrix > &result, const Handle< GaugeState< P, Q > > &state) const
Compute dS/dU.
Double S(const Handle< GaugeState< P, Q > > &state) const
Compute the actions.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void rgauge(multi1d< LatticeColorMatrix > &u, LatticeColorMatrix &g)
Do a random gauge transformation on the u fields.
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
multi1d< LatticeColorMatrix > P
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::Q Q
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
FloatingPoint< double > Double
Gauge configuration structure.
int main(int argc, char *argv[])
push(xml_out,"Cooled_Topology")