45 namespace ShellZnGridQuarkSourceConstEnv
103 XMLReader paramtop(xml, path);
106 read(paramtop,
"version", version);
119 XMLBufferWriter xml_tmp;
120 push(xml_tmp,
"Displacement");
123 if (paramtop.count(
"disp_length") != 0)
124 read(paramtop,
"disp_length", disp_length);
126 if (paramtop.count(
"disp_dir") != 0)
127 read(paramtop,
"disp_dir", disp_dir);
129 write(xml_tmp,
"disp_length", disp_length);
130 write(xml_tmp,
"disp_dir", disp_dir);
140 if (paramtop.count(
"Displacement") != 0)
151 if (paramtop.count(
"Displacement") != 0)
159 QDPIO::cerr << __func__ <<
": parameter version " << version
160 <<
" unsupported." << std::endl;
166 if (paramtop.count(
"LinkSmearing") != 0)
209 QDPIO::cout <<
"ZNc random Shell source" << std::endl;
217 LatticePropagator quark_source;
224 multi1d<LatticeColorMatrix> u_smr =
u;
227 XMLReader linktop(xml_l);
234 (*linkSmearing)(u_smr);
240 LatticeComplex noise ;
243 XMLReader smeartop(xml_s);
255 XMLReader displacetop(xml_d);
268 LatticeBoolean mask = false ;
269 LatticeBoolean btmp =
true;
271 LatticeInteger X= Layout::latticeCoordinate(
j) -
params.
t_srce[
j];
279 LatticeComplex phases = 1.0 ;
286 for(
int color_source = 0; color_source < Nc; ++color_source)
288 QDPIO::cout <<
"color = " << color_source << std::endl;
295 for(
int spin_source = 0; spin_source < Ns; ++spin_source)
297 QDPIO::cout <<
"spin = " << spin_source << std::endl;
299 LatticeColorVector src_color_vec =
zero;
300 LatticeColorVector cv=
zero ;
301 LatticeComplex ZNc =
zN_rng(Nc);
303 pokeColor(cv,ZNc,color_source) ;
304 src_color_vec = where(mask,cv,LatticeColorVector(
zero));
326 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
329 (*quarkSmearing)(quark_source, u_smr);
334 (*quarkSmearing)(quark_source, u_smr);
339 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
345 QDPIO::cerr <<
name <<
": Caught Exception smearing: " << e << std::endl;
359 LatticeStaggeredPropagator
362 QDPIO::cout <<
"Shell source" << std::endl;
364 LatticeStaggeredPropagator quark_source;
365 QDPIO::cout <<
"IT ONLY does one point here. I will not bother with staggered"<<std::endl;
371 multi1d<LatticeColorMatrix> u_smr =
u;
374 XMLReader linktop(xml_l);
381 (*linkSmearing)(u_smr);
388 XMLReader smeartop(xml_s);
400 XMLReader displacetop(xml_d);
411 for(
int color_source = 0; color_source < Nc; ++color_source)
413 QDPIO::cout <<
"color = " << color_source << std::endl;
415 LatticeColorVector src_color_vec =
zero;
422 LatticeStaggeredFermion
chi =
zero;
440 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
443 (*quarkSmearing)(quark_source, u_smr);
448 (*quarkSmearing)(quark_source, u_smr);
453 (*quarkDisplacement)(quark_source, u_smr,
MINUS);
459 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.
LatticeComplex singlePhase(const multi1d< int > &t_srce, const multi1d< int > &sink_mom, int j_decay)
A single exp(ip.x) phase used in hadron construction.
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
Complex zN_rng(int N)
Z(N)-rng.
void srcfil(LatticeFermion &a, const multi1d< int > &coord, int color_index, int spin_index)
Fill a specific color and spin index with 1.0.
void write(XMLWriter &xml, const std::string &path, const ShellZnGridQuarkSourceConstEnv::Params ¶m)
Writer.
Class for counted reference semantics.
All link smearing constructors.
Factory for producing link smearing objects.
void savern(int iseed[4])
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 this source implements a ZN (were N = Nc) for baryonic states It also works...
Simple quark displacement.
Compute a single phase factor.
Factory for producing quark prop sources.
Point source construction.
GroupXML_t quark_smearing
multi1d< multi1d< int > > moms
GroupXML_t quark_displacement
void writeXML(XMLWriter &out, const std::string &path) const
Volume source of Z(N) noise.