Bridge++  Ver. 2.0.2
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  std::string vlevel;
22  if (!params.fetch_string("verbose_level", vlevel)) {
23  m_vl = vout.set_verbose_level(vlevel);
24  }
25 }
26 
27 
28 //====================================================================
30 {
31  params.set_string("verbose_level", vout.get_verbose_level(m_vl));
32 }
33 
34 
35 //====================================================================
36 void Force_F_Smeared::force_udiv(Field& force_, const Field& eta)
37 {
38  const int Nvol = CommonParameters::Nvol();
39  const int Ndim = CommonParameters::Ndim();
40 
41  const int Nsmear = m_director_smear->get_Nsmear();
42 
43  Field_G force(Nvol, Ndim);
44 
45  if (Nsmear == 0) {
46  m_force->force_udiv(force, eta);
47  } else {
49 
50  m_force->set_config(Uptr);
51  m_force->force_udiv(force, eta);
52 
53  mult_jacobian(force);
54  }
55 
56  copy(force_, force); // force_ = force;
57 }
58 
59 
60 //====================================================================
61 void Force_F_Smeared::force_udiv1(Field& force_, const Field& zeta, const Field& eta)
62 {
63  const int Nvol = CommonParameters::Nvol();
64  const int Ndim = CommonParameters::Ndim();
65 
66  const int Nsmear = m_director_smear->get_Nsmear();
67 
68  Field_G force(Nvol, Ndim);
69 
70  if (Nsmear == 0) {
71  m_force->force_udiv1(force, zeta, eta);
72  } else {
74 
75  m_force->set_config(Uptr);
76  m_force->force_udiv1(force, zeta, eta);
77 
78  mult_jacobian(force);
79  }
80 
81  copy(force_, force); // force_ = force;
82 }
83 
84 
85 //====================================================================
87 {
88  const int Nsmear = m_director_smear->get_Nsmear();
89 
90  for (int i_smear = Nsmear - 1; i_smear >= 0; --i_smear) {
91  Field_G *Uptr = m_director_smear->get_config(i_smear);
92 
93  Field_G f_tmp(force); // copy to temporal field.
94  m_force_smear->force_udiv(force, f_tmp, *Uptr);
95 
96  if (i_smear > 0) copy(f_tmp, force); // ftmp = force;
97  }
98 }
99 
100 
101 //====================================================================
102 //============================================================END=====
Parameters::set_string
void set_string(const string &key, const string &value)
Definition: parameters.cpp:39
CommonParameters::Ndim
static int Ndim()
Definition: commonParameters.h:117
Parameters
Class for parameters.
Definition: parameters.h:46
Force_F_Smeared::get_parameters
void get_parameters(Parameters &) const
Definition: force_F_Smeared.cpp:29
Force::set_config
virtual void set_config(Field *)=0
CommonParameters::Nvol
static int Nvol()
Definition: commonParameters.h:109
Force_F_Smeared::set_parameters
void set_parameters(const Parameters &)
Definition: force_F_Smeared.cpp:19
force_F_Smeared.h
copy
void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition: field.cpp:212
Force_F_Smeared::mult_jacobian
void mult_jacobian(Field_G &force)
Definition: force_F_Smeared.cpp:86
Force_F_Smeared::class_name
static const std::string class_name
Definition: force_F_Smeared.h:42
Force_F_Smeared::m_force_smear
ForceSmear * m_force_smear
Definition: force_F_Smeared.h:48
Force_F_Smeared::force_udiv
void force_udiv(Field &force, const Field &eta)
Definition: force_F_Smeared.cpp:36
Force_F_Smeared::force_udiv1
void force_udiv1(Field &force, const Field &zeta, const Field &eta)
Definition: force_F_Smeared.cpp:61
Force_F_Smeared::m_director_smear
Director_Smear * m_director_smear
Definition: force_F_Smeared.h:49
Bridge::BridgeIO::set_verbose_level
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:133
Director_Smear::get_Nsmear
int get_Nsmear()
get number of applied smearing operation
Definition: director_Smear.h:83
Force::force_udiv
virtual void force_udiv(Field &, const Field &)
Definition: force_F.h:59
Director_Smear::get_config
Field_G * get_config()
Definition: director_Smear.cpp:101
Force_F_Smeared::m_vl
Bridge::VerboseLevel m_vl
Definition: force_F_Smeared.h:45
Parameters::fetch_string
int fetch_string(const string &key, string &value) const
Definition: parameters.cpp:378
ForceSmear::force_udiv
virtual void force_udiv(Field_G &, const Field_G &, const Field_G &)
Definition: forceSmear.h:55
Force::force_udiv1
virtual void force_udiv1(Field &, const Field &, const Field &)
Definition: force_F.h:60
Field
Container of Field-type object.
Definition: field.h:46
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Force_F_Smeared::m_force
Force * m_force
Definition: force_F_Smeared.h:47
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Bridge::BridgeIO::get_verbose_level
static std::string get_verbose_level(const VerboseLevel vl)
Definition: bridgeIO.cpp:154