95 const string str_vlevel = params.
get_string(
"verbose_level");
119 const std::vector<int> bc)
125 for (
int mu = 0; mu <
m_Ndim; ++mu) {
131 assert(bc.size() ==
m_Ndim);
160 params_solver.
set_string(
"solver_type",
"CG");
161 params_solver.
set_int(
"maximum_number_of_iteration", 100);
162 params_solver.
set_int(
"maximum_number_of_restart", 40);
163 params_solver.
set_double(
"convergence_criterion_squared", 1.0e-30);
164 params_solver.
set_string(
"use_initial_guess",
"false");
166 params_solver.
set_string(
"verbose_level",
"Crucial");
176 const int Niter = 100;
177 const int Nrestart = 40;
178 const double Stopping_condition = 1.0e-30;
184 for (
int ispin = 0; ispin <
m_Nd; ++ispin) {
185 for (
int icolor = 0; icolor <
m_Nc; ++icolor) {
186 int spin_color = icolor + m_Nc * ispin;
190 for (
int isite = 0; isite <
m_Nvol2; ++isite) {
191 w.
set_ri(icolor, ispin, isite, 0, 1, 0);
202 solver->
solve(w2, w, Nconv, diff);
208 solver->
solve(w2, w, Nconv, diff);
217 for (
int ics = 0; ics <
m_Nc *
m_Nd; ++ics) {
218 for (
int site = 0; site <
m_Nvol2; ++site) {
219 for (
int id = 0;
id <
m_Nd; ++id) {
220 for (
int ic = 0; ic <
m_Nc; ++ic) {
253 const Field& f,
const int ieo)
256 const int nex = f.
nex();
269 }
else if (ieo == 1) {
277 for (
int iex = 0; iex < nex; ++iex) {
278 for (
int isite = 0; isite <
m_Nvol2; ++isite) {
279 for (
int ispin = 0; ispin <
m_Nd; ++ispin) {
280 for (
int icolor = 0; icolor <
m_Nc; ++icolor) {
284 for (
int jspin = 0; jspin <
m_Nd; ++jspin) {
285 for (
int jcolor = 0; jcolor <
m_Nc; ++jcolor) {
286 int spin_color = jcolor + m_Nc * jspin;
288 re += csw_inv->
cmp_r(icolor, ispin, isite, spin_color) *
289 f2.
cmp_r(jcolor, jspin, isite, iex);
290 re += csw_inv->
cmp_i(icolor, ispin, isite, spin_color) *
291 f2.
cmp_i(jcolor, jspin, isite, iex);
293 im += csw_inv->
cmp_r(icolor, ispin, isite, spin_color) *
294 f2.
cmp_i(jcolor, jspin, isite, iex);
295 im -= csw_inv->
cmp_i(icolor, ispin, isite, spin_color) *
296 f2.
cmp_r(jcolor, jspin, isite, iex);
300 v2.
set_ri(icolor, ispin, isite, iex, re, im);
314 for (
int ispin = 0; ispin < m_Nd / 2; ++ispin) {
315 for (
int icolor = 0; icolor <
m_Nc; ++icolor) {
316 int ics = icolor + ispin *
m_Nc;
318 for (
int jspin = 0; jspin <
m_Nd; ++jspin) {
319 int js2 = (jspin + m_Nd / 2) % m_Nd;
321 for (
int jcolor = 0; jcolor <
m_Nc; ++jcolor) {
322 int cs1 = jcolor + m_Nc * (jspin + m_Nd * ics);
323 int cs2 = jcolor + m_Nc * (jspin + m_Nd * (ics + m_Nc * m_Nd / 2));
324 int cc = jcolor + icolor *
m_Nc;
325 int ss1 = jspin + ispin *
m_Nd;
326 int ss2 = js2 + ispin *
m_Nd;
329 int cs1_i = 2 * cs1 + 1;
331 matrix[cs1_r] =
m_T.
cmp_r(cc, site, ss1);
332 matrix[cs1_i] =
m_T.
cmp_i(cc, site, ss1);
335 int cs2_i = 2 * cs2 + 1;
337 matrix[cs2_r] =
m_T.
cmp_r(cc, site, ss2);
338 matrix[cs2_i] =
m_T.
cmp_i(cc, site, ss2);
358 const int NinG = T2.
nin();
436 const int mu,
const int nu)
475 const int NinG =
m_T2[0].nin();
477 for (
int ieo = 0; ieo < 2; ++ieo) {
478 for (
int ex = 0; ex < Nfst; ++ex) {
479 for (
int isite = 0; isite <
m_Nvol2; ++isite) {
480 for (
int in = 0; in < NinG; ++in) {
547 const int mu,
const int nu)
562 for (
int site = 0; site <
m_Nvol; ++site) {
567 for (
int site = 0; site <
m_Nvol; ++site) {
574 for (
int site = 0; site <
m_Nvol; ++site) {
578 for (
int site = 0; site <
m_Nvol; ++site) {
588 for (
int site = 0; site <
m_Nvol; ++site) {
602 assert(tr_sigma_inv.
nex() == 1);
614 for (
int isite = 0; isite <
m_Nvol; ++isite) {
615 for (
int ispin = 0; ispin <
m_Nd; ++ispin) {
616 for (
int icolor = 0; icolor <
m_Nc; ++icolor) {
617 Vec_SU_N v = sigma_inv.vec(ispin, isite, icolor + m_Nc * ispin);
619 for (
int jcolor = 0; jcolor <
m_Nc; ++jcolor) {
620 int cc = icolor + m_Nc * jcolor;
622 tr_sigma_inv.
set_r(cc, isite, 0, v.
r(jcolor));
623 tr_sigma_inv.
set_i(cc, isite, 0, v.
i(jcolor));
644 const double gflop = flop_site * ((Nvol / 2) * (NPE / 1.0e+9));
void scal(Field &x, const double a)
scal(x, a): x = a * x
double cmp_i(const int cc, const int s, const int site, const int e=0) const
void detailed(const char *format,...)
virtual void upper(Field_G &, const Field_G &, const int mu, const int nu)=0
constructs upper staple in mu-nu plane.
double r(const int c) const
void set(const int jin, const int site, const int jex, double v)
virtual void lower(Field_G &, const Field_G &, const int mu, const int nu)=0
constructs lower staple in mu-nu plane.
void init(const std::string repr)
Field_G m_T
m_T = 1 - kappa c_SW sigma F / 2
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
void general(const char *format,...)
GammaMatrix get_GM(GMspecies spec)
void set_int(const string &key, const int value)
int solver(const std::string &)
Container of Field-type object.
int fetch_double(const string &key, double &value) const
double cmp_i(const int cc, const int site, const int mn=0) const
double cmp(const int jin, const int site, const int jex) const
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
int site(const int x2, const int y, const int z, const int t, const int ieo) const
std::vector< double > csmatrix(const int &)
void copy(Field &y, const Field &x)
copy(y, x): y = x
Standard Conjugate Gradient solver algorithm.
void set_fieldstrength(Field_G &, const int, const int)
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)
Wilson-type fermion field.
virtual void set_parameters(const Parameters ¶ms)=0
void set_string(const string &key, const string &value)
static double epsilon_criterion2()
void reset(int Nvol, int Nex)
int sg_index(const int mu, const int nu)
void trSigmaInv(Field_G &, const int mu, const int nu)
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 set_ri(const int cc, const int s, const int site, const int e, const double re, const double im)
Bridge::VerboseLevel m_vl
std::vector< Field_G > m_T2
m_T2 is used in Org-version.
void set_i(const int cc, const int site, const int mn, const double im)
Mat_SU_N & ah()
antihermitian
std::vector< int > m_boundary
void set_r(const int cc, const int site, const int mn, const double re)
double flop_count()
returns number of floating point operations.
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
static const std::string class_name
void set_parameters(const Parameters ¶ms)
void crucial(const char *format,...)
void D(Field &v, const Field &f, const int ieo)
multiplies 1 - csw kappa sigma_{mu nu} F_{mu nu}
void set_double(const string &key, const double value)
void reverseField(Field &lex, const Field &eo)
void forward(Field &, const Field &, const int mu)
Mat_SU_N mat_dag(const int site, const int mn=0) const
double cmp_r(const int cc, const int site, const int mn=0) const
void set_config(Field *Ueo)
setting pointer to the gauge configuration.
void setpart_ex(int ex, const Field &w, int exw)
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
string get_string(const string &key) const
int fetch_int_vector(const string &key, vector< int > &value) const
void set_mat(const int site, const int mn, const Mat_SU_N &U)
void mult_csw_inv(Field &, const Field &, const int ieo)
multiplies [1 - csw kappa sigma_{mu nu} F_{mu nu} ]^{-1}
Mat_SU_N mat(const int site, const int mn=0) const
std::vector< GammaMatrix > m_GM
Gamma Matrix and Sigma_{mu,nu} = -i [Gamma_mu, Gamma_nu] /2.
virtual void solve(Field &solution, const Field &source, int &Nconv, double &diff)=0
std::vector< GammaMatrix > m_SG
static VerboseLevel set_verbose_level(const std::string &str)
double cmp_r(const int cc, const int s, const int site, const int e=0) const