33 int NinG = 2 * Nc * Nc;
38 double Stop_cond_MD = 1.0e-24;
39 double Stop_cond_H = 1.0e-24;
41 string str_solver_type =
"CG";
63 assert(NvolF == Nvol);
68 Field xi(NinF, NvolF, NexF);
74 Field v1(NinF, NvolF, NexF), v2(NinF, NvolF, NexF);
102 double xi2 = xi.
norm();
103 double H_psf = xi2 * xi2;
123 Field v1(NinF, NvolF, NexF), v2(NinF, NvolF, NexF);
139 double H_psf =
dot(v1, v2);
157 assert(force.
nin() == Nin);
158 assert(force.
nvol() == Nvol);
159 assert(force.
nex() == Nex);
164 Field eta(NinF, NvolF, NexF);
173 Field v1(NinF, NvolF, NexF), v2(NinF, NvolF, NexF);
182 vout.
general(
m_vl,
" Solver: Nconv = %6d diff = %12.6e\n", Nconv, diff);
184 Field force1(Nin, Nvol, Nex);
190 axpy(force, -1.0, force1);
194 axpy(force, -1.0, force1);
196 double Fave, Fmax, Fdev;
197 force.
stat(Fave, Fmax, Fdev);
198 vout.
general(
m_vl,
" Fratio_ave = %12.6f Fratio_max = %12.6f Fratio_dev = %12.6f\n",
double dot(const Field &y, const Field &x)
double langevin(RandomNumbers *)
Langevis step.
void general(const char *format,...)
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
Container of Field-type object.
virtual void set_config(Field *)=0
virtual void force_core1(Field &, const Field &, const Field &)
static const std::string class_name
virtual void gauss_lex_global(Field &)
gaussian random number defined on global lattice.
virtual int field_nin()=0
returns the on-site d.o.f. for which the fermion operator is defined.
Force * m_fopr_prec_force
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
virtual void set_parameters(const Parameters ¶ms)=0
virtual void set_mode(const std::string &mode)
in Force, setting the mode is optional when H is nonhermitian.
void reset(const int Nin, const int Nvol, const int Nex, const element_type cmpl=COMPLEX)
virtual int field_nex()=0
returns the external d.o.f. for which the fermion operator is defined.
virtual void force_core(Field &, const Field &)
Bridge::VerboseLevel get_VerboseLevel() const
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Bridge::VerboseLevel m_vl
Base class of random number generators.
virtual void mult(Field &, const Field &)=0
multiplies fermion operator to a given field (2nd argument)
virtual void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
void stat(double &Fave, double &Fmax, double &Fdev) const
determines the statistics of the field. average, maximum value, and deviation is determined over glob...
virtual void mult_dag(Field &, const Field &)
hermitian conjugate of mult(Field&, const Field&).
virtual int field_nvol()=0
returns the volume for which the fermion operator is defined.
virtual void solve(Field &solution, const Field &source, int &Nconv, double &diff)=0
void force(Field &)
returns force for molcular dynamical update of conjugate momenta.
double calcH()
calculate Hamiltonian of this action term.