Bridge++
Ver. 2.0.2
noiseVector_Z2.cpp
Go to the documentation of this file.
1
14
#include "
noiseVector_Z2.h
"
15
16
const
std::string
NoiseVector_Z2::class_name
=
"NoiseVector_Z2"
;
17
18
//====================================================================
19
void
NoiseVector_Z2::set
(
Field
& v)
20
{
21
// This implementation assumes the given field v is complex field.
22
23
m_rand
->
uniform_lex_global
(v);
24
25
const
int
Nex = v.
nex
();
26
const
int
Nvol = v.
nvol
();
27
const
int
Nin = v.
nin
();
28
29
const
double
RF2 = 1.0 / sqrt(2.0);
30
31
for
(
int
ex = 0; ex < Nex; ++ex) {
32
for
(
int
site = 0; site < Nvol; ++site) {
33
for
(
int
in = 0; in < Nin; ++in) {
34
double
rn1 = v.
cmp
(in, site, ex);
35
double
rn2 = floor(2.0 * rn1);
36
double
rn3 = (2.0 * rn2 - 1.0) * RF2;
37
38
v.
set
(in, site, ex, rn3);
39
}
40
}
41
}
42
}
43
44
45
//====================================================================
46
//============================================================END=====
NoiseVector_Z2::class_name
static const std::string class_name
Definition:
noiseVector_Z2.h:31
NoiseVector_Z2::set
void set(Field &v)
setting a noise vector.
Definition:
noiseVector_Z2.cpp:19
Field::set
void set(const int jin, const int site, const int jex, double v)
Definition:
field.h:175
Field::nex
int nex() const
Definition:
field.h:128
Field::nin
int nin() const
Definition:
field.h:126
NoiseVector_Z2::m_rand
RandomNumbers * m_rand
Definition:
noiseVector_Z2.h:34
noiseVector_Z2.h
Field::nvol
int nvol() const
Definition:
field.h:127
Field::cmp
double cmp(const int jin, const int site, const int jex) const
Definition:
field.h:143
RandomNumbers::uniform_lex_global
virtual void uniform_lex_global(Field &)
uniform random number defined on global lattice.
Definition:
randomNumbers.cpp:106
Field
Container of Field-type object.
Definition:
field.h:46
src
lib
Measurements
Fermion
noiseVector_Z2.cpp
Generated on Sat Feb 10 2024 14:20:00 for Bridge++ by
1.8.17