43 namespace ShellQuarkSourceConstEnv
101 XMLReader paramtop(xml, path);
104 read(paramtop,
"version", version);
117 XMLBufferWriter xml_tmp;
118 push(xml_tmp,
"Displacement");
121 if (paramtop.count(
"disp_length") != 0)
122 read(paramtop,
"disp_length", disp_length);
124 if (paramtop.count(
"disp_dir") != 0)
125 read(paramtop,
"disp_dir", disp_dir);
127 write(xml_tmp,
"disp_length", disp_length);
128 write(xml_tmp,
"disp_dir", disp_dir);
138 if (paramtop.count(
"Displacement") != 0)
149 if (paramtop.count(
"Displacement") != 0)
157 QDPIO::cerr << __func__ <<
": parameter version " << version
158 <<
" unsupported." << std::endl;
164 if (paramtop.count(
"LinkSmearing") != 0)
201 QDPIO::cout <<
"Shell source" << std::endl;
203 LatticePropagator quark_source;
210 multi1d<LatticeColorMatrix> u_smr =
u;
213 XMLReader linktop(xml_l);
220 (*linkSmearing)(u_smr);
227 XMLReader smeartop(xml_s);
239 XMLReader displacetop(xml_d);
250 for(
int color_source = 0; color_source < Nc; ++color_source)
252 QDPIO::cout <<
"color = " << color_source << std::endl;
254 LatticeColorVector src_color_vec =
zero;
259 for(
int spin_source = 0; spin_source < Ns; ++spin_source)
261 QDPIO::cout <<
"spin = " << spin_source << std::endl;
284 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
287 (*quarkSmearing)(quark_source, u_smr);
292 (*quarkSmearing)(quark_source, u_smr);
297 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
303 QDPIO::cerr <<
name <<
": Caught Exception smearing: " << e << std::endl;
314 LatticeStaggeredPropagator
317 QDPIO::cout <<
"Shell source" << std::endl;
319 LatticeStaggeredPropagator quark_source;
326 multi1d<LatticeColorMatrix> u_smr =
u;
329 XMLReader linktop(xml_l);
336 (*linkSmearing)(u_smr);
343 XMLReader smeartop(xml_s);
355 XMLReader displacetop(xml_d);
366 for(
int color_source = 0; color_source < Nc; ++color_source)
368 QDPIO::cout <<
"color = " << color_source << std::endl;
370 LatticeColorVector src_color_vec =
zero;
377 LatticeStaggeredFermion
chi =
zero;
395 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
398 (*quarkSmearing)(quark_source, u_smr);
403 (*quarkSmearing)(quark_source, u_smr);
408 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
414 QDPIO::cerr <<
name <<
": Caught Exception smearing: " << e << std::endl;
Primary include file for CHROMA library code.
Class for counted reference semantics.
Base class for quark source construction.
Shell source construction.
T operator()(const multi1d< LatticeColorMatrix > &u) const
Construct the source.
void CvToFerm(const LatticeColorVectorF &a, LatticeFermionF &b, int spin_index)
Convert (insert) a LatticeColorVector into a LatticeFermion.
void FermToProp(const LatticeFermionF &a, LatticePropagatorF &b, int color_index, int spin_index)
Insert a LatticeFermion into a LatticePropagator.
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.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
void write(XMLWriter &xml, const std::string &path, const ShellQuarkSourceConstEnv::Params ¶m)
Writer.
void srcfil(LatticeFermion &a, const multi1d< int > &coord, int color_index, int spin_index)
Fill a specific color and spin index with 1.0.
Class for counted reference semantics.
All link smearing constructors.
Factory for producing link smearing objects.
static bool registered
Local registration flag.
const std::string name
Name to be used.
GroupXML_t nullXMLGroup()
Returns a no-linksmearing group.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
GroupXML_t nullXMLGroup()
Returns a no-displacement group.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
std::string getName()
Return the name.
std::string getName()
Return the name.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
multi1d< LatticeFermion > chi(Ncb)
All quark displacement constructors.
Factory for producing quark displacement objects.
All quark smearing constructors.
Factory for producing quark smearing objects.
Shell source construction.
Simple quark displacement.
Factory for producing quark prop sources.
Point source construction.
void writeXML(XMLWriter &out, const std::string &path) const
GroupXML_t quark_smearing
GroupXML_t quark_displacement