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) ;
283 int main(
int argc,
char **argv)
297 xml_in.open(in_name);
301 QDPIO::cerr <<
"Error reading input file " << in_name << std::endl;
302 QDPIO::cerr <<
"The input file name can be passed via the -i flag " << std::endl;
303 QDPIO::cerr <<
"The default name is ./DATA" << std::endl;
309 read(xml_in,
"/propagator", input);
316 multi1d<LatticeColorMatrix>
u(
Nd);
318 XMLReader gauge_file_xml, gauge_xml;
330 read(xml_in,
"/propagator/param/fuzz_width",fuzz_width );
334 QDPIO::cerr <<
"Error reading fuzzing width " << e << std::endl;
339 QDPIO::cout <<
"fuzz width = " << fuzz_width << std::endl;
343 bool use_gauge_invar_oper ;
344 use_gauge_invar_oper = false ;
345 read(xml_in,
"/propagator/param/use_gauge_invar_oper",use_gauge_invar_oper );
353 bool do_gauge_transform ;
354 do_gauge_transform = false ;
355 read(xml_in,
"/propagator/param/do_gauge_transform",do_gauge_transform );
357 if( do_gauge_transform )
360 multi1d<LatticeColorMatrix> u_trans(
Nd);
363 LatticeColorMatrix v ;
368 for(
int dir = 0 ; dir <
Nd ; ++dir)
370 u_trans[dir] = v*
u[dir]*adj(shift(v,
FORWARD,dir)) ;
371 u[dir] = u_trans[dir] ;
374 QDPIO::cout <<
"Random gauge transform done" << std::endl;
382 push(xml_out,
"fuzzed_hadron_corr");
385 write(xml_out,
"Input", xml_in);
388 write(xml_out,
"Config_info", gauge_xml);
391 push(xml_out,
"Output_version");
392 write(xml_out,
"out_version", 1);
401 MesPlq(xml_out,
"Observables",
u);
408 if( ! use_gauge_invar_oper )
410 QDPIO::cout <<
"Starting Coulomb gauge fixing" << std::endl;
412 QDPIO::cout <<
"No. of gauge fixing iterations =" << n_gf << std::endl;
419 multi1d<LatticeColorMatrix> u_smr(
Nd);
423 QDPIO::cout <<
"Starting to APE smear the gauge configuration" << std::endl;
429 Real BlkAccu = 1.0e-5;
432 for(
int i=0;
i < sm_numb; ++
i)
434 multi1d<LatticeColorMatrix> u_tmp(
Nd);
440 u_tmp[
mu] = u_smr[
mu];
452 MesPlq(xml_out,
"Observables",
u);
469 XMLBufferWriter xml_buf;
471 XMLReader xml_in(xml_buf);
472 inv_param =
readXMLGroup(xml_in,
"/InvertParam",
"invType");
483 LatticeStaggeredPropagator quark_propagator;
484 XMLBufferWriter xml_buf;
488 LatticeStaggeredFermion
psi;
489 multi1d<LatticeStaggeredPropagator> stag_prop(8);
493 for(
int src_ind = 0; src_ind < 8; ++src_ind)
494 stag_prop[src_ind] =
zero ;
499 QDPIO::cout <<
"Source time slice = " <<
t_source << std::endl;
503 for(
int src_ind = 0; src_ind < 1 ; ++src_ind){
506 for(
int color_source = 0; color_source < Nc; ++color_source)
511 u, u_smr, qprop, xml_out,
515 src_ind, color_source) ;
524 stag_prop[src_ind] = quark_propagator;
528 push(xml_out,
"Hadrons_from_time_source");
531 {
write(xml_out,
"source_type",
"LOCAL_SRC"); }
533 {
write(xml_out,
"source_type",
"GAUGE_INVAR_LOCAL_SOURCE"); }
536 write(xml_out,
"source_type",
"FUZZED_SRC");
537 write(xml_out,
"fuzzed_width", fuzz_width);
544 write(xml_out,
"use_gauge_invar_oper", use_gauge_invar_oper);
545 if( use_gauge_invar_oper )
547 std::cout <<
"Using gauge invariant operators " << std::endl ;
548 pseudoscalar.use_gauge_invar() ;
552 std::cout <<
"Using NON-gauge invariant operators " << std::endl ;
553 pseudoscalar.use_NON_gauge_invar() ;
565 push(xml_out,
"baryon_correlators");
595 LatticeStaggeredPropagator & quark_propagator,
596 XMLFileWriter & xml_out,
603 multi1d<Complex> barprop(tlength) ;
622 LatticeStaggeredPropagator & quark_propagator_a,
623 LatticeStaggeredPropagator & quark_propagator_b,
624 LatticeStaggeredPropagator & quark_propagator_c,
625 XMLFileWriter & xml_out,
632 multi1d<Complex> barprop(tlength) ;
634 baryon_s(quark_propagator_a,quark_propagator_b,quark_propagator_c,
647 multi1d<LatticeColorMatrix> &
u ,
648 multi1d<LatticeColorMatrix> & u_smr,
650 XMLFileWriter & xml_out,
653 int src_ind,
int color_source)
655 LatticeStaggeredFermion q_source ;
656 LatticeStaggeredFermion q_source_fuzz ;
659 QDPIO::cout <<
"Inversion for Color = " << color_source << std::endl;
681 q_source_fuzz = q_source ;
698 q_source = q_source_fuzz ;
714 push(xml_out,
"Qprop");
715 write(xml_out,
"Staggered_src_tag" , src_ind);
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 dump(int t_source, XMLWriter &xml_out)
void compute(multi1d< LatticeStaggeredPropagator > &quark_props, int j_decay)
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)
push(xml_out,"Cooled_Topology")