16 #ifdef USE_PARAMETERS_FACTORY 
   28   bool init = Projection::Factory::Register(
"Maximum_SU_N", create_object);
 
   43 #ifdef USE_PARAMETERS_FACTORY 
   58   const string str_vlevel = params.
get_string(
"verbose_level");
 
   67   err += params.
fetch_int(
"maximum_number_of_iteration", Niter);
 
   68   err += params.
fetch_double(
"convergence_criterion", Enorm);
 
  109   int Nex  = Uorg.
nex();
 
  110   int Nvol = Uorg.
nvol();
 
  113   assert(Cst.
nex() == Nex);
 
  114   assert(Cst.
nvol() == Nvol);
 
  115   assert(U.
nex() == Nex);
 
  116   assert(U.
nvol() == Nvol);
 
  119   for (
int ex = 0; ex < Nex; ++ex) {
 
  120     u_tmp.setpart_ex(ex, Cst, ex);
 
  121     u_tmp.addpart_ex(ex, Uorg, ex, 1.0 - alpha);
 
  130                                               double alpha, 
const Field_G& Sigmap,
 
  142   int Nvol = Cst.
nvol();
 
  145   assert(Nvol == G0.
nvol());
 
  146   assert(Nex == G0.
nex());
 
  154   Field_G Udelta(Nvol, Nex), A(Nvol, Nex);
 
  159   for (
int ex = 0; ex < Nex; ++ex) {
 
  160     for (
int site = 0; site < Nvol; ++site) {
 
  165   for (
int iter = 0; iter < 
m_Niter; ++iter) {
 
  166     for (
int ex = 0; ex < Nex; ++ex) {
 
  167       for (
int site = 0; site < Nvol; ++site) {
 
  168         Udelta.set_mat(site, ex, unity);
 
  172     for (
int imt = 0; imt < Nmt; ++imt) {
 
  173       for (
int i1 = 0; i1 < Nc; ++i1) {
 
  174         int i2 = (i1 + 1) % Nc;
 
  192     for (
int ex = 0; ex < Nex; ++ex) {
 
  193       for (
int site = 0; site < Nvol; ++site) {
 
  194         for (
int cc = 0; cc < Nc; ++cc) {
 
  195           retr1 += Udelta.cmp_r(cc * (1 + Nc), site, ex);
 
  202     double deltaV = 1.0 - retr / (Nc * Nvol * Nex * Npe);
 
  207       for (
int ex = 0; ex < Nex; ++ex) {
 
  208         for (
int site = 0; site < Nvol; ++site) {
 
  237   int j1 = 
mindex(i1, i1, Nc);
 
  238   int j2 = 
mindex(i2, i2, Nc);
 
  239   int k1 = 
mindex(i1, i2, Nc);
 
  240   int k2 = 
mindex(i2, i1, Nc);
 
  243   Field_G  v(Nvol, Nex), w(Nvol, Nex);
 
  249   for (
int ex = 0; ex < Nex; ++ex) {
 
  250     for (
int site = 0; site < Nvol; ++site) {
 
  251       at = A.
mat(site, ex);
 
  254         at.
r(j1) * at.r(j1) + at.i(j1) * at.i(j1) + 2.0 * at.r(j1) * at.r(j2)
 
  255         + at.r(k1) * at.r(k1) + at.i(k1) * at.i(k1) - 2.0 * at.i(j1) * at.i(j2)
 
  256         + at.r(k2) * at.r(k2) + at.i(k2) * at.i(k2) - 2.0 * at.r(k1) * at.r(k2)
 
  257         + at.r(j2) * at.r(j2) + at.i(j2) * at.i(j2) + 2.0 * at.i(k1) * at.i(k2);
 
  258       xlamd = 1.0 / sqrt(xlamd);
 
  261       vt.
set(j1, (at.r(j1) + at.r(j2)) * xlamd, (-at.i(j1) + at.i(j2)) * xlamd);
 
  262       vt.
set(k1, (at.r(k2) - at.r(k1)) * xlamd, (-at.i(k2) - at.i(k1)) * xlamd);
 
  263       vt.
set(k2, (at.r(k1) - at.r(k2)) * xlamd, (-at.i(k1) - at.i(k2)) * xlamd);
 
  264       vt.
set(j2, (at.r(j1) + at.r(j2)) * xlamd, (at.i(j1) - at.i(j2)) * xlamd);
 
  266       v.set_mat(site, ex, vt);
 
  270   for (
int ex = 0; ex < Nex; ++ex) {
 
  275   for (
int ex = 0; ex < Nex; ++ex) {
 
  280   for (
int ex = 0; ex < Nex; ++ex) {
 
void detailed(const char *format,...)
 
void Register_string(const string &, const string &)
 
void general(const char *format,...)
 
void Register_int(const string &, const int)
 
void set_parameters(const Parameters ¶ms)
 
void maxTr(Field_G &U, Field_G &V)
 
double m_Enorm
convergence criterion of maximization 
 
Parameters_Projection_Maximum_SU_N()
 
void mult_Field_Gnn(Field_G &w, const int ex, const Field_G &u1, const int ex1, const Field_G &u2, const int ex2)
 
void project(Field_G &U, double alpha, const Field_G &C, const Field_G &Uorg)
projection U = P[alpha, C, Uorg] 
 
int m_Niter
maximum iteration of maximization steps 
 
void crucial(const char *format,...)
 
base class for projection operator into gauge group. 
 
static const std::string class_name
 
static bool Register(const std::string &realm, const creator_callback &cb)
 
static int size()
size of small world. 
 
void maxTr_SU2(int, int, Field_G &, Field_G &, Field_G &)
 
int mindex(int i, int j, int Nc)
 
int non_zero(const double v)
 
void force_recursive(Field_G &Xi, Field_G &iTheta, double alpha, const Field_G &Sigmap, const Field_G &C, const Field_G &U)
force calculation: invalid in this class. 
 
Mat_SU_N mat_dag(const int site, const int mn=0) const 
 
int non_negative(const int v)
 
static int reduce_sum(int count, double *recv_buf, double *send_buf, int pattern=0)
make a global sum of an array of double over the communicator. pattern specifies the dimensions to be...
 
void Register_double(const string &, const double)
 
void set(int c, double re, const double &im)
 
int fetch_double(const string &key, double &val) const 
 
string get_string(const string &key) const 
 
void set_mat(const int site, const int mn, const Mat_SU_N &U)
 
Mat_SU_N mat(const int site, const int mn=0) const 
 
int fetch_int(const string &key, int &val) const 
 
static VerboseLevel set_verbose_level(const std::string &str)
 
Bridge::VerboseLevel m_vl