Go to the documentation of this file.
16 #ifdef USE_FACTORY_AUTOREGISTER
18 bool init = Projection_Maximum_SU_N::register_factory();
37 err += params.
fetch_int(
"maximum_number_of_iteration", Niter);
38 err += params.
fetch_double(
"convergence_criterion", Enorm);
89 const int Nex = Uorg.
nex();
90 const int Nvol = Uorg.
nvol();
93 assert(Cst.
nex() == Nex);
94 assert(Cst.
nvol() == Nvol);
95 assert(U.
nex() == Nex);
96 assert(U.
nvol() == Nvol);
99 for (
int ex = 0; ex < Nex; ++ex) {
110 const double alpha,
const Field_G& Sigmap,
122 const int Nvol = Cst.
nvol();
123 const int Nex = Cst.
nex();
125 assert(Nvol == G0.
nvol());
126 assert(Nex == G0.
nex());
128 const static int Nmt = 1;
139 for (
int ex = 0; ex < Nex; ++ex) {
140 for (
int site = 0; site < Nvol; ++site) {
145 for (
int iter = 0; iter <
m_Niter; ++iter) {
148 for (
int ex = 0; ex < Nex; ++ex) {
149 for (
int site = 0; site < Nvol; ++site) {
150 Udelta.
set_mat(site, ex, unity);
154 for (
int imt = 0; imt < Nmt; ++imt) {
155 for (
int i1 = 0; i1 < Nc; ++i1) {
156 int i2 = (i1 + 1) % Nc;
174 for (
int ex = 0; ex < Nex; ++ex) {
175 for (
int site = 0; site < Nvol; ++site) {
176 for (
int cc = 0; cc < Nc; ++cc) {
177 retr1 += Udelta.
cmp_r(cc * (1 + Nc), site, ex);
184 double deltaV = 1.0 - retr / (Nc * Nvol * Nex * Npe);
188 for (
int ex = 0; ex < Nex; ++ex) {
189 for (
int site = 0; site < Nvol; ++site) {
213 const int Nvol = A.
nvol();
214 const int Nex = A.
nex();
219 const int j1 =
mindex(i1, i1, Nc);
220 const int j2 =
mindex(i2, i2, Nc);
221 const int k1 =
mindex(i1, i2, Nc);
222 const int k2 =
mindex(i2, i1, Nc);
229 for (
int ex = 0; ex < Nex; ++ex) {
230 for (
int site = 0; site < Nvol; ++site) {
232 at = A.
mat(site, ex);
235 at.
r(j1) * at.
r(j1) + at.
i(j1) * at.
i(j1) + 2.0 * at.
r(j1) * at.
r(j2)
236 + at.
r(k1) * at.
r(k1) + at.
i(k1) * at.
i(k1) - 2.0 * at.
i(j1) * at.
i(j2)
237 + at.
r(k2) * at.
r(k2) + at.
i(k2) * at.
i(k2) - 2.0 * at.
r(k1) * at.
r(k2)
238 + at.
r(j2) * at.
r(j2) + at.
i(j2) * at.
i(j2) + 2.0 * at.
i(k1) * at.
i(k2);
239 xlamd = 1.0 / sqrt(xlamd);
243 vt.
set(j1, (at.
r(j1) + at.
r(j2)) * xlamd, (-at.
i(j1) + at.
i(j2)) * xlamd);
244 vt.
set(k1, (at.
r(k2) - at.
r(k1)) * xlamd, (-at.
i(k2) - at.
i(k1)) * xlamd);
245 vt.
set(k2, (at.
r(k1) - at.
r(k2)) * xlamd, (-at.
i(k1) - at.
i(k2)) * xlamd);
246 vt.
set(j2, (at.
r(j1) + at.
r(j2)) * xlamd, (at.
i(j1) - at.
i(j2)) * xlamd);
253 for (
int ex = 0; ex < Nex; ++ex) {
258 for (
int ex = 0; ex < Nex; ++ex) {
263 for (
int ex = 0; ex < Nex; ++ex) {
void setpart_ex(int ex, const Field &w, int exw)
void set_string(const string &key, const string &value)
Mat_SU_N mat_dag(const int site, const int mn=0) const
void set_double(const string &key, const double value)
void detailed(const char *format,...)
void set_mat(const int site, const int mn, const Mat_SU_N &U)
static int size()
size of small world.
void maxTr_SU2(const int, const int, Field_G &, Field_G &, Field_G &)
int non_negative(const int v)
void set(int c, const double &re, const double &im)
Bridge::VerboseLevel m_vl
void get_parameters(Parameters ¶ms) const
static int reduce_sum(int count, dcomplex *recv_buf, dcomplex *send_buf, int pattern=0)
make a global sum of an array of dcomplex over the communicator. pattern specifies the dimensions to ...
void addpart_ex(int ex, const Field &w, int exw)
void force_recursive(Field_G &Xi, Field_G &iTheta, const double alpha, const Field_G &Sigmap, const Field_G &C, const Field_G &U)
force calculation: invalid in this class.
void project(Field_G &U, const double alpha, const Field_G &C, const Field_G &Uorg)
projection U = P[alpha, C, Uorg]
int mindex(const int i, const int j, const int Nc)
void set_parameters(const Parameters ¶ms)
double cmp_r(const int cc, const int site, const int mn=0) const
static VerboseLevel set_verbose_level(const std::string &str)
void mult_Field_Gnn(Field_G &W, const int ex, const Field_G &U1, const int ex1, const Field_G &U2, const int ex2)
int non_zero(const double v)
double m_Enorm
convergence criterion of maximization
void set_int(const string &key, const int value)
int fetch_string(const string &key, string &value) const
int fetch_double(const string &key, double &value) const
void maxTr(Field_G &U, const Field_G &V)
static const std::string class_name
void crucial(const char *format,...)
Mat_SU_N mat(const int site, const int mn=0) const
int fetch_int(const string &key, int &value) const
int m_Niter
maximum iteration of maximization steps
void general(const char *format,...)
static std::string get_verbose_level(const VerboseLevel vl)