35 namespace DistillutionFactoryEnv
41 int checkTimeDils(
int num_time_dils,
int Lt)
43 int num = num_time_dils;
46 if (num_time_dils == 0)
50 else if (num_time_dils < 0 || num_time_dils > Lt)
52 QDPIO::cerr << __func__ <<
": invalid size of num_time_dils = " << num_time_dils << std::endl;
55 else if ((Lt % num_time_dils) != 0)
57 QDPIO::cerr << __func__
58 <<
": num_time_dils = " << num_time_dils
59 <<
" not a divisor of the time extent = " << Lt
94 XMLReader inputtop(xml, path);
149 virtual LatticeColorVector
getSrc(
int t_source,
int dist_src)
const;
173 virtual std::list<KeyPropDistillution_t>
getSrcKeys(
int t_source,
int dist_src)
const;
176 virtual std::list<KeyPropDistillution_t>
getSnkKeys(
int t_source,
int dist_src)
const;
195 QDP::MapObjectDisk<KeyPropDistillution_t, TimeSliceIO<LatticeColorVectorF> >&
source_obj;
212 dist_noise_obj(dist_noise_obj_), source_obj(source_obj_),
time_slice_set(time_slice_set_),
213 quark_line(quark_line_),
mass(mass_)
221 QDPIO::cout <<
"CONN: getSrc on t_source= " <<
t_source <<
" dist_src= " << dist_src << std::endl;
228 LatticeColorVectorF vec_srce =
zero;
230 TimeSliceIO<LatticeColorVectorF> time_slice_io(vec_srce, t_actual);
243 const int Lt = Layout::lattSize()[decay_dir];
245 std::vector<bool> active_t_slices(Lt);
246 for(
int t=0;
t < Lt; ++
t)
248 active_t_slices[
t] =
false;
255 active_t_slices[
t % Lt] =
true;
262 while (
t < 0) {
t += Lt;}
264 active_t_slices[
t % Lt] =
true;
267 return active_t_slices;
295 std::list<KeyPropDistillution_t> keys;
307 std::list<KeyPropDistillution_t> keys;
313 for(
int spin_source=0; spin_source < Ns; ++spin_source)
315 for(
int spin_sink=0; spin_sink < Ns; ++spin_sink)
317 for(
int t=0;
t < Lt; ++
t)
319 if (! active_t_slices[
t]) {
continue;}
347 std::list<KeyPeramDistillution_t> keys;
353 for(
int spin_source=0; spin_source < Ns; ++spin_source)
355 for(
int spin_sink=0; spin_sink < Ns; ++spin_sink)
357 for(
int t=0;
t < Lt; ++
t)
359 if (! active_t_slices[
t]) {
continue;}
392 for(
int t=0;
t < Lt; ++
t)
394 if (active_t_slices[
t])
412 namespace Annihilation
430 XMLReader inputtop(xml, path);
481 virtual LatticeColorVector
getSrc(
int t_source,
int dist_src)
const;
505 virtual std::list<KeyPropDistillution_t>
getSrcKeys(
int t_source,
int dist_src)
const;
508 virtual std::list<KeyPropDistillution_t>
getSnkKeys(
int t_source,
int dist_src)
const;
524 QDP::MapObjectDisk<KeyPropDistillution_t, TimeSliceIO<LatticeColorVectorF> >&
source_obj;
541 dist_noise_obj(dist_noise_obj_), source_obj(source_obj_),
time_slice_set(time_slice_set_),
542 quark_line(quark_line_),
mass(mass_)
553 std::vector<int> t_sources;
557 t_sources.push_back(
t);
568 QDPIO::cout <<
"ANNIH: getSrc on t_source= " << t_src <<
" dist_src= " << dist_src << std::endl;
570 LatticeColorVector vec_srce =
zero;
581 LatticeColorVectorF vec_tmp =
zero;
583 TimeSliceIO<LatticeColorVectorF> time_slice_io(vec_tmp, t_actual);
617 std::list<KeyPropDistillution_t> keys;
634 std::list<KeyPropDistillution_t> keys;
638 for(
int spin_source=0; spin_source < Ns; ++spin_source)
640 for(
int spin_sink=0; spin_sink < Ns; ++spin_sink)
670 std::list<KeyPeramDistillution_t> keys;
674 for(
int spin_source=0; spin_source < Ns; ++spin_source)
676 for(
int spin_sink=0; spin_sink < Ns; ++spin_sink)
743 return new Annihilation::QuarkLineFact(Annihilation::Params(xml_in, path),
Abstract type for quarkline construction.
virtual KeyPropDistillution_t getSnkKey(const KeyPeramDistillution_t &peram_key, int dist_src) const
Get sink key.
Annihilation quark lines.
virtual int getNumSpaceDils() const
Get number of space dilutions.
virtual int getNumVecs() const
Get number of vectors.
virtual std::vector< int > getTimeSources() const
Get the time sources.
virtual KeyPropDistillution_t getSrcKey(int t_source, int dist_src) const
Get source key.
const TimeSliceSet & time_slice_set
QDP::MapObjectDisk< KeyPropDistillution_t, TimeSliceIO< LatticeColorVectorF > > & source_obj
virtual std::string getMass() const
Get mass.
virtual int getNumTimeDils() const
Get number of time dilutions.
virtual std::list< int > getTslices(int t_source) const
Get perambulator key time slices.
virtual int getQuarkLine() const
Get quark line number.
QuarkLineFact(const Params ¶ms_, const DistillutionNoise &dist_noise_obj_, QDP::MapObjectDisk< KeyPropDistillution_t, TimeSliceIO< LatticeColorVectorF > > &source_obj_, const TimeSliceSet &time_slice_set_, int quark_line_, const std::string &mass_)
Constructor.
virtual std::list< KeyPropDistillution_t > getSnkKeys(int t_source, int dist_src) const
Get sink keys.
virtual LatticeColorVector getSrc(int t_source, int dist_src) const
Get a source.
virtual std::list< KeyPeramDistillution_t > getPeramKeys(int t_source) const
Get perambulator keys.
virtual bool getAnnihP() const
Get annihilation flag.
virtual std::list< KeyPropDistillution_t > getSrcKeys(int t_source, int dist_src) const
Get source keys.
const DistillutionNoise & dist_noise_obj
virtual bool getAnnihP() const
Get annihilation flag.
virtual LatticeColorVector getSrc(int t_source, int dist_src) const
Get a source.
virtual int getNumTimeDils() const
Get number of time dilutions.
virtual std::list< int > getTslices(int t_source) const
Get perambulator key time slices.
virtual int getQuarkLine() const
Get quark line number.
virtual std::list< KeyPropDistillution_t > getSrcKeys(int t_source, int dist_src) const
Get source keys.
const TimeSliceSet & time_slice_set
virtual KeyPropDistillution_t getSrcKey(int t_source, int dist_src) const
Get source key.
virtual std::vector< int > getTimeSources() const
Get the time sources.
const DistillutionNoise & dist_noise_obj
virtual std::list< KeyPropDistillution_t > getSnkKeys(int t_source, int dist_src) const
Get sink keys.
QuarkLineFact(const Params ¶ms_, const DistillutionNoise &dist_noise_obj_, QDP::MapObjectDisk< KeyPropDistillution_t, TimeSliceIO< LatticeColorVectorF > > &source_obj_, const TimeSliceSet &time_slice_set_, int quark_line_, const std::string &mass_)
Constructor.
QDP::MapObjectDisk< KeyPropDistillution_t, TimeSliceIO< LatticeColorVectorF > > & source_obj
virtual int getNumSpaceDils() const
Get number of space dilutions.
virtual std::list< KeyPeramDistillution_t > getPeramKeys(int t_source) const
Get perambulator keys.
virtual std::string getMass() const
Get mass.
virtual int getNumVecs() const
Get number of vectors.
virtual std::vector< bool > getActiveTSlices(int t_source) const
The active time slices for this source.
virtual int getTime(int t_slice) const
Convenience - get shifted time.
virtual int getDecayDir() const
Return the decay direction.
Builds time slice subsets.
const Set & getSet() const
The set to be used in sumMulti.
Distillution factory for producing keys * sources.
TimeSliceSet time_slice_set
static bool registered
Local registration flag.
void read(XMLReader &xml, const std::string &path, Params &input)
Propagator input.
void write(XMLWriter &xml, const std::string &path, const Params &input)
Propagator output.
void read(XMLReader &xml, const std::string &path, Params &input)
Propagator input.
void write(XMLWriter &xml, const std::string &path, const Params &input)
Propagator output.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
push(xml_out,"Condensates")
void writeXML(XMLWriter &xml_out, const std::string &path) const
Propagator output.
void writeXML(XMLWriter &xml_out, const std::string &path) const
Propagator output.
std::vector< int > t_sources
Distillution propagators.