43 namespace NormShellQuarkSourceConstEnv
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)
175 if (paramtop.count(
"SiteNormalize") != 0){
211 QDPIO::cout <<
"NormShell source" << std::endl;
213 LatticePropagator quark_source;
220 multi1d<LatticeColorMatrix> u_smr =
u;
223 XMLReader linktop(xml_l);
230 (*linkSmearing)(u_smr);
237 XMLReader smeartop(xml_s);
249 XMLReader displacetop(xml_d);
260 multi1d<LatticeColorVector> v(Nc);
261 for(
int c = 0;
c < Nc; ++
c){
262 QDPIO::cout <<
"color = " <<
c << std::endl;
267 QDPIO::cout <<
"smearing hit = " << hit << std::endl;
268 for(
int c = 0;
c < Nc; ++
c){
269 (*quarkSmearing)(v[
c], u_smr);
270 for(
int k(0);
k<
c;
k++){
274 Double nn = sqrt(norm2(v[
c])) ;
278 for(
int color_source = 0; color_source < Nc; ++color_source)
280 QDPIO::cout <<
"color = " << color_source << std::endl;
282 for(
int spin_source = 0; spin_source < Ns; ++spin_source)
284 QDPIO::cout <<
"spin = " << spin_source << std::endl;
302 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
310 QDPIO::cout<<__func__
311 <<
": WARNING: The quark_smear_lastP not implemented!!"
319 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
326 QDPIO::cerr <<
name <<
": Caught Exception smearing: " << e << std::endl;
337 LatticeStaggeredPropagator
340 QDPIO::cout <<
"NormShell source" << std::endl;
342 LatticeStaggeredPropagator quark_source;
349 multi1d<LatticeColorMatrix> u_smr =
u;
352 XMLReader linktop(xml_l);
359 (*linkSmearing)(u_smr);
366 XMLReader smeartop(xml_s);
378 XMLReader displacetop(xml_d);
389 for(
int color_source = 0; color_source < Nc; ++color_source)
391 QDPIO::cout <<
"color = " << color_source << std::endl;
393 LatticeColorVector src_color_vec =
zero;
400 LatticeStaggeredFermion
chi =
zero;
418 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
421 (*quarkSmearing)(quark_source, u_smr);
426 (*quarkSmearing)(quark_source, u_smr);
431 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
437 QDPIO::cerr <<
name <<
": Caught Exception smearing: " << e << std::endl;
Primary include file for CHROMA library code.
Class for counted reference semantics.
Shell source construction.
T operator()(const multi1d< LatticeColorMatrix > &u) const
Construct the source.
Base class for quark source construction.
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 NormShellQuarkSourceConstEnv::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.
BinaryReturn< C1, C2, FnInnerProduct >::Type_t innerProduct(const QDPSubType< T1, C1 > &s1, const QDPType< T2, C2 > &s2)
GroupXML_t nullXMLGroup()
Returns a no-linksmearing group.
bool registerAll()
Register all the factories.
bool registerAll()
Register all the factories.
std::string getName()
Return the name.
bool registerAll()
Register all the factories.
GroupXML_t nullXMLGroup()
Returns a no-displacement group.
bool registerAll()
Register all the factories.
std::string getName()
Return the name.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
multi1d< LatticeFermion > chi(Ncb)
FloatingPoint< double > Double
Normalized Shell source construction.
All quark displacement constructors.
Factory for producing quark displacement objects.
All quark smearing constructors.
Factory for producing quark smearing objects.
Simple quark displacement.
Factory for producing quark prop sources.
Point source construction.
void writeXML(XMLWriter &out, const std::string &path) const
GroupXML_t quark_displacement
GroupXML_t quark_smearing