Bridge++  Ver. 1.2.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
io_format_gauge.h
Go to the documentation of this file.
1 
13 #ifndef IO_FORMAT_GAUGE_INCLUDED
14 #define IO_FORMAT_GAUGE_INCLUDED
15 
16 #include "io_format.h"
17 #include "commonParameters.h"
18 
19 namespace IO_Format {
20  namespace Gauge {
28  class ILDG_Format : public Format {
29  public:
31  {
32 // int nc = CommonParameters::Nc();
33 // int ndim = CommonParameters::Ndim();
34 
35  int nc = 3;
36  int ndim = 4;
37 
38  m_nin = 2 * nc * nc * ndim;
39  m_nex = 1;
40  m_matrix = 2 * nc * nc;
41  }
42 
43  int nin() const { return m_nin; }
44  int nex() const { return m_nex; }
45 
46  void file_to_field(int& s, int& t, const int i, const int j) const
47  {
48  s = i % m_matrix;
49  t = i / m_matrix;
50  }
51 
52  private:
53  int m_nin;
54  int m_nex;
55  int m_matrix;
56  };
57 
68  class JLQCD_Format : public Trivial_Format {};
69 
70 
71 #if 0
72  class JLQCD_Format : public Format {
73  public:
74  JLQCD_Format()
75  {
76  int nc = CommonParameters::Nc();
77  int ndim = CommonParameters::Ndim();
78 
79  m_nin = 2 * nc * nc;
80  m_nex = ndim;
81  m_matrix = 2 * nc * nc;
82  }
83 
84  int nin() const { return m_nin; }
85  int nex() const { return m_nex; }
86 
87  void file_to_field(int& s, int& t, const int i, const int j) const
88  {
89  s = i;
90  t = j;
91  }
92 
93  private:
94  int m_nin;
95  int m_nex;
96  int m_matrix;
97  };
98 #endif
99 
100 //----------------------------------------------------------------
101 // predefined formats
102 
103  extern const Format *ILDG;
104  extern const Format *JLQCD;
105  } // namespace Gauge
106 } // namespace IO_Format
107 #endif /* IO_FORMAT_GAUGE_INCLUDED */
virtual int nin() const
Definition: io_format.h:45
const Format * ILDG
Definition: io_format.cpp:28
virtual void file_to_field(int &s, int &t, const int i, const int j) const
Definition: io_format.h:48
virtual int nex() const
Definition: io_format.h:46
void file_to_field(int &s, int &t, const int i, const int j) const
const Format * JLQCD
Definition: io_format.cpp:29