Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

w_baryon.C

Go to the documentation of this file.
00001 #include<config.h>
00002 CPS_START_NAMESPACE
00003 //--------------------------------------------------------------------
00004 //  CVS keywords
00005 //
00006 //  $Author: zs $
00007 //  $Date: 2004/08/18 11:57:40 $
00008 //  $Header: /space/cvs/cps/cps++/src/alg/alg_w_spect/w_baryon.C,v 1.9 2004/08/18 11:57:40 zs Exp $
00009 //  $Id: w_baryon.C,v 1.9 2004/08/18 11:57:40 zs Exp $
00010 //  $Name: v5_0_8 $
00011 //  $Locker:  $
00012 //  $RCSfile: w_baryon.C,v $
00013 //  $Revision: 1.9 $
00014 //  $Source: /space/cvs/cps/cps++/src/alg/alg_w_spect/w_baryon.C,v $
00015 //  $State: Exp $
00016 //
00017 //--------------------------------------------------------------------
00018 
00019 CPS_END_NAMESPACE
00020 #include <alg/w_all.h>
00021 #include <util/qcdio.h>
00022 #include <util/error.h>
00023 #include <util/verbose.h>
00024 #include <util/lattice.h>
00025 #include <util/vector.h>
00026 #include <comms/glb.h>                 // glb_sum
00027 #include <alg/alg_w_spect.h>         // AlgWspect::GetCounter()
00028 CPS_START_NAMESPACE
00029 
00030 //---------------------------------------------------------------------------
00031 // For the purpose of debugging during code upgrade
00032 //---------------------------------------------------------------------------
00033 //#define DEBUG_W_BARYON
00034 
00035 #ifdef  DEBUG_W_BARYON
00036 //  #define DEBUG_W_BARYON_PROJECT
00037 //  #define DEBUG_W_BARYON_PROJECT_IMAG
00038 //  #define DEBUG_W_BARYON_DIRAC
00039 //  #define DEBUG_W_BARYON_COLOR
00040 CPS_END_NAMESPACE
00041 #include <util/gjp.h>
00042 CPS_START_NAMESPACE
00043 #endif
00044 
00045 //---------------------------------------------------------------------------
00046 // static data members
00047 //---------------------------------------------------------------------------
00048 char * WspectBaryon::d_class_name = "WspectBaryon";
00049 
00050 
00051 //---------------------------------------------------------------------------
00052 // WspectBaryon::WspectBaryon()
00053 //---------------------------------------------------------------------------
00054 WspectBaryon::WspectBaryon(const WspectQuark &q1, 
00055                            const WspectQuark &q2, 
00056                            const WspectQuark &q3,
00057                            const WspectHyperRectangle & whr,
00058                            WspectBaryon::Constitutes con,
00059                            WspectBaryon::TwoDiracMats dmats)
00060   : d_quark1_p(q1.Data()),
00061     d_quark2_p(q2.Data()),
00062     d_quark3_p(q3.Data()),
00063     d_flavors(con),
00064     d_whr(whr),
00065     d_diracs(dmats)
00066 {
00067   Everything();
00068 }
00069 
00070 
00071 
00072 //---------------------------------------------------------------------------
00073 // WspectBaryon::WspectBaryon()
00074 //---------------------------------------------------------------------------
00075 WspectBaryon::WspectBaryon(const IFloat *q1, 
00076                            const IFloat *q2, 
00077                            const IFloat *q3,
00078                            const WspectHyperRectangle & whr,
00079                            WspectBaryon::Constitutes con,
00080                            WspectBaryon::TwoDiracMats dmats) 
00081   : d_quark1_p(q1),
00082     d_quark2_p(q2),
00083     d_flavors(con),
00084     d_quark3_p(q3),
00085     d_whr(whr),
00086     d_diracs(dmats)
00087 {
00088   Everything();
00089 }
00090 
00091 
00092 //---------------------------------------------------------------------------
00093 // void WspectBaryon::Everything()
00094 //---------------------------------------------------------------------------
00095 void
00096 WspectBaryon::Everything() 
00097 {
00098   VRB.Func(d_class_name, ctor_str);
00099 
00100   // consistency check -- both quark prop's are from the same source
00101   //-------------------------------------------------------------------------
00102   // Ping -- later on, we may want to check for the consistency 
00103   //         of WspectHyperRectangle of each quark propagator. ???
00104   //   ERR.General(d_class_name, ctor_str, "quarks w/ diff dir or src\n");
00105 
00106 
00107 
00108   // calculate d_lclMin and d_lclMax, whose [prop_dir]th elements are 
00109   // meant to be modified.
00110   //-------------------------------------------------------------------------
00111   {
00112     d_prop_dir = d_whr.dir();  
00113     const int *low  = d_whr.lclMin();
00114     const int *high = d_whr.lclMax();
00115     for (int i = 0; i < LORENTZs; ++i) {
00116       d_lclMin[i] = low[i];
00117       d_lclMax[i] = high[i];
00118     }
00119   }
00120   
00121   // number of sites along the propagation direction
00122   //-------------------------------------------------------------------------
00123   int glb_walls = glb_sites[d_prop_dir];
00124 
00125   // dynamically allocate space and zero them out.
00126   //-------------------------------------------------------------------------
00127   {
00128     d_buffer_size = glb_walls * 4;
00129     d_buffer_p = (Float *)smalloc(d_buffer_size*sizeof(Float));
00130 
00131     if (!d_buffer_p) 
00132       ERR.Pointer(d_class_name, ctor_str, empty_str);
00133     VRB.Smalloc(d_class_name,ctor_str, empty_str, 
00134                 d_buffer_p, d_buffer_size*sizeof(IFloat));
00135 
00136     for (int i = 0; i < d_buffer_size; ++i) {
00137       *d_buffer_p++ = 0.0;      
00138     }
00139     d_buffer_p -= d_buffer_size;
00140     
00141     d_unit_p  = d_buffer_p;
00142     d_gamma_p = d_unit_p  + glb_walls;    
00143     d_up_p    = d_gamma_p + glb_walls;    
00144     d_down_p  = d_up_p    + glb_walls;    
00145   }
00146   
00147 
00148   // Take care of local parts of data
00149   //-------------------------------------------------------------------------
00150   // Note: each node takes care of itself simultaneously.
00151   // 
00152   {
00153     int lcl_walls      = lcl_sites[d_whr.dir()];
00154     Float *lcl_unit_p  = d_unit_p  + lcl2glb_offset[d_whr.dir()];
00155     Float *lcl_gamma_p = d_gamma_p + lcl2glb_offset[d_whr.dir()];
00156     for (int lclW = 0; lclW < lcl_walls; ++lclW) {
00157       *lcl_unit_p++  = DiracProjectUnit(lclW);
00158       *lcl_gamma_p++ = DiracProjectGamma(lclW);
00159     }
00160   }
00161   
00162   // Global sum over all walls
00163   //-------------------------------------------------------------------------
00164   {
00165     for (int glbW = 0; glbW < glb_walls; ++glbW) {
00166       glb_sum((Float *)(d_unit_p + glbW));      
00167       glb_sum((Float *)(d_gamma_p + glbW));
00168       d_up_p  [glbW] = d_unit_p[glbW] + d_gamma_p[glbW];
00169       d_down_p[glbW] = d_unit_p[glbW] - d_gamma_p[glbW];
00170     }
00171   }
00172 
00173 
00174   
00175 #ifdef DEBUG_W_BARYON_DIRAC
00176   {
00177 #if TARGET==cpsMPI
00178     using MPISCU::fprintf;
00179 #endif
00180     FILE *fp = Fopen("baryon.dirac.dat", "a");
00181     Complex answer;
00182     int lcl[LORENTZs];  
00183     for (lcl[0] = 0; lcl[0] < GJP.XnodeSites(); lcl[0]++) {
00184       for (lcl[1] = 0; lcl[1] < GJP.YnodeSites(); lcl[1]++) {
00185         for (lcl[2] = 0; lcl[2] < GJP.YnodeSites(); lcl[2]++) {
00186           for (lcl[3] = 0; lcl[3] < GJP.YnodeSites(); lcl[3]++) {
00187             for (int Dx = 0; Dx < DIRACs; ++Dx) {
00188               for (int Dy = 0; Dy < DIRACs; ++Dy) {
00189                 answer = DiracAlgebra(Dx, Dy, lcl);
00190                 Fprintf(fp, 
00191                         "site[%d %d %d %d] spin[%d%d]: [%g %g]\n",
00192                         lcl[0], lcl[1], lcl[2], lcl[3], Dx, Dy,
00193                         answer.real(), answer.imag());
00194               }
00195             }
00196           }
00197         }
00198       }
00199     }
00200     Fclose(fp);
00201   }
00202 #endif  // #ifdef DEBUG_W_BARYON_DIRAC
00203 
00204 #ifdef DEBUG_W_BARYON_COLOR
00205   {
00206 #if TARGET==cpsMPI
00207     using MPISCU::fprintf;
00208 #endif
00209     FILE *fp = Fopen("baryon.color.dat", "a");
00210     Complex answer;
00211     int lcl[LORENTZs];  
00212     for (lcl[0] = 0; lcl[0] < GJP.XnodeSites(); lcl[0]++) {
00213       for (lcl[1] = 0; lcl[1] < GJP.YnodeSites(); lcl[1]++) {
00214         for (lcl[2] = 0; lcl[2] < GJP.YnodeSites(); lcl[2]++) {
00215           for (lcl[3] = 0; lcl[3] < GJP.YnodeSites(); lcl[3]++) {
00216             for (int D1x = 0; D1x < DIRACs; ++D1x) {
00217               for (int D1y = 0; D1y < DIRACs; ++D1y) {
00218                 for (int D2x = 0; D2x < DIRACs; ++D2x) {
00219                   for (int D2y = 0; D2y < DIRACs; ++D2y) {
00220                     for (int D3x = 0; D3x < DIRACs; ++D3x) {
00221                       for (int D3y = 0; D3y < DIRACs; ++D3y) {
00222                         answer = ColorAlgebra(D1x, D2x, D3x,
00223                                               D1y, D2y, D3y, lcl);
00224                         Fprintf(fp, 
00225                                 "site[%d %d %d %d] spin[%d%d][%d%d][%d%d]: [%g %g]\n",
00226                                 lcl[0], lcl[1], lcl[2], lcl[3], 
00227                                 D1x, D1y, D2x, D2y, D3x, D3y,
00228                                 answer.real(), answer.imag());
00229                       }
00230                     }
00231                   }
00232                 }
00233               }
00234             }
00235           }
00236         }
00237       }
00238     }
00239     Fclose(fp);
00240   }
00241 
00242 #endif   //  #ifdef DEBUG_W_BARYON_COLOR
00243 
00244 
00245 }
00246 
00247 
00248 
00249 //---------------------------------------------------------------------------
00250 // WspectBaryon::~WspectBaryon()
00251 //---------------------------------------------------------------------------
00252 WspectBaryon::~WspectBaryon()
00253 {
00254   VRB.Func(d_class_name, dtor_str);
00255   VRB.Sfree(d_class_name, dtor_str, empty_str, d_buffer_p);
00256   sfree(d_buffer_p);
00257 }
00258 
00259 
00260 
00261 //---------------------------------------------------------------------------
00262 // void
00263 // WspectBaryon::ColorAlgebra(int...)
00264 //--------------------------------------------------------------------------- 
00265 // Two color tensors involved: 3! x 3! = 36 terms
00266 //--------------------------------------------------------------------------- 
00267 void
00268 WspectBaryon::ColorAlgebra(int D1x, int D2x, int D3x,
00269                            int D1y, int D2y, int D3y,
00270                            int local_site_offset, Complex &answer)
00271 {
00272   int off_Cy = WspectQuark::weightSrcColor();
00273   int off_Dy = WspectQuark::weightSrcDirac();
00274   int off_Cy2 = off_Cy / COMPLEXs;  
00275 
00276   // pointer to quark prop data for the specified local site and dirac index 
00277   const Complex *q1 = (const Complex *)(d_quark1_p + off_Dy * D1y + 
00278                                         local_site_offset + 
00279                                         (COMPLEXs*COLORs) * D1x);
00280   const Complex *q2 = (const Complex *)(d_quark2_p + off_Dy * D2y + 
00281                                         local_site_offset + 
00282                                         (COMPLEXs*COLORs) * D2x); 
00283   const Complex *q3 = (const Complex *)(d_quark3_p + off_Dy * D3y + 
00284                                         local_site_offset + 
00285                                         (COMPLEXs*COLORs) * D3x);
00286 
00287   // 6 color indexes:    sink x (q1, q2, q3) ; source y (q1, q2, q3)
00288   answer += q1[0        ] * q2[1+off_Cy2] * q3[2+off_Cy ]; //012012
00289   answer += q1[  off_Cy ] * q2[1        ] * q3[2+off_Cy2]; //012201
00290   answer += q1[  off_Cy2] * q2[1+off_Cy ] * q3[2        ]; //012120
00291 
00292   answer -= q1[  off_Cy ] * q2[1+off_Cy2] * q3[2        ]; //012210
00293   answer -= q1[0        ] * q2[1+off_Cy ] * q3[2+off_Cy2]; //012021
00294   answer -= q1[  off_Cy2] * q2[1        ] * q3[2+off_Cy ]; //012102
00295 
00296   answer += q1[2        ] * q2[  off_Cy2] * q3[1+off_Cy ]; //201012
00297   answer += q1[2+off_Cy ] * q2[0        ] * q3[1+off_Cy2]; //201201
00298   answer += q1[2+off_Cy2] * q2[  off_Cy ] * q3[1        ]; //201120
00299 
00300   answer -= q1[2+off_Cy ] * q2[  off_Cy2] * q3[1        ]; //201210
00301   answer -= q1[2        ] * q2[  off_Cy ] * q3[1+off_Cy2]; //201021
00302   answer -= q1[2+off_Cy2] * q2[0        ] * q3[1+off_Cy ]; //201102
00303 
00304   answer += q1[1        ] * q2[2+off_Cy2] * q3[  off_Cy ]; //120012
00305   answer += q1[1+off_Cy ] * q2[2        ] * q3[  off_Cy2]; //120201
00306   answer += q1[1+off_Cy2] * q2[2+off_Cy ] * q3[0        ]; //120120
00307 
00308   answer -= q1[1+off_Cy ] * q2[2+off_Cy2] * q3[0        ]; //120210
00309   answer -= q1[1        ] * q2[2+off_Cy ] * q3[  off_Cy2]; //120021
00310   answer -= q1[1+off_Cy2] * q2[2        ] * q3[  off_Cy ]; //120102
00311 
00312   answer -= q1[2        ] * q2[1+off_Cy2] * q3[  off_Cy ]; //210012
00313   answer -= q1[2+off_Cy ] * q2[1        ] * q3[  off_Cy2]; //210201
00314   answer -= q1[2+off_Cy2] * q2[1+off_Cy ] * q3[0        ]; //210120
00315 
00316   answer += q1[2+off_Cy ] * q2[1+off_Cy2] * q3[0        ]; //210210
00317   answer += q1[2        ] * q2[1+off_Cy ] * q3[  off_Cy2]; //210021
00318   answer += q1[2+off_Cy2] * q2[1        ] * q3[  off_Cy ]; //210102
00319 
00320   answer -= q1[0        ] * q2[2+off_Cy2] * q3[1+off_Cy ]; //021012
00321   answer -= q1[  off_Cy ] * q2[2        ] * q3[1+off_Cy2]; //021201
00322   answer -= q1[  off_Cy2] * q2[2+off_Cy ] * q3[1        ]; //021120
00323 
00324   answer += q1[  off_Cy ] * q2[2+off_Cy2] * q3[1        ]; //021210
00325   answer += q1[0        ] * q2[2+off_Cy ] * q3[1+off_Cy2]; //021021
00326   answer += q1[  off_Cy2] * q2[2        ] * q3[1+off_Cy ]; //021102
00327 
00328   answer -= q1[1        ] * q2[  off_Cy2] * q3[2+off_Cy ]; //102012
00329   answer -= q1[1+off_Cy ] * q2[0        ] * q3[2+off_Cy2]; //102201
00330   answer -= q1[1+off_Cy2] * q2[  off_Cy ] * q3[2        ]; //102120
00331 
00332   answer += q1[1+off_Cy ] * q2[  off_Cy2] * q3[2        ]; //102210
00333   answer += q1[1        ] * q2[  off_Cy ] * q3[2+off_Cy2]; //102021
00334   answer += q1[1+off_Cy2] * q2[0        ] * q3[2+off_Cy ]; //102102
00335 
00336 }
00337 
00338 
00339 
00340 //---------------------------------------------------------------------------
00341 // void
00342 // WspectBaryon::DiracAlgebraABC(int...)
00343 //--------------------------------------------------------------------------- 
00344 // Note:
00345 //    An additional minus should be here for the mu = prop_dir 
00346 //    case, however, since we are allowing the prop_dir to be 
00347 //    different than t, it is better for us to taken it into account
00348 //    in the end.
00349 //
00350 // Conventions of Gamma Matrices:
00351 // 
00352 //      gamma(X)      gamma(Y)      gamma(Z)      gamma(T)      gamma(5)
00353 //    0  0  0  i    0  0  0 -1    0  0  i  0    0  0  1  0    1  0  0  0 
00354 //    0  0  i  0    0  0  1  0    0  0  0 -i    0  0  0  1    0  1  0  0
00355 //    0 -i  0  0    0  1  0  0   -i  0  0  0    1  0  0  0    0  0 -1  0
00356 //   -i  0  0  0   -1  0  0  0    0  i  0  0    0  1  0  0    0  0  0 -1
00357 //
00358 //    C = gamma(Y) * gamma(T) = 0  1  0  0
00359 //                             -1  0  0  0
00360 //                              0  0  0 -1
00361 //                              0  0  1  0
00362 //
00363 // Form of Gamma Matrices:                   Calculation here:
00364 // 
00365 //    C GammaX =  0  0  i  0                 (C GammaX)...(C GammaX)^(c.c.)
00366 //                0  0  0 -i
00367 //                i  0  0  0
00368 //                0 -i  0  0
00369 //
00370 //    C GammaY =  0  0  1  0                 (C GammaY)...(C GammaY)^(c.c.)
00371 //                0  0  0  1
00372 //                1  0  0  0
00373 //                0  1  0  0
00374 //
00375 //    C GammaZ =  0  0  0 -i                 (C GammaZ)...(C GammaZ)^(c.c.)
00376 //                0  0 -i  0
00377 //                0 -i  0  0
00378 //               -i  0  0  0
00379 //   
00380 //    C GammaT =  0  0  0  1                 (C GammaT)...(C GammaT)^(c.c.)
00381 //                0  0 -1  0
00382 //                0 -1  0  0
00383 //                1  0  0  0
00384 //
00385 //    C Gamma5 =  0  1  0  0                 (C Gamma5)...(C Gamma5)
00386 //               -1  0  0  0
00387 //                0  0  0  1
00388 //                0  0 -1  1
00389 // 
00390 //--------------------------------------------------------------------------- 
00391 void
00392 WspectBaryon::DiracAlgebraABC(int Dx, int Dy, int local_site_offset, 
00393                               Complex &answer) 
00394 {
00395   Complex subtract(0.0, 0.0);
00396   
00397   switch (d_diracs) {
00398   case GammaXGammaX:       
00399 
00400     ColorAlgebra(Dx, 0, 2, Dy, 0, 2, local_site_offset, answer);
00401     ColorAlgebra(Dx, 1, 3, Dy, 0, 2, local_site_offset, subtract);
00402     ColorAlgebra(Dx, 2, 0, Dy, 0, 2, local_site_offset, answer);
00403     ColorAlgebra(Dx, 3, 1, Dy, 0, 2, local_site_offset, subtract);
00404   
00405     ColorAlgebra(Dx, 0, 2, Dy, 1, 3, local_site_offset, subtract);
00406     ColorAlgebra(Dx, 1, 3, Dy, 1, 3, local_site_offset, answer);
00407     ColorAlgebra(Dx, 2, 0, Dy, 1, 3, local_site_offset, subtract);
00408     ColorAlgebra(Dx, 3, 1, Dy, 1, 3, local_site_offset, answer);
00409   
00410     ColorAlgebra(Dx, 0, 2, Dy, 2, 0, local_site_offset, answer);
00411     ColorAlgebra(Dx, 1, 3, Dy, 2, 0, local_site_offset, subtract);
00412     ColorAlgebra(Dx, 2, 0, Dy, 2, 0, local_site_offset, answer);
00413     ColorAlgebra(Dx, 3, 1, Dy, 2, 0, local_site_offset, subtract);
00414   
00415     ColorAlgebra(Dx, 0, 2, Dy, 3, 1, local_site_offset, subtract);
00416     ColorAlgebra(Dx, 1, 3, Dy, 3, 1, local_site_offset, answer);
00417     ColorAlgebra(Dx, 2, 0, Dy, 3, 1, local_site_offset, subtract);
00418     ColorAlgebra(Dx, 3, 1, Dy, 3, 1, local_site_offset, answer);
00419 
00420     break;
00421 
00422   case GammaYGammaY:
00423 
00424     ColorAlgebra(Dx, 0, 2, Dy, 0, 2, local_site_offset, answer);
00425     ColorAlgebra(Dx, 1, 3, Dy, 0, 2, local_site_offset, answer);
00426     ColorAlgebra(Dx, 2, 0, Dy, 0, 2, local_site_offset, answer);
00427     ColorAlgebra(Dx, 3, 1, Dy, 0, 2, local_site_offset, answer);
00428   
00429     ColorAlgebra(Dx, 0, 2, Dy, 1, 3, local_site_offset, answer);
00430     ColorAlgebra(Dx, 1, 3, Dy, 1, 3, local_site_offset, answer);
00431     ColorAlgebra(Dx, 2, 0, Dy, 1, 3, local_site_offset, answer);
00432     ColorAlgebra(Dx, 3, 1, Dy, 1, 3, local_site_offset, answer);
00433   
00434     ColorAlgebra(Dx, 0, 2, Dy, 2, 0, local_site_offset, answer);
00435     ColorAlgebra(Dx, 1, 3, Dy, 2, 0, local_site_offset, answer);
00436     ColorAlgebra(Dx, 2, 0, Dy, 2, 0, local_site_offset, answer);
00437     ColorAlgebra(Dx, 3, 1, Dy, 2, 0, local_site_offset, answer);
00438   
00439     ColorAlgebra(Dx, 0, 2, Dy, 3, 1, local_site_offset, answer);
00440     ColorAlgebra(Dx, 1, 3, Dy, 3, 1, local_site_offset, answer);
00441     ColorAlgebra(Dx, 2, 0, Dy, 3, 1, local_site_offset, answer);
00442     ColorAlgebra(Dx, 3, 1, Dy, 3, 1, local_site_offset, answer);
00443     
00444     break;
00445     
00446   case GammaZGammaZ:  
00447 
00448     ColorAlgebra(Dx, 0, 3, Dy, 0, 3, local_site_offset, answer);
00449     ColorAlgebra(Dx, 1, 2, Dy, 0, 3, local_site_offset, answer);
00450     ColorAlgebra(Dx, 2, 1, Dy, 0, 3, local_site_offset, answer);
00451     ColorAlgebra(Dx, 3, 0, Dy, 0, 3, local_site_offset, answer);
00452   
00453     ColorAlgebra(Dx, 0, 3, Dy, 1, 2, local_site_offset, answer);
00454     ColorAlgebra(Dx, 1, 2, Dy, 1, 2, local_site_offset, answer);
00455     ColorAlgebra(Dx, 2, 1, Dy, 1, 2, local_site_offset, answer);
00456     ColorAlgebra(Dx, 3, 0, Dy, 1, 2, local_site_offset, answer);
00457   
00458     ColorAlgebra(Dx, 0, 3, Dy, 2, 1, local_site_offset, answer);
00459     ColorAlgebra(Dx, 1, 2, Dy, 2, 1, local_site_offset, answer);
00460     ColorAlgebra(Dx, 2, 1, Dy, 2, 1, local_site_offset, answer);
00461     ColorAlgebra(Dx, 3, 0, Dy, 2, 1, local_site_offset, answer);
00462   
00463     ColorAlgebra(Dx, 0, 3, Dy, 3, 0, local_site_offset, answer);
00464     ColorAlgebra(Dx, 1, 2, Dy, 3, 0, local_site_offset, answer);
00465     ColorAlgebra(Dx, 2, 1, Dy, 3, 0, local_site_offset, answer);
00466     ColorAlgebra(Dx, 3, 0, Dy, 3, 0, local_site_offset, answer);
00467 
00468     break;
00469 
00470   case GammaTGammaT:
00471 
00472     ColorAlgebra(Dx, 0, 3, Dy, 0, 3, local_site_offset, answer);
00473     ColorAlgebra(Dx, 1, 2, Dy, 0, 3, local_site_offset, subtract);
00474     ColorAlgebra(Dx, 2, 1, Dy, 0, 3, local_site_offset, subtract);
00475     ColorAlgebra(Dx, 3, 0, Dy, 0, 3, local_site_offset, answer);
00476   
00477     ColorAlgebra(Dx, 0, 3, Dy, 1, 2, local_site_offset, subtract);
00478     ColorAlgebra(Dx, 1, 2, Dy, 1, 2, local_site_offset, answer);
00479     ColorAlgebra(Dx, 2, 1, Dy, 1, 2, local_site_offset, answer);
00480     ColorAlgebra(Dx, 3, 0, Dy, 1, 2, local_site_offset, subtract);
00481   
00482     ColorAlgebra(Dx, 0, 3, Dy, 2, 1, local_site_offset, subtract);
00483     ColorAlgebra(Dx, 1, 2, Dy, 2, 1, local_site_offset, answer);
00484     ColorAlgebra(Dx, 2, 1, Dy, 2, 1, local_site_offset, answer);
00485     ColorAlgebra(Dx, 3, 0, Dy, 2, 1, local_site_offset, subtract);
00486   
00487     ColorAlgebra(Dx, 0, 3, Dy, 3, 0, local_site_offset, answer);
00488     ColorAlgebra(Dx, 1, 2, Dy, 3, 0, local_site_offset, subtract);
00489     ColorAlgebra(Dx, 2, 1, Dy, 3, 0, local_site_offset, subtract);
00490     ColorAlgebra(Dx, 3, 0, Dy, 3, 0, local_site_offset, answer);
00491 
00492     break;    
00493 
00494   case Gamma5Gamma5:
00495 
00496     ColorAlgebra(Dx, 0, 1, Dy, 0, 1, local_site_offset, answer);
00497     ColorAlgebra(Dx, 1, 0, Dy, 0, 1, local_site_offset, subtract);
00498     ColorAlgebra(Dx, 2, 3, Dy, 0, 1, local_site_offset, answer);
00499     ColorAlgebra(Dx, 3, 2, Dy, 0, 1, local_site_offset, subtract);
00500   
00501     ColorAlgebra(Dx, 0, 1, Dy, 1, 0, local_site_offset, subtract);
00502     ColorAlgebra(Dx, 1, 0, Dy, 1, 0, local_site_offset, answer);
00503     ColorAlgebra(Dx, 2, 3, Dy, 1, 0, local_site_offset, subtract);
00504     ColorAlgebra(Dx, 3, 2, Dy, 1, 0, local_site_offset, answer);
00505   
00506     ColorAlgebra(Dx, 0, 1, Dy, 2, 3, local_site_offset, answer);
00507     ColorAlgebra(Dx, 1, 0, Dy, 2, 3, local_site_offset, subtract);
00508     ColorAlgebra(Dx, 2, 3, Dy, 2, 3, local_site_offset, answer);
00509     ColorAlgebra(Dx, 3, 2, Dy, 2, 3, local_site_offset, subtract);
00510   
00511     ColorAlgebra(Dx, 0, 1, Dy, 3, 2, local_site_offset, subtract);
00512     ColorAlgebra(Dx, 1, 0, Dy, 3, 2, local_site_offset, answer);
00513     ColorAlgebra(Dx, 2, 3, Dy, 3, 2, local_site_offset, subtract);
00514     ColorAlgebra(Dx, 3, 2, Dy, 3, 2, local_site_offset, answer);
00515     
00516     break;    
00517 
00518   case UnitUnit:
00519 
00520     ColorAlgebra(Dx, 0, 1, Dy, 0, 1, local_site_offset, answer);
00521     ColorAlgebra(Dx, 1, 0, Dy, 0, 1, local_site_offset, subtract);
00522     ColorAlgebra(Dx, 2, 3, Dy, 0, 1, local_site_offset, subtract);
00523     ColorAlgebra(Dx, 3, 2, Dy, 0, 1, local_site_offset, answer);
00524   
00525     ColorAlgebra(Dx, 0, 1, Dy, 1, 0, local_site_offset, subtract);
00526     ColorAlgebra(Dx, 1, 0, Dy, 1, 0, local_site_offset, answer);
00527     ColorAlgebra(Dx, 2, 3, Dy, 1, 0, local_site_offset, answer);
00528     ColorAlgebra(Dx, 3, 2, Dy, 1, 0, local_site_offset, subtract);
00529   
00530     ColorAlgebra(Dx, 0, 1, Dy, 2, 3, local_site_offset, subtract);
00531     ColorAlgebra(Dx, 1, 0, Dy, 2, 3, local_site_offset, answer);
00532     ColorAlgebra(Dx, 2, 3, Dy, 2, 3, local_site_offset, answer);
00533     ColorAlgebra(Dx, 3, 2, Dy, 2, 3, local_site_offset, subtract);
00534   
00535     ColorAlgebra(Dx, 0, 1, Dy, 3, 2, local_site_offset, answer);
00536     ColorAlgebra(Dx, 1, 0, Dy, 3, 2, local_site_offset, subtract);
00537     ColorAlgebra(Dx, 2, 3, Dy, 3, 2, local_site_offset, subtract);
00538     ColorAlgebra(Dx, 3, 2, Dy, 3, 2, local_site_offset, answer);
00539     
00540     break;    
00541   }
00542 
00543   answer -= subtract;  
00544 }
00545 
00546 
00547 
00548 //---------------------------------------------------------------------------
00549 // void
00550 // WspectBaryonW::DiracAlgebraAAC(int...)
00551 //--------------------------------------------------------------------------- 
00552 void
00553 WspectBaryon::DiracAlgebraAAC(int Dx, int Dy, int local_site_offset,
00554                               Complex &answer)
00555 {
00556 
00557   Complex subtract(0.0, 0.0);
00558   
00559   switch (d_diracs) {
00560 
00561   case GammaXGammaX:
00562 
00563     ColorAlgebra(Dx, 0, 2, 0, Dy, 2, local_site_offset, answer);
00564     ColorAlgebra(Dx, 1, 3, 0, Dy, 2, local_site_offset, subtract);
00565     ColorAlgebra(Dx, 2, 0, 0, Dy, 2, local_site_offset, answer);
00566     ColorAlgebra(Dx, 3, 1, 0, Dy, 2, local_site_offset, subtract);
00567   
00568     ColorAlgebra(Dx, 0, 2, 1, Dy, 3, local_site_offset, subtract);
00569     ColorAlgebra(Dx, 1, 3, 1, Dy, 3, local_site_offset, answer);
00570     ColorAlgebra(Dx, 2, 0, 1, Dy, 3, local_site_offset, subtract);
00571     ColorAlgebra(Dx, 3, 1, 1, Dy, 3, local_site_offset, answer);
00572   
00573     ColorAlgebra(Dx, 0, 2, 2, Dy, 0, local_site_offset, answer);
00574     ColorAlgebra(Dx, 1, 3, 2, Dy, 0, local_site_offset, subtract);
00575     ColorAlgebra(Dx, 2, 0, 2, Dy, 0, local_site_offset, answer);
00576     ColorAlgebra(Dx, 3, 1, 2, Dy, 0, local_site_offset, subtract);
00577   
00578     ColorAlgebra(Dx, 0, 2, 3, Dy, 1, local_site_offset, subtract);
00579     ColorAlgebra(Dx, 1, 3, 3, Dy, 1, local_site_offset, answer);
00580     ColorAlgebra(Dx, 2, 0, 3, Dy, 1, local_site_offset, subtract);
00581     ColorAlgebra(Dx, 3, 1, 3, Dy, 1, local_site_offset, answer);
00582 
00583     break;    
00584 
00585   case GammaYGammaY:
00586 
00587     ColorAlgebra(Dx, 0, 2, 0, Dy, 2, local_site_offset, answer);
00588     ColorAlgebra(Dx, 1, 3, 0, Dy, 2, local_site_offset, answer);
00589     ColorAlgebra(Dx, 2, 0, 0, Dy, 2, local_site_offset, answer);
00590     ColorAlgebra(Dx, 3, 1, 0, Dy, 2, local_site_offset, answer);
00591   
00592     ColorAlgebra(Dx, 0, 2, 1, Dy, 3, local_site_offset, answer);
00593     ColorAlgebra(Dx, 1, 3, 1, Dy, 3, local_site_offset, answer);
00594     ColorAlgebra(Dx, 2, 0, 1, Dy, 3, local_site_offset, answer);
00595     ColorAlgebra(Dx, 3, 1, 1, Dy, 3, local_site_offset, answer);
00596   
00597     ColorAlgebra(Dx, 0, 2, 2, Dy, 0, local_site_offset, answer);
00598     ColorAlgebra(Dx, 1, 3, 2, Dy, 0, local_site_offset, answer);
00599     ColorAlgebra(Dx, 2, 0, 2, Dy, 0, local_site_offset, answer);
00600     ColorAlgebra(Dx, 3, 1, 2, Dy, 0, local_site_offset, answer);
00601   
00602     ColorAlgebra(Dx, 0, 2, 3, Dy, 1, local_site_offset, answer);
00603     ColorAlgebra(Dx, 1, 3, 3, Dy, 1, local_site_offset, answer);
00604     ColorAlgebra(Dx, 2, 0, 3, Dy, 1, local_site_offset, answer);
00605     ColorAlgebra(Dx, 3, 1, 3, Dy, 1, local_site_offset, answer);
00606 
00607     break;
00608     
00609   case GammaZGammaZ:
00610 
00611     ColorAlgebra(Dx, 0, 3, 0, Dy, 3, local_site_offset, answer);
00612     ColorAlgebra(Dx, 1, 2, 0, Dy, 3, local_site_offset, answer);
00613     ColorAlgebra(Dx, 2, 1, 0, Dy, 3, local_site_offset, answer);
00614     ColorAlgebra(Dx, 3, 0, 0, Dy, 3, local_site_offset, answer);
00615   
00616     ColorAlgebra(Dx, 0, 3, 1, Dy, 2, local_site_offset, answer);
00617     ColorAlgebra(Dx, 1, 2, 1, Dy, 2, local_site_offset, answer);
00618     ColorAlgebra(Dx, 2, 1, 1, Dy, 2, local_site_offset, answer);
00619     ColorAlgebra(Dx, 3, 0, 1, Dy, 2, local_site_offset, answer);
00620   
00621     ColorAlgebra(Dx, 0, 3, 2, Dy, 1, local_site_offset, answer);      
00622     ColorAlgebra(Dx, 1, 2, 2, Dy, 1, local_site_offset, answer);
00623     ColorAlgebra(Dx, 2, 1, 2, Dy, 1, local_site_offset, answer);
00624     ColorAlgebra(Dx, 3, 0, 2, Dy, 1, local_site_offset, answer);
00625   
00626     ColorAlgebra(Dx, 0, 3, 3, Dy, 0, local_site_offset, answer);
00627     ColorAlgebra(Dx, 1, 2, 3, Dy, 0, local_site_offset, answer);
00628     ColorAlgebra(Dx, 2, 1, 3, Dy, 0, local_site_offset, answer);
00629     ColorAlgebra(Dx, 3, 0, 3, Dy, 0, local_site_offset, answer);
00630 
00631     break;
00632     
00633   case GammaTGammaT:
00634 
00635     ColorAlgebra(Dx, 0, 3, 0, Dy, 3, local_site_offset, answer);
00636     ColorAlgebra(Dx, 1, 2, 0, Dy, 3, local_site_offset, subtract);
00637     ColorAlgebra(Dx, 2, 1, 0, Dy, 3, local_site_offset, subtract);
00638     ColorAlgebra(Dx, 3, 0, 0, Dy, 3, local_site_offset, answer);
00639   
00640     ColorAlgebra(Dx, 0, 3, 1, Dy, 2, local_site_offset, subtract);
00641     ColorAlgebra(Dx, 1, 2, 1, Dy, 2, local_site_offset, answer);
00642     ColorAlgebra(Dx, 2, 1, 1, Dy, 2, local_site_offset, answer);
00643     ColorAlgebra(Dx, 3, 0, 1, Dy, 2, local_site_offset, subtract);
00644   
00645     ColorAlgebra(Dx, 0, 3, 2, Dy, 1, local_site_offset, subtract);
00646     ColorAlgebra(Dx, 1, 2, 2, Dy, 1, local_site_offset, answer);
00647     ColorAlgebra(Dx, 2, 1, 2, Dy, 1, local_site_offset, answer);
00648     ColorAlgebra(Dx, 3, 0, 2, Dy, 1, local_site_offset, subtract);
00649   
00650     ColorAlgebra(Dx, 0, 3, 3, Dy, 0, local_site_offset, answer);
00651     ColorAlgebra(Dx, 1, 2, 3, Dy, 0, local_site_offset, subtract);
00652     ColorAlgebra(Dx, 2, 1, 3, Dy, 0, local_site_offset, subtract);
00653     ColorAlgebra(Dx, 3, 0, 3, Dy, 0, local_site_offset, answer);
00654 
00655     break;
00656     
00657   case Gamma5Gamma5:
00658 
00659     ColorAlgebra(Dx, 0, 1, 0, Dy, 1, local_site_offset, answer);
00660     ColorAlgebra(Dx, 1, 0, 0, Dy, 1, local_site_offset, subtract);
00661     ColorAlgebra(Dx, 2, 3, 0, Dy, 1, local_site_offset, answer);
00662     ColorAlgebra(Dx, 3, 2, 0, Dy, 1, local_site_offset, subtract);
00663   
00664     ColorAlgebra(Dx, 0, 1, 1, Dy, 0, local_site_offset, subtract);
00665     ColorAlgebra(Dx, 1, 0, 1, Dy, 0, local_site_offset, answer);
00666     ColorAlgebra(Dx, 2, 3, 1, Dy, 0, local_site_offset, subtract);
00667     ColorAlgebra(Dx, 3, 2, 1, Dy, 0, local_site_offset, answer);
00668   
00669     ColorAlgebra(Dx, 0, 1, 2, Dy, 3, local_site_offset, answer);
00670     ColorAlgebra(Dx, 1, 0, 2, Dy, 3, local_site_offset, subtract);
00671     ColorAlgebra(Dx, 2, 3, 2, Dy, 3, local_site_offset, answer);
00672     ColorAlgebra(Dx, 3, 2, 2, Dy, 3, local_site_offset, subtract);
00673   
00674     ColorAlgebra(Dx, 0, 1, 3, Dy, 2, local_site_offset, subtract);
00675     ColorAlgebra(Dx, 1, 0, 3, Dy, 2, local_site_offset, answer);
00676     ColorAlgebra(Dx, 2, 3, 3, Dy, 2, local_site_offset, subtract);
00677     ColorAlgebra(Dx, 3, 2, 3, Dy, 2, local_site_offset, answer);
00678 
00679     break;
00680 
00681   case UnitUnit:
00682 
00683     ColorAlgebra(Dx, 0, 1, 0, Dy, 1, local_site_offset, answer);
00684     ColorAlgebra(Dx, 1, 0, 0, Dy, 1, local_site_offset, subtract);
00685     ColorAlgebra(Dx, 2, 3, 0, Dy, 1, local_site_offset, subtract);
00686     ColorAlgebra(Dx, 3, 2, 0, Dy, 1, local_site_offset, answer);
00687   
00688     ColorAlgebra(Dx, 0, 1, 1, Dy, 0, local_site_offset, subtract);
00689     ColorAlgebra(Dx, 1, 0, 1, Dy, 0, local_site_offset, answer);
00690     ColorAlgebra(Dx, 2, 3, 1, Dy, 0, local_site_offset, answer);
00691     ColorAlgebra(Dx, 3, 2, 1, Dy, 0, local_site_offset, subtract);
00692   
00693     ColorAlgebra(Dx, 0, 1, 2, Dy, 3, local_site_offset, subtract);
00694     ColorAlgebra(Dx, 1, 0, 2, Dy, 3, local_site_offset, answer);
00695     ColorAlgebra(Dx, 2, 3, 2, Dy, 3, local_site_offset, answer);
00696     ColorAlgebra(Dx, 3, 2, 2, Dy, 3, local_site_offset, subtract);
00697   
00698     ColorAlgebra(Dx, 0, 1, 3, Dy, 2, local_site_offset, answer);
00699     ColorAlgebra(Dx, 1, 0, 3, Dy, 2, local_site_offset, subtract);
00700     ColorAlgebra(Dx, 2, 3, 3, Dy, 2, local_site_offset, subtract);
00701     ColorAlgebra(Dx, 3, 2, 3, Dy, 2, local_site_offset, answer);
00702 
00703     break;
00704   }
00705 
00706   answer -= subtract;  
00707 }
00708 
00709 
00710 
00711 //---------------------------------------------------------------------------
00712 // void
00713 // WspectBaryonW::DiracAlgebra(int...)
00714 //--------------------------------------------------------------------------- 
00715 void
00716 WspectBaryon::DiracAlgebra(int Dx, int Dy, int local_site_offset,
00717                            Complex &answer) 
00718 {
00719   char *fname = "DiracAlgebra(i,i,i,C&)";
00720   // answer += DiracAlgebraABC
00721   DiracAlgebraABC(Dx, Dy, local_site_offset, answer);    
00722 
00723   switch (d_flavors) {
00724   case AAC:                  // answer += DiracAlgebraAAC
00725     DiracAlgebraAAC(Dx, Dy, local_site_offset, answer);  
00726     break;
00727   case AAA:                  // answer += 2 DiracAlgebraAAC   
00728     Complex tmp(0, 0);
00729     DiracAlgebraAAC(Dx, Dy, local_site_offset, tmp);
00730     answer += 2 * tmp;  
00731     break;
00732   }
00733 }
00734 
00735 
00736 
00737 
00738   
00739 
00740 //---------------------------------------------------------------------------
00741 // void
00742 // WspectBaryon::ZeroMomProject(...)
00743 //---------------------------------------------------------------------------
00744 Complex
00745 WspectBaryon::ZeroMomProject(int Dx, int Dy, int lcl_time_slice)
00746 {
00747   d_lclMin[d_prop_dir] = d_lclMax[d_prop_dir] = lcl_time_slice;
00748 
00749   Complex answer(0.0, 0.0);
00750 
00751   int lcl[LORENTZs];  
00752   for (lcl[0] = d_lclMin[0]; lcl[0] <= d_lclMax[0]; lcl[0]++) {
00753     for (lcl[1] = d_lclMin[1]; lcl[1] <= d_lclMax[1]; lcl[1]++) {
00754       for (lcl[2] = d_lclMin[2]; lcl[2] <= d_lclMax[2]; lcl[2]++) {
00755         for (lcl[3] = d_lclMin[3]; lcl[3] <= d_lclMax[3]; lcl[3]++) {
00756           DiracAlgebra(Dx, Dy, siteOffset(lcl)*SPINORs, answer);
00757 #ifdef  DEBUG_W_BARYON_PROJECT_IMAG
00758           printf("site[%d %d %d %d] spin[%d%d]: [%g %g]\n",
00759                  lcl[0], lcl[1], lcl[2], lcl[3], dirac, dirac,
00760                  answer.real(), answer.imag());
00761 #endif
00762         }
00763       }
00764     }
00765   }
00766 
00767   return answer;  
00768 }
00769 
00770 
00771 //---------------------------------------------------------------------------
00772 // Float
00773 // WspectBaryon::DiracProject(...)
00774 //---------------------------------------------------------------------------
00775 Float
00776 WspectBaryon::DiracProjectUnit(int a_local_time_slice) 
00777 {
00778   Complex answer(0.0, 0.0);
00779   
00780   for (int dirac = 0; dirac < DIRACs; ++dirac) {
00781     answer += ZeroMomProject(dirac, dirac, a_local_time_slice);
00782   }
00783   
00784   // Note: a complier bug ? The following command screw up things.
00785   //    return answer.real();  
00786   // For example in one of our complex [3.27444 -0.0132897], 
00787   //    3.76367e-09 is passed back instead of 3.27444.
00788   // So one has to assign answer.real() to some other temporary 
00789   //    IFloat before return.
00790   //-------------------------------------------------------------------------
00791   Float ret = answer.real();  
00792   return ret;  
00793 }
00794  
00795 
00796 //---------------------------------------------------------------------------
00797 // IFloat
00798 // WspectBaryon::DiracProject(...)
00799 //---------------------------------------------------------------------------
00800 Float
00801 WspectBaryon::DiracProjectGamma(int a_local_time_slice) 
00802 {
00803   Float answer = 0.0;
00804 
00805   switch (d_whr.dir()) {
00806   case 0:
00807     answer -= ZeroMomProject(3, 0, a_local_time_slice).imag();
00808     answer -= ZeroMomProject(2, 1, a_local_time_slice).imag();
00809     answer += ZeroMomProject(1, 2, a_local_time_slice).imag();
00810     answer += ZeroMomProject(0, 3, a_local_time_slice).imag();
00811     break; 
00812 
00813   case 1:
00814     answer -= ZeroMomProject(3, 0, a_local_time_slice).real();
00815     answer += ZeroMomProject(2, 1, a_local_time_slice).real();
00816     answer += ZeroMomProject(1, 2, a_local_time_slice).real();
00817     answer -= ZeroMomProject(0, 3, a_local_time_slice).real();
00818     break; 
00819 
00820   case 2:
00821     answer -= ZeroMomProject(2, 0, a_local_time_slice).imag();
00822     answer += ZeroMomProject(3, 1, a_local_time_slice).imag();
00823     answer += ZeroMomProject(0, 2, a_local_time_slice).imag();
00824     answer -= ZeroMomProject(1, 3, a_local_time_slice).imag();
00825     break;
00826 
00827   case 3:
00828     answer += ZeroMomProject(2, 0, a_local_time_slice).real();
00829     answer += ZeroMomProject(3, 1, a_local_time_slice).real();
00830     answer += ZeroMomProject(0, 2, a_local_time_slice).real();
00831     answer += ZeroMomProject(1, 3, a_local_time_slice).real();
00832     break;
00833   } 
00834 
00835   return answer;  
00836 }
00837  
00838 
00839 //---------------------------------------------------------------------------
00840 // void WspectBaryon::print(const CommonArg *common_arg) const
00841 //---------------------------------------------------------------------------
00842 void
00843 WspectBaryon::print(char *filename, WbaryonFold fold) const
00844 {
00845 
00846 #if TARGET==cpsMPI
00847     using MPISCU::fprintf;
00848 #endif
00849   char *fname = "print";
00850   VRB.Func(d_class_name, fname);
00851 
00852   // Open the output file
00853   //------------------------------------------------------------------
00854   FILE *fp=NULL;
00855   if (!filename || !(fp = Fopen(filename, "a"))) 
00856     ERR.FileA(d_class_name,fname, filename);
00857 
00858 
00859   // Right now d_unit_p  = Tr (Unit    Baryon Baryon^bar)
00860   //           d_gamma_p = Tr (Gamma   Baryon Baryon^bar)
00861   //           d_up_p    = Tr (1+Gamma Baryon Baryon^bar)
00862   //           d_down_p  = Tr (1-Gamma Baryon Baryon^bar)
00863   //-------------------------------------------------------------------------
00864   int glb_walls = glb_sites[d_whr.dir()];
00865   int src_wall  = d_whr.glbCoord();  
00866   int bound_cnd   = bnd_cnd[d_whr.dir()];
00867   Float f1 = 1.0;
00868   Float f2 = 1.0;
00869 
00870 
00871   // Fold the time slices
00872   //-------------------------------------------------------------------------
00873   int w;
00874   switch (fold) {
00875   case BARYON_PAST:
00876     Fprintf(fp, "%d 0 0 %e\n", AlgWspect::GetCounter(), 
00877             IFloat(d_unit_p[src_wall]));
00878     for (w = 1; w < glb_walls/2; ++w){
00879       if (bound_cnd == -1) {
00880         f1 = (src_wall + w)/glb_walls             ? -1 : 1;
00881         f2 = (src_wall + glb_walls - w)/glb_walls ? -1 : 1;
00882       }
00883       Fprintf(fp, "%d %d 0 %e\n", AlgWspect::GetCounter(), w,
00884               IFloat((f1 * d_unit_p[(src_wall + w)%glb_walls] +
00885                      f2 * bound_cnd * 
00886                      d_unit_p[(src_wall + glb_walls - w)%glb_walls])/2) );
00887     }
00888     Fprintf(fp,"%d %d 0 %e\n", AlgWspect::GetCounter(), w,
00889             IFloat(d_unit_p[(src_wall+w)%glb_walls]));
00890     break;
00891     
00892   case BARYON_RAW:
00893     for (w = 0; w < glb_walls; ++w) {
00894       Fprintf(fp, "%d %d 0 %e %e\n", AlgWspect::GetCounter(), w,
00895               IFloat(d_up_p  [(src_wall + w)%glb_walls]),
00896               IFloat(d_down_p[(src_wall + w)%glb_walls]));
00897     }
00898     break;
00899     
00900   case BARYON_FOLD:
00901   default:
00902     for (w = 0; w < glb_walls; ++w) {
00903       if (bound_cnd == -1) {
00904         f1 = (src_wall + w)/glb_walls             ? -1 : 1;
00905         f2 = (src_wall + glb_walls - w)/glb_walls ? -1 : 1;
00906       }
00907       Fprintf(fp, "%d %d 0 %e \n", AlgWspect::GetCounter(), w,
00908               IFloat((f1 * d_up_p[(src_wall + w)%glb_walls] + 
00909                      f2 * bound_cnd *
00910                      d_down_p[(src_wall + glb_walls - w)%glb_walls])/2.0));
00911     }
00912     break;
00913   }
00914   
00915   Fclose(fp);
00916 }
00917 
00918 
00919 
00920 
00921 CPS_END_NAMESPACE

Generated on Sat Oct 10 14:11:20 2009 for Columbia Physics System by  doxygen 1.3.9.1