3 #error "THIS CODE IS NOT READY YET"
38 XMLReader inputtop(xml, path);
49 XMLReader inputtop(xml, path);
58 read(inputtop,
"Cfg", input.
cfg);
65 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
80 int main(
int argc,
char **argv)
83 QDP_initialize(&argc, &argv);
91 XMLReader xml_in(
"DATA");
94 read(xml_in,
"/seqsource", input);
97 Layout::setLattSize(input.
param.nrow);
101 QDPIO::cout << std::endl <<
" Gauge group: SU(" << Nc <<
")" << std::endl;
103 QDPIO::cout <<
" Computing sequential source of type "
104 << input.
param.source_type << std::endl;
106 QDPIO::cout <<
" Volume: " << input.
param.nrow[0];
107 for (
int i=1;
i<
Nd; ++
i) {
108 QDPIO::cout <<
" x " << input.
param.nrow[
i];
110 QDPIO::cout << std::endl;
114 multi1d<LatticeColorMatrix>
u(
Nd);
115 XMLReader gauge_file_xml, gauge_xml;
121 XMLFileWriter xml_out(
"XMLDAT");
122 push(xml_out,
"seqsource");
127 write(xml_out,
"Input", xml_in);
130 write(xml_out,
"Config_info", gauge_xml);
132 push(xml_out,
"Output_version");
133 write(xml_out,
"out_version", 1);
146 push(xml_out,
"Observables");
159 LatticePropagator quark_propagator;
161 PropSource_t source_header;
163 XMLReader prop_file_xml, prop_record_xml;
165 QDPIO::cout <<
"Attempt to read forward propagator" << std::endl;
167 prop_record_xml, quark_propagator,
169 QDPIO::cout <<
"Forward propagator successfully read" << std::endl;
176 read(prop_record_xml,
"/Propagator/PropSource", source_header);
180 QDPIO::cerr <<
"Error extracting forward_prop header: " << e << std::endl;
185 write(xml_out,
"Propagator_info", prop_record_xml);
189 int j_decay = source_header.j_decay;
191 multi1d<int>
t_source = source_header.t_source;
199 multi1d<Double> forward_prop_corr = sumMulti(localNorm2(quark_propagator),
202 push(xml_out,
"Forward_prop_correlator");
203 write(xml_out,
"forward_prop_corr", forward_prop_corr);
212 LatticePropagator quark_prop_src =
zero;
213 LatticePropagator quark_prop_tmp;
214 LatticeColorMatrix uu;
215 multi1d<LatticeColorMatrix> ua(
Nd);
219 multi1d<int> size = input.
param.nrow;
224 for (
int i=0;
i<size[0]; ++
i) {
225 for (
int j=0;
j<size[1]; ++
j) {
226 for (
int k=0;
k<size[2]; ++
k) {
227 for (
int l=0;
l<size[3]; ++
l) {
253 alocr = (float) (
l*
l);
255 alocr=alocr*10.0*6.2831852/(size[2]*size[3]);
256 alocr=alocr*10.0*6.2831852/(size[2]*size[3]);
257 alocr=alocr*(-0.5000000);
262 aloc = cmplx(alocr,aloci);
284 for (
int elem=0; elem<Nc; ++elem) {
287 pokeColor(ua[2],
a, elem, elem);
295 for (
int j=0;
j<
Nd; ++
j) {
298 quark_prop_tmp = quark_prop_src;
299 quark_prop_src = quark_prop_tmp - uu*shift(quark_propagator,
FORWARD,
j);
300 quark_prop_tmp = quark_prop_src;
301 quark_prop_src = quark_prop_tmp + uu*(Gamma(
i)*shift(quark_propagator,
FORWARD,
j));
302 quark_prop_tmp = quark_prop_src;
303 quark_prop_src = quark_prop_tmp - adj(shift(uu,
BACKWARD,
j))*shift(quark_propagator,
BACKWARD,
j);
304 quark_prop_tmp = quark_prop_src;
305 quark_prop_src = quark_prop_tmp - adj(shift(uu,
BACKWARD,
j))*(Gamma(
i)*shift(quark_propagator,
BACKWARD,
j));
311 quark_prop_tmp = quark_prop_src;
319 quark_prop_src = factor*quark_prop_tmp;
329 multi1d<Double> seqsource_corr = sumMulti(localNorm2(quark_prop_src),
332 push(xml_out,
"SeqSource_correlator");
333 write(xml_out,
"seqsource_corr", seqsource_corr);
342 XMLBufferWriter file_xml;
343 push(file_xml,
"make_source");
347 XMLBufferWriter record_xml;
348 push(record_xml,
"MakeSource");
350 write(record_xml,
"Config_info", gauge_xml);
354 writeQprop(file_xml, record_xml, quark_prop_src,
358 QDPIO::cout <<
"Sequential source successfully written" << std::endl;
Primary include file for CHROMA in application codes.
Fourier transform phase factor support.
const Set & getSet() const
The set to be used in sumMulti.
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 unitarityCheck(const multi1d< LatticeColorMatrixF3 > &u)
Check the unitarity of color matrix in SU(N)
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
std::string uniqueId()
Return a unique id.
void proginfo(XMLWriter &xml)
Print out basic information about this program.
ForwardProp_t prop_header
int main(int argc, char **argv)
Sequential source generation.
multi1d< int > coords(const int x, const int y, const int z, const int t)
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void readQprop(XMLReader &file_xml, XMLReader &record_xml, LatticePropagator &quark_prop, const std::string &file, QDP_serialparallel_t serpar)
Read a Chroma propagator.
void writeQprop(XMLBufferWriter &file_xml, XMLBufferWriter &record_xml, const LatticePropagator &quark_prop, const std::string &file, QDP_volfmt_t volfmt, QDP_serialparallel_t serpar)
Write a Chroma propagator.
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
FloatingPoint< double > Double
Gauge configuration structure.
std::string seqsource_file
QDP_volfmt_t seqsource_volfmt