Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
force_F.cpp
Go to the documentation of this file.
1 
14 #include "force_F.h"
15 
16 // default templates for core and core1
17 //====================================================================
18 void Force::force_core(Field& force_, const Field& eta)
19 {
20  const int Nvol = CommonParameters::Nvol();
21  const int Ndim = CommonParameters::Ndim();
22 
23  Field_G force(Nvol, Ndim);
24 
25  force_udiv(force, eta);
26 
27  mult_generator(force);
28 
29  force_ = force;
30 }
31 
32 
33 //====================================================================
34 void Force::force_core1(Field& force_, const Field& zeta, const Field& eta)
35 {
36  const int Nvol = CommonParameters::Nvol();
37  const int Ndim = CommonParameters::Ndim();
38 
39  Field_G force(Nvol, Ndim);
40 
41  force_udiv1(force, zeta, eta);
42 
43  mult_generator(force);
44 
45  force_ = force;
46 }
47 
48 
49 // utility function
50 //====================================================================
52 {
53  const int Nvol = force.nvol();
54  const int Ndim = force.nex();
55 
56  for (int mu = 0; mu < Ndim; ++mu) {
57  for (int isite = 0; isite < Nvol; ++isite) {
58  Mat_SU_N u = m_U->mat(isite, mu);
59 
60  u *= force.mat(isite, mu);
61  u.at();
62  u *= -2.0;
63 
64  force.set_mat(isite, mu, u);
65  }
66  }
67 }
68 
69 
70 //====================================================================
Container of Field-type object.
Definition: field.h:45
int nvol() const
Definition: field.h:127
Field_G * m_U
Definition: force_F.h:68
Mat_SU_N & at()
antihermitian traceless
Definition: mat_SU_N.h:329
virtual void force_core1(Field &, const Field &, const Field &)
Definition: force_F.cpp:34
SU(N) gauge field.
Definition: field_G.h:38
int nex() const
Definition: field.h:128
virtual void force_core(Field &, const Field &)
Definition: force_F.cpp:18
virtual void force_udiv(Field &, const Field &)
Definition: force_F.h:61
virtual void force_udiv1(Field &, const Field &, const Field &)
Definition: force_F.h:62
void set_mat(const int site, const int mn, const Mat_SU_N &U)
Definition: field_G.h:160
Mat_SU_N mat(const int site, const int mn=0) const
Definition: field_G.h:114
void mult_generator(Field_G &)
Definition: force_F.cpp:51