CHROMA
distillution_factory.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Distillution factory for producing keys * sources
4  *
5  * Distillution factory for producing keys * sources
6  */
7 
8 #ifndef __distillution_factory_w_h__
9 #define __distillution_factory_w_h__
10 
11 #include "qdp_map_obj_disk.h"
12 #include "qdp_disk_map_slice.h"
13 
14 #include "chromabase.h"
15 #include "singleton.h"
16 #include "objfactory.h"
21 #include "util/ft/time_slice_set.h"
22 #include <list>
23 #include <vector>
24 
25 namespace Chroma
26 {
27  //----------------------------------------------------------------------------
28  //----------------------------------------------------------------------------
29  //! Abstract type for quarkline construction
31  {
32  public:
33  //! Virtual destructor
34  virtual ~AbsQuarkLine() {}
35 
36  //! Get a source
37  virtual LatticeColorVector getSrc(int t_source, int dist_src) const = 0;
38 
39  //! Get number of vectors
40  virtual int getNumVecs() const = 0;
41 
42  //! Get number of space dilutions
43  virtual int getNumSpaceDils() const = 0;
44 
45  //! Get number of time dilutions
46  virtual int getNumTimeDils() const = 0;
47 
48  //! Get quark line number
49  virtual int getQuarkLine() const = 0;
50 
51  //! Get mass
52  virtual std::string getMass() const = 0;
53 
54  //! Get annihilation flag
55  virtual bool getAnnihP() const = 0;
56 
57  //! Get the time sources
58  virtual std::vector<int> getTimeSources() const = 0;
59 
60  //! Get source keys
61  virtual std::list<KeyPropDistillution_t> getSrcKeys(int t_source, int dist_src) const = 0;
62 
63  //! Get sink keys
64  virtual std::list<KeyPropDistillution_t> getSnkKeys(int t_source, int dist_src) const = 0;
65 
66  //! Get perambulator keys
67  virtual std::list<KeyPeramDistillution_t> getPeramKeys(int t_source) const = 0;
68 
69  //! Get sink key
70  virtual KeyPropDistillution_t getSnkKey(const KeyPeramDistillution_t& peram_key, int dist_src) const;
71 
72  //! Get perambulator key time slices
73  virtual std::list<int> getTslices(int t_source) const = 0;
74  };
75 
76 
77  //----------------------------------------------------------------------------
78  typedef QDP::MapObjectDisk< KeyPropDistillution_t,TimeSliceIO<LatticeColorVectorF> > MOD_t;
79 
80  //----------------------------------------------------------------------------
81  //! Quark line factory (foundry)
82  typedef SingletonHolder<
85  TYPELIST_7(XMLReader&, const std::string&,
86  const DistillutionNoise&,
87  MOD_t&,
88  const TimeSliceSet&,
89  int,
90  const std::string&),
91  AbsQuarkLine* (*)(XMLReader&, const std::string&,
92  const DistillutionNoise&,
93  MOD_t&,
94  const TimeSliceSet&,
95  int,
98 
99 
100  //----------------------------------------------------------------------------
101  namespace DistillutionFactoryEnv
102  {
103  bool registerAll();
104  }
105 
106 }
107 
108 #endif
Abstract inline measurements.
Primary include file for CHROMA library code.
Abstract type for quarkline construction.
virtual int getNumVecs() const =0
Get number of vectors.
virtual std::string getMass() const =0
Get mass.
virtual std::list< KeyPropDistillution_t > getSrcKeys(int t_source, int dist_src) const =0
Get source keys.
virtual int getNumTimeDils() const =0
Get number of time dilutions.
virtual ~AbsQuarkLine()
Virtual destructor.
virtual int getNumSpaceDils() const =0
Get number of space dilutions.
virtual std::list< KeyPropDistillution_t > getSnkKeys(int t_source, int dist_src) const =0
Get sink keys.
virtual KeyPropDistillution_t getSnkKey(const KeyPeramDistillution_t &peram_key, int dist_src) const
Get sink key.
virtual LatticeColorVector getSrc(int t_source, int dist_src) const =0
Get a source.
virtual std::list< KeyPeramDistillution_t > getPeramKeys(int t_source) const =0
Get perambulator keys.
virtual std::vector< int > getTimeSources() const =0
Get the time sources.
virtual int getQuarkLine() const =0
Get quark line number.
virtual bool getAnnihP() const =0
Get annihilation flag.
virtual std::list< int > getTslices(int t_source) const =0
Get perambulator key time slices.
Object factory class.
Definition: objfactory.h:82
Builds time slice subsets.
Support for distillution - random time-slices and quark line noises.
Key for propagator distillution matrix elements.
Key for distillution propagator sources and solutions.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
SingletonHolder< ObjectFactory< AbsQuarkLine, std::string, TYPELIST_7(XMLReader &, const std::string &, const DistillutionNoise &, MOD_t &, const TimeSliceSet &, int, const std::string &), AbsQuarkLine *(*)(XMLReader &, const std::string &, const DistillutionNoise &, MOD_t &, const TimeSliceSet &, int, const std::string &), StringFactoryError > > TheQuarkLineFactory
Quark line factory (foundry)
QDP::MapObjectDisk< KeyPropDistillution_t, TimeSliceIO< LatticeColorVectorF > > MOD_t
::std::string string
Definition: gtest.h:1979
Factory class for objects from XML input.
Singleton support.
Distillution propagators.
Convenience for building time-slice subsets.
#define TYPELIST_7(T1, T2, T3, T4, T5, T6, T7)
Definition: typelist.h:55