39#ifndef INTEGRATOR_ALG_INCLUDED
40#define INTEGRATOR_ALG_INCLUDED
95template <
class FieldImplementation_,
class SmearingPolicy,
class RepresentationPolicy = Representations<FundamentalRepresentation> >
109 int fl = this->
as.size() - 1;
116 for (
int l = 0; l <= level; ++l) eps /= this->
as[l].multiplier;
118 int multiplier = this->
as[level].multiplier;
119 for (
int e = 0; e < multiplier; ++e) {
120 int first_step = _first && (e == 0);
121 int last_step = _last && (e == multiplier - 1);
124 this->
update_P(U, level, eps / 2.0);
130 this->
step(U, level + 1, first_step, last_step);
133 int mm = last_step ? 1 : 2;
134 this->
update_P(U, level, mm * eps / 2.0);
139template <
class FieldImplementation_,
class SmearingPolicy,
class RepresentationPolicy = Representations<FundamentalRepresentation> >
159 int fl = this->
as.size() - 1;
162 for (
int l = 0; l <= level; ++l) eps /= 2.0 * this->
as[l].multiplier;
167 int multiplier = this->
as[level].multiplier;
168 for (
int e = 0; e < multiplier; ++e) {
170 int first_step = _first && (e == 0);
171 int last_step = _last && (e == multiplier - 1);
180 this->
step(U, level + 1, first_step, 0);
188 this->
step(U, level + 1, 0, last_step);
191 int mm = (last_step) ? 1 : 2;
197template <
class FieldImplementation_,
class SmearingPolicy,
class RepresentationPolicy = Representations<FundamentalRepresentation> >
215 grid, Par, Aset, Sm){};
224 std::cout <<
GridLogIntegrator <<
"FG update " << fg_dt <<
" " << ep << std::endl;
233 this->
update_P(Pfg, Ufg, level, fg_dt);
234 Pfg = Pfg*(1.0/fg_dt);
241 for (
int l = 0; l <= level; ++l) eps /= 2.0 * this->
as[l].multiplier;
245 int fl = this->
as.size() - 1;
247 int multiplier = this->
as[level].multiplier;
249 for (
int e = 0; e < multiplier; ++e) {
251 int first_step = _first && (e == 0);
252 int last_step = _last && (e == multiplier - 1);
261 this->
step(U, level + 1, first_step, 0);
269 this->
step(U, level + 1, 0, last_step);
272 int mm = (last_step) ? 1 : 2;
std::vector< ActionLevel< GaugeField, R > > ActionSet
GridLogger GridLogIntegrator(1, "Integrator", GridLogColours, "BLUE")
#define NAMESPACE_BEGIN(A)
static INTERNAL_PRECISION U
void step(Field &U, int level, int _first, int _last)
INHERIT_FIELD_TYPES(FieldImplementation)
FieldImplementation_ FieldImplementation
std::string integrator_name()
void FG_update_P(Field &U, int level, double fg_dt, double ep)
ForceGradient(GridBase *grid, IntegratorParameters Par, ActionSet< Field, RepresentationPolicy > &Aset, SmearingPolicy &Sm)
FieldImplementation::Field Field
const ActionSet< Field, RepresentationPolicy > as
IntegratorParameters Params
Integrator(GridBase *grid, IntegratorParameters Par, ActionSet< Field, RepresentationPolicy > &Aset, SmearingPolicy &Sm)
void update_U(Field &U, double ep)
void update_P(Field &U, int level, double ep)
std::string integrator_name()
FieldImplementation_ FieldImplementation
INHERIT_FIELD_TYPES(FieldImplementation)
LeapFrog(GridBase *grid, IntegratorParameters Par, ActionSet< Field, RepresentationPolicy > &Aset, SmearingPolicy &Sm)
void step(Field &U, int level, int _first, int _last)
LeapFrog< FieldImplementation, SmearingPolicy, RepresentationPolicy > Algorithm
FieldImplementation_ FieldImplementation
std::string integrator_name()
MinimumNorm2(GridBase *grid, IntegratorParameters Par, ActionSet< Field, RepresentationPolicy > &Aset, SmearingPolicy &Sm)
INHERIT_FIELD_TYPES(FieldImplementation)
void step(Field &U, int level, int _first, int _last)