Bridge++  Ver. 2.0.2
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 //====================================================================
CommonParameters::Ndim
static int Ndim()
Definition: commonParameters.h:117
Force::mult_generator
void mult_generator(Field_G &)
Definition: force_F.cpp:51
Force::force_core1
virtual void force_core1(Field &, const Field &, const Field &)
Definition: force_F.cpp:34
Field::nex
int nex() const
Definition: field.h:128
Field_G::set_mat
void set_mat(const int site, const int mn, const Mat_SU_N &U)
Definition: field_G.h:160
CommonParameters::Nvol
static int Nvol()
Definition: commonParameters.h:109
Force::m_U
Field_G * m_U
Definition: force_F.h:66
SU_N::Mat_SU_N
Definition: mat_SU_N.h:36
SU_N::Mat_SU_N::at
Mat_SU_N & at()
antihermitian traceless
Definition: mat_SU_N.h:375
Force::force_core
virtual void force_core(Field &, const Field &)
Definition: force_F.cpp:18
Field::nvol
int nvol() const
Definition: field.h:127
force_F.h
Force::force_udiv
virtual void force_udiv(Field &, const Field &)
Definition: force_F.h:59
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::mat
Mat_SU_N mat(const int site, const int mn=0) const
Definition: field_G.h:114
Field_G
SU(N) gauge field.
Definition: field_G.h:38