38 int main(
int argc,
char *argv[])
45 QDPIO::cout <<
"Linkage = " <<
linkageHack() << std::endl;
49 XMLReader paramtop(param_in,
"/LeapfrogTest");
51 multi1d<int> nrow(
Nd);
54 read(paramtop,
"nrow", nrow);
57 QDPIO::cerr <<
"Unable to read nrow from XML: " << e << std::endl;
61 Layout::setLattSize(nrow);
68 push(xml_out,
"t_leapfrog");
69 push(xml_log,
"t_leapfrog");
72 multi1d<int> boundary(
Nd);
78 read(paramtop,
"./GaugeStartup", cfg);
81 QDPIO::cerr <<
" Error reading XML " << e << std::endl;
85 multi1d<LatticeColorMatrix>
u(
Nd);
96 if( paramtop.count(
"./MonitorForces") == 1 ) {
100 QDPIO::cout <<
"MonitorForces is " <<
monitorForcesP << std::endl;
109 QDPIO::cout <<
"Failed to read monomials " << std::endl;
121 multi1d<LatticeColorMatrix>
p(
Nd);
130 QDPIO::cout <<
"create state" << std::endl;
136 QDPIO::cout <<
"exact ham" << std::endl;
141 QDPIO::cout <<
"fields" << std::endl;
146 QDPIO::cout <<
"mesE" << std::endl;
148 H.
mesE(gauge_state, KE_old, PE_old);
150 QDPIO::cout <<
"Initial energies: KE =" << KE_old <<
" PE = " << PE_old <<std::endl;
152 QDPIO::cout <<
"Copying copy list" << std::endl;
156 QDPIO::cout <<
"Performing trajectory" << std::endl;
157 QDP::StopWatch swatch;
163 double total_time = swatch.getTimeInSeconds();
164 QDPIO::cout <<
"Trajectory took: " << total_time <<
" sec" <<std::endl;
168 <<
" % of total" << std::endl;
170 QDPIO::cout <<
"Other force took: "
173 <<
" % of total" << std::endl;
177 <<
" % of total" << std::endl;
181 <<
" % of total" << std::endl;
185 <<
" % of total" << std::endl;
189 <<
" % of total " << std::endl;
193 <<
" % of total " << std::endl;
197 <<
" % of total " << std::endl;
199 double deficit = swatch.getTimeInSeconds()
208 QDPIO::cout <<
"Time deficit : " << deficit <<
" sec. "<< Real(100)*deficit/ total_time <<
" % of total" << std::endl;
210 QDPIO::cout <<
"Measuring final energies" << std::endl;
213 H.
mesE(gauge_state, KE_new, PE_new);
214 QDPIO::cout <<
"Final energies: KE =" << KE_new <<
" PE = " << PE_new <<std::endl;
217 Double deltaPE = PE_new - PE_old;
218 Double deltaKE = KE_new - KE_old;
220 QDPIO::cout <<
"DeltaPE = " << deltaPE << std::endl;
221 QDPIO::cout <<
"DeltaKE = " << deltaKE << std::endl;
223 QDPIO::cout <<
"DeltaE = " << deltaKE + deltaPE <<std::endl;
224 push(xml_log,
"DeltaE");
225 write(xml_log,
"DeltaKE", deltaKE);
226 write(xml_log,
"DeltaPE", deltaPE);
227 write(xml_log,
"DeltaH", (deltaKE+deltaPE));
Primary include file for CHROMA in application codes.
virtual void mesE(const AbsFieldState< P, Q > &s, Double &KE, Double &PE) const
The Exact Hamiltonian Class - supplies internal field refreshment and energy calculations.
void refreshInternalFields(const AbsFieldState< multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > &s)
Internal Field Refreshment.
void copyFields(void) const
Copy fields between the monomials of a copy list.
Real getTrajLength(void) const
Get the length of a trajectory.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
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.
void readNamedMonomialArray(XMLReader &xml, const std::string &path)
Read an array of named monomials from an XML reader. use factory to create the monomials and put them...
bool registerAll()
Register all the factories.
static bool monitorForcesP
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
double getFunctionsTime()
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
XMLFileWriter & getXMLLogInstance()
Get xml log instance.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
void setForceMonitoring(bool monitorP)
std::string getXMLInputFileName()
Get input file name.
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
FloatingPoint< double > Double
Gauge configuration structure.
Parameter structure for new Hamiltonian.
A Structure to hold the top level parameters.
int main(int argc, char *argv[])