78 XMLReader inputtop(xml, path);
89 XMLReader inputtop(xml, path);
103 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
114 XMLReader paramtop(inputtop,
"param");
126 QDPIO::cerr <<
"Input parameter version " << input.
io_version.
version <<
" unsupported." << std::endl;
132 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
140 XMLReader paramtop(inputtop,
"param");
144 read(paramtop,
"FermTypeP", ferm_type_str);
145 if (ferm_type_str ==
"STAGGERED") {
155 QDPIO::cout <<
" PROPAGATOR: Propagator for Staggered fermions" << std::endl;
179 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
187 read(inputtop,
"Cfg", input.
cfg);
192 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
213 read(xml, path, src_name);
214 if (src_name ==
"LOCAL_SRC")
216 QDPIO::cout <<
"****> LOCAL SOURCE <****" << std::endl;
219 else if (src_name ==
"GAUGE_INVAR_LOCAL_SOURCE")
221 QDPIO::cout <<
"****> GAUGE INVARIANT LOCAL SOURCE <****" << std::endl;
224 else if (src_name ==
"FUZZED_SRC")
226 QDPIO::cout <<
"***> FUZZED SOURCE ****" << std::endl;
232 QDPIO::cerr <<
"src_name " << src_name <<
" out of range " << std::endl;
238 QDPIO::cerr <<
"Error reading data: " << e << std::endl;
249 LatticeStaggeredPropagator & quark_propagator,
250 XMLFileWriter & xml_out,
255 LatticeStaggeredPropagator & quark_propagator_a,
256 LatticeStaggeredPropagator & quark_propagator_b,
257 LatticeStaggeredPropagator & quark_propagator_c,
258 XMLFileWriter & xml_out,
265 multi1d<LatticeColorMatrix> &
u ,
266 multi1d<LatticeColorMatrix> & u_smr,
268 XMLFileWriter & xml_out,
271 int src_ind,
int color_source) ;
275 XMLFileWriter &xml_out,
int fuzz_width ) ;
287 int main(
int argc,
char **argv)
301 xml_in.open(in_name);
305 QDPIO::cerr <<
"Error reading input file " << in_name << std::endl;
306 QDPIO::cerr <<
"The input file name can be passed via the -i flag " << std::endl;
307 QDPIO::cerr <<
"The default name is ./DATA" << std::endl;
313 read(xml_in,
"/propagator", input);
320 multi1d<LatticeColorMatrix>
u(
Nd);
322 XMLReader gauge_file_xml, gauge_xml;
329 read(xml_in,
"/propagator/param/fuzz_width",fuzz_width );
333 QDPIO::cerr <<
"Error reading fuzzing width " << e << std::endl;
336 QDPIO::cout <<
"fuzz width = " << fuzz_width << std::endl;
339 bool use_gauge_invar_oper ;
340 use_gauge_invar_oper = false ;
341 read(xml_in,
"/propagator/param/use_gauge_invar_oper",use_gauge_invar_oper );
349 bool do_gauge_transform ;
350 do_gauge_transform = false ;
351 read(xml_in,
"/propagator/param/do_gauge_transform",do_gauge_transform );
353 if( do_gauge_transform )
356 multi1d<LatticeColorMatrix> u_trans(
Nd);
359 LatticeColorMatrix v ;
364 for(
int dir = 0 ; dir <
Nd ; ++dir)
366 u_trans[dir] = v*
u[dir]*adj(shift(v,
FORWARD,dir)) ;
367 u[dir] = u_trans[dir] ;
370 QDPIO::cout <<
"Random gauge transform done" << std::endl;
378 push(xml_out,
"fuzzed_hadron_corr");
381 write(xml_out,
"Input", xml_in);
384 write(xml_out,
"Config_info", gauge_xml);
387 push(xml_out,
"Output_version");
388 write(xml_out,
"out_version", 1);
397 MesPlq(xml_out,
"Observables",
u);
404 if( ! use_gauge_invar_oper )
406 QDPIO::cout <<
"Starting Coulomb gauge fixing" << std::endl;
408 QDPIO::cout <<
"No. of gauge fixing iterations =" << n_gf << std::endl;
415 multi1d<LatticeColorMatrix> u_smr(
Nd);
418 QDPIO::cout <<
"Starting to APE smear the gauge configuration" << std::endl;
424 Real BlkAccu = 1.0e-5;
427 for(
int i=0;
i < sm_numb; ++
i)
429 multi1d<LatticeColorMatrix> u_tmp(
Nd);
435 u_tmp[
mu] = u_smr[
mu];
447 MesPlq(xml_out,
"Observables",
u);
464 XMLBufferWriter xml_buf;
466 XMLReader xml_in(xml_buf);
467 inv_param =
readXMLGroup(xml_in,
"/InvertParam",
"invType");
478 LatticeStaggeredPropagator quark_propagator_Lsink_Lsrc;
479 LatticeStaggeredPropagator quark_propagator_Fsink_Lsrc;
480 LatticeStaggeredPropagator quark_propagator_Lsink_Fsrc;
481 LatticeStaggeredPropagator quark_propagator_Fsink_Fsrc;
485 LatticeStaggeredFermion
psi ;
486 LatticeStaggeredFermion psi_fuzz;
490 QDPIO::cout <<
"Source time slice = " <<
t_source << std::endl;
499 QDPIO::cout <<
"LOCAL INVERSIONS" << std::endl;
501 for(
int color_source = 0; color_source < Nc; ++color_source)
505 const int src_ind = 0 ;
507 u, u_smr, qprop, xml_out,
511 src_ind, color_source) ;
524 FermToProp(psi_fuzz, quark_propagator_Fsink_Lsrc, color_source);
537 QDPIO::cout <<
"FUZZED SOURCE INVERSIONS" << std::endl;
539 for(
int color_source = 0; color_source < Nc; ++color_source)
543 const int src_ind = 0 ;
545 u, u_smr, qprop, xml_out,
549 src_ind, color_source) ;
562 FermToProp(psi_fuzz, quark_propagator_Fsink_Fsrc, color_source);
574 push(xml_out,
"baryon_correlators");
579 push(xml_out,
"smearing_info");
591 quark_propagator_Lsink_Lsrc,
592 quark_propagator_Lsink_Lsrc,
598 b_tag =
"srcLLL_sinkFLL_nucleon" ;
600 quark_propagator_Fsink_Lsrc,
601 quark_propagator_Lsink_Lsrc,
602 quark_propagator_Lsink_Lsrc,
606 b_tag =
"srcFLL_sinkLLL_nucleon" ;
608 quark_propagator_Lsink_Fsrc,
609 quark_propagator_Lsink_Lsrc,
610 quark_propagator_Lsink_Lsrc,
614 b_tag =
"srcFLL_sinkFLL_nucleon" ;
616 quark_propagator_Fsink_Fsrc,
617 quark_propagator_Lsink_Lsrc,
618 quark_propagator_Lsink_Lsrc,
626 b_tag =
"srcLLL_sinkFFL_nucleon" ;
628 quark_propagator_Fsink_Lsrc,
629 quark_propagator_Fsink_Lsrc,
630 quark_propagator_Lsink_Lsrc,
634 b_tag =
"srcFFL_sinkLLL_nucleon" ;
636 quark_propagator_Lsink_Fsrc,
637 quark_propagator_Lsink_Fsrc,
638 quark_propagator_Lsink_Lsrc,
642 b_tag =
"srcFFL_sinkFFL_nucleon" ;
644 quark_propagator_Fsink_Fsrc,
645 quark_propagator_Fsink_Fsrc,
646 quark_propagator_Lsink_Lsrc,
653 b_tag =
"srcLLL_sinkFFF_nucleon" ;
655 quark_propagator_Fsink_Lsrc,
656 quark_propagator_Fsink_Lsrc,
657 quark_propagator_Fsink_Lsrc,
661 b_tag =
"srcFFF_sinkLLL_nucleon" ;
663 quark_propagator_Lsink_Fsrc,
664 quark_propagator_Lsink_Fsrc,
665 quark_propagator_Lsink_Fsrc,
669 b_tag =
"srcFFF_sinkFFF_nucleon" ;
671 quark_propagator_Fsink_Fsrc,
672 quark_propagator_Fsink_Fsrc,
673 quark_propagator_Fsink_Fsrc,
688 QDPIO::cout <<
"CHROMA_RUN_COMPLETE " << std::endl;
698 LatticeStaggeredPropagator & quark_propagator,
699 XMLFileWriter & xml_out,
706 multi1d<Complex> barprop(tlength) ;
725 LatticeStaggeredPropagator & quark_propagator_a,
726 LatticeStaggeredPropagator & quark_propagator_b,
727 LatticeStaggeredPropagator & quark_propagator_c,
728 XMLFileWriter & xml_out,
735 multi1d<Complex> barprop(tlength) ;
737 baryon_s(quark_propagator_a,quark_propagator_b,quark_propagator_c,
750 multi1d<LatticeColorMatrix> &
u ,
751 multi1d<LatticeColorMatrix> & u_smr,
753 XMLFileWriter & xml_out,
756 int src_ind,
int color_source)
758 LatticeStaggeredFermion q_source ;
759 LatticeStaggeredFermion q_source_fuzz ;
762 QDPIO::cout <<
"Inversion for Color = " << color_source << std::endl;
784 q_source_fuzz = q_source ;
801 q_source = q_source_fuzz ;
816 double time_in_sec = swatch.getTimeInSeconds();
819 ncg_had += res.n_count;
824 push(xml_out,
"Qprop");
825 write(xml_out,
"Staggered_src_tag" , src_ind);
829 write(xml_out,
"time_in_sec",time_in_sec );
840 XMLFileWriter &xml_out,
int fuzz_width )
844 push(xml_out,
"smearing_basis");
848 {
write(xml_out,
"source_type",
"LOCAL_SRC"); }
850 {
write(xml_out,
"source_type",
"GAUGE_INVAR_LOCAL_SOURCE"); }
853 write(xml_out,
"source_type",
"FUZZED_SRC");
854 write(xml_out,
"fuzzed_width", fuzz_width);
Primary include file for CHROMA in application codes.
Asqtad staggered fermion action.
Class for counted reference semantics.
Concrete class for all gauge actions with simple boundary conditions.
void FermToProp(const LatticeFermionF &a, LatticePropagatorF &b, int color_index, int spin_index)
Insert a LatticeFermion into a LatticePropagator.
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.
void coulGauge(multi1d< LatticeColorMatrix > &u, int &n_gf, int j_decay, const Real &GFAccu, int GFMax, bool OrDo, const Real &OrPara)
Coulomb (and Landau) gauge fixing.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
void APE_Smear(const multi1d< LatticeColorMatrix > &u, LatticeColorMatrix &u_smear, int mu, int bl_level, const Real &sm_fact, const Real &BlkAccu, int BlkMax, int j_decay)
Construct APE smeared links from:
void fuzz_smear(const multi1d< LatticeColorMatrix > &ufuzz, const T &psi, T &psifuzz, int length, int j_decay)
apply a fuzz_smear operator to a lattice field
void srcfil(LatticeFermion &a, const multi1d< int > &coord, int color_index, int spin_index)
Fill a specific color and spin index with 1.0.
const std::string name
Name to be used.
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > const multi1d< Real > enum InvType invType const multi1d< Real > & RsdCG
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
static multi1d< LatticeColorMatrix > u
void baryon_s(LatticeStaggeredPropagator &quark_propagator_in, multi1d< Complex > &barprop, multi1d< int > &t_source, int j_decay, int bc_spec)
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
LatticeStaggeredPropagator shiftDeltaPropCov(multi1d< int > &delta, const LatticeStaggeredPropagator &src, multi1d< LatticeColorMatrix > u, bool sym_flag)
void reunit(LatticeColorMatrixF3 &xa)
std::string getXMLInputFileName()
Get input file name.
void PropIndexTodelta(int src_index, multi1d< int > &delta)
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
const WilsonTypeFermAct< multi1d< LatticeFermion > > & S_f
MesPlq(u, w_plaq, s_plaq, t_plaq, link)
Gauge configuration structure.
Hold group xml and type id.
Holds return info from SystemSolver call.
Parameters for running program.
SysSolverCGParams invParam
stag_src_type get_stag_src(XMLReader &xml, const std::string &path)
void read(XMLReader &xml, const std::string &path, Prop_t &input)
int main(int argc, char **argv)
stag_src_enum stag_src_type
int ks_compute_quark_propagator(LatticeStaggeredFermion &psi, stag_src_type type_of_src, int fuzz_width, multi1d< LatticeColorMatrix > &u, multi1d< LatticeColorMatrix > &u_smr, Handle< const SystemSolver< LatticeStaggeredFermion > > &qprop, XMLFileWriter &xml_out, Real RsdCG, Real Mass, int j_decay, int src_ind, int color_source)
@ GAUGE_INVAR_LOCAL_SOURCE
void ks_compute_baryon(std::string name, LatticeStaggeredPropagator &quark_propagator, XMLFileWriter &xml_out, int j_decay, int tlength)
void write_smearing_info(std::string name, stag_src_type type_of_src, XMLFileWriter &xml_out, int fuzz_width)
push(xml_out,"Cooled_Topology")