14 #ifndef FIELD_F_INCLUDED
15 #define FIELD_F_INCLUDED
45 int myindex(
const int c2,
const int s,
const int site,
const int ex)
56 Nvol, Nex, Element_type::
COMPLEX),
94 double cmp_r(
const int cc,
const int s,
const int site,
const int e = 0)
100 double cmp_i(
const int cc,
const int s,
const int site,
const int e = 0)
106 void set_r(
const int cc,
const int s,
const int site,
const int e,
const double re)
111 void set_i(
const int cc,
const int s,
const int site,
const int e,
const double im)
116 void set_ri(
const int cc,
const int s,
const int site,
const int e,
const double re,
const double im)
126 for (
int cc = 0; cc <
m_Nc; ++cc) {
136 for (
int cc = 0; cc <
m_Nc; ++cc) {
144 for (
int cc = 0; cc <
m_Nc; ++cc) {
150 void clear_vec(
const int s,
const int site,
const int e)
152 for (
int cc = 0; cc <
m_Nc2; ++cc) {
174 int is = size * i_thread / Nthread;
175 int ns = size * (i_thread + 1) / Nthread;
177 double *p = this->
ptr(0);
179 for (
int k = is; k < ns; k += 2) {
205 int is = size * i_thread / Nthread;
206 int ns = size * (i_thread + 1) / Nthread;
208 double *yp = this->
ptr(0);
209 const double *xp = w.
ptr(0);
211 for (
int k = is; k < ns; k += 2) {
void mult_Field_Gd(Field_F &y, const int ex, const Field_G &u, int ex1, const Field_F &x, int ex2)
double cmp_i(const int cc, const int s, const int site, const int e=0) const
static int get_num_threads()
returns available number of threads.
const double * ptr(const int jin, const int site, const int jex) const
double r(const int c) const
size_t myindex(const int jin, const int site, const int jex) const
void set_vec(const int s, const int site, const int e, const Vec_SU_N &F)
void set_i(const int cc, const int s, const int site, const int e, const double im)
Container of Field-type object.
void check()
check several assumptions for performance implementation.
friend void copy(Field &y, const Field &x)
copy(y, x): y = x
void clear_vec(const int s, const int site, const int e)
int myindex(const int c2, const int s, const int site, const int ex) const
void multadd_Field_Gn(Field_F &y, const int ex, const Field_G &u, int ex1, const Field_F &x, int ex2, const double a)
static int get_thread_id()
returns thread id.
Wilson-type fermion field.
void mult_GMproj2(Field_F &y, const int pm, const GammaMatrix &gm, const Field_F &x)
projection with gamma matrix: (1 gamma)
void set(const int c, const double re, const double im)
void reset(int Nvol, int Nex)
void set_r(const int cc, const int s, const int site, const int e, const double re)
void Ix(const Field_F &w)
void mult_iGM(Field_F &y, const GammaMatrix &gm, const Field_F &x)
gamma matrix multiplication (i is multiplied)
double i(const int c) const
void multadd_Field_Gd(Field_F &y, const int ex, const Field_G &u, int ex1, const Field_F &x, int ex2, const double a)
void set_ri(const int cc, const int s, const int site, const int e, const double re, const double im)
Common parameter class: provides parameters as singleton.
std::valarray< double > field
void mult_Field_Gn(Field_F &y, const int ex, const Field_G &u, int ex1, const Field_F &x, int ex2)
void reset(const int Nin, const int Nvol, const int Nex, const element_type cmpl=Element_type::COMPLEX)
void mult_GM(Field_F &y, const GammaMatrix &gm, const Field_F &x)
gamma matrix multiplication
Field_F & operator=(const Field_F &v)
element_type field_element_type() const
Vec_SU_N vec(const int s, const int site, const int e=0) const
Field_F(const int Nvol=CommonParameters::Nvol(), const int Nex=1)
void add_vec(const int s, const int site, const int e, const Vec_SU_N &F)
void mult_GMproj(Field_F &y, const int pm, const GammaMatrix &gm, const Field_F &x)
projection with gamma matrix: (1 gamma)/2
double cmp_r(const int cc, const int s, const int site, const int e=0) const