Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
force_F_Smeared.cpp
Go to the documentation of this file.
1 
14 #include "force_F_Smeared.h"
15 
16 const std::string Force_F_Smeared::class_name = "Force_F_Smeared";
17 
18 //====================================================================
20 {
21  const string str_vlevel = params.get_string("verbose_level");
22 
23  m_vl = vout.set_verbose_level(str_vlevel);
24 }
25 
26 
27 //====================================================================
28 void Force_F_Smeared::force_udiv(Field& force_, const Field& eta)
29 {
30  const int Nvol = CommonParameters::Nvol();
31  const int Ndim = CommonParameters::Ndim();
32 
33  const int Nsmear = m_director_smear->get_Nsmear();
34 
35  Field_G force(Nvol, Ndim);
36 
37  if (Nsmear == 0) {
38  m_force->force_udiv(force, eta);
39  } else {
41 
42  m_force->set_config(Uptr);
43  m_force->force_udiv(force, eta);
44 
45  mult_jacobian(force);
46  }
47 
48  copy(force_, force); // force_ = force;
49 }
50 
51 
52 //====================================================================
53 void Force_F_Smeared::force_udiv1(Field& force_, const Field& zeta, const Field& eta)
54 {
55  const int Nvol = CommonParameters::Nvol();
56  const int Ndim = CommonParameters::Ndim();
57 
58  const int Nsmear = m_director_smear->get_Nsmear();
59 
60  Field_G force(Nvol, Ndim);
61 
62  if (Nsmear == 0) {
63  m_force->force_udiv1(force, zeta, eta);
64  } else {
66 
67  m_force->set_config(Uptr);
68  m_force->force_udiv1(force, zeta, eta);
69 
70  mult_jacobian(force);
71  }
72 
73  copy(force_, force); // force_ = force;
74 }
75 
76 
77 //====================================================================
79 {
80  const int Nsmear = m_director_smear->get_Nsmear();
81 
82  for (int i_smear = Nsmear - 1; i_smear >= 0; --i_smear) {
83  Field_G *Uptr = m_director_smear->get_config(i_smear);
84 
85  Field_G f_tmp(force); // copy to temporal field.
86  m_force_smear->force_udiv(force, f_tmp, *Uptr);
87 
88  if (i_smear > 0) copy(f_tmp, force); // ftmp = force;
89  }
90 }
91 
92 
93 //====================================================================
94 //============================================================END=====
BridgeIO vout
Definition: bridgeIO.cpp:503
Bridge::VerboseLevel m_vl
Definition: force_F.h:69
Container of Field-type object.
Definition: field.h:45
virtual void set_config(Field *)=0
Class for parameters.
Definition: parameters.h:46
void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition: field.cpp:532
void set_parameters(const Parameters &)
ForceSmear * m_force_smear
SU(N) gauge field.
Definition: field_G.h:38
virtual void force_udiv(Field_G &, const Field_G &, const Field_G &)
Definition: forceSmear.h:53
void mult_jacobian(Field_G &force)
static const std::string class_name
virtual void force_udiv(Field &, const Field &)
Definition: force_F.h:61
int get_Nsmear()
get number of applied smearing operation
void force_udiv(Field &force, const Field &eta)
void force_udiv1(Field &force, const Field &zeta, const Field &eta)
Director_Smear * m_director_smear
Field_G * get_config()
virtual void force_udiv1(Field &, const Field &, const Field &)
Definition: force_F.h:62
string get_string(const string &key) const
Definition: parameters.cpp:221
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:131