00001 #include<config.h> 00002 CPS_START_NAMESPACE 00008 //-------------------------------------------------------------------- 00009 // CVS keywords 00010 // 00011 // $Author: zs $ 00012 // $Date: 2004/09/02 16:59:02 $ 00013 // $Header: /space/cvs/cps/cps++/include/util/wilson.h,v 1.7 2004/09/02 16:59:02 zs Exp $ 00014 // $Id: wilson.h,v 1.7 2004/09/02 16:59:02 zs Exp $ 00015 // $Name: v4_9_9 $ 00016 // $Locker: $ 00017 // $RCSfile: wilson.h,v $ 00018 // $Revision: 1.7 $ 00019 // $Source: /space/cvs/cps/cps++/include/util/wilson.h,v $ 00020 // $State: Exp $ 00021 // 00022 //-------------------------------------------------------------------- 00023 /****************************************************************************/ 00024 /* 10/16/97 */ 00025 /* */ 00026 /* wilson.h */ 00027 /* */ 00028 /* C header file for the fermion wilson library wilson.lib */ 00029 /* */ 00030 /****************************************************************************/ 00031 00032 #ifndef INCLUDED_WILSON_H 00033 #define INCLUDED_WILSON_H 00034 00035 CPS_END_NAMESPACE 00036 #include <util/data_types.h> 00037 CPS_START_NAMESPACE 00038 00039 /*--------------------------------------------------------------------------*/ 00040 /* Definitions */ 00041 /*--------------------------------------------------------------------------*/ 00042 #define ND 4 00043 #define SPINOR_SIZE 24 00044 #define HALF_SPINOR_SIZE 12 00045 #define PAD_HALF_SPINOR_SIZE 16 00046 #define BLOCK HALF_SPINOR_SIZE 00047 #define COLUMN_SPINOR_SIZE 6 00048 #define GAUGE_SIZE 72 00049 00050 /*--------------------------------------------------------------------------*/ 00051 /* External */ 00052 /*--------------------------------------------------------------------------*/ 00053 extern int wfm_wire_map[]; 00055 00059 extern int wfm_max_scu_poll; 00061 00068 extern int wfm_scu_diag[]; 00070 00089 /*--------------------------------------------------------------------------*/ 00090 /* Structures */ 00091 /*--------------------------------------------------------------------------*/ 00092 /* This field makes one word = numblk[10bits]-blklen[10bits]-stride[12bits] */ 00093 00094 struct comm_params 00095 { 00096 unsigned int stride : 12; 00097 unsigned int blklen : 10; 00098 unsigned int numblk : 10; 00099 }; 00100 00101 00102 /*--------------------------------------------------------------------------*/ 00103 /* Type definitions */ 00104 /*--------------------------------------------------------------------------*/ 00106 00111 typedef struct 00112 { 00113 int *ptr; 00114 int yztmax; /* # of points of the y-z-t lattice per node */ 00115 int offset; /* communication addressing related */ 00116 int comm_offset[ND]; /* communication addressing related */ 00117 int comm_stride[ND]; /* communication addressing related */ 00118 int comm_blklen[ND]; /* communication addressing related */ 00119 int comm_numblk[ND]; /* communication addressing related */ 00120 struct comm_params comm[ND]; 00121 int vol[2]; 00122 int padded_subgrid_vol[ND]; 00123 IFloat *spinor_tmp; 00124 IFloat *af[ND]; 00125 IFloat *ab[ND]; 00126 } Wilson; 00127 00128 00129 00130 /*--------------------------------------------------------------------------*/ 00131 /* Function declarations */ 00132 /*--------------------------------------------------------------------------*/ 00133 00134 00135 /*==========================================================================*/ 00137 00143 /*==========================================================================*/ 00144 void wilson_init(Wilson *wilson_p); /* pointer to Wilson struct. */ 00145 00146 00147 /*==========================================================================*/ 00149 00153 /*==========================================================================*/ 00154 void wilson_end(Wilson *wilson_p); /* pointer to Wilson struct. */ 00155 00156 00157 00158 /*==========================================================================*/ 00159 /* The Wilson fermion matrix * vector routines */ 00160 /*==========================================================================*/ 00161 00162 extern "C"{ 00163 00165 00175 void wilson_mdagm(IFloat *chi, 00176 IFloat *u, 00177 IFloat *psi, 00178 IFloat *mp_sq_p, 00179 IFloat Kappa, 00180 Wilson *wilson_p); 00181 00182 //-------------------------------------------------------------------- 00183 00185 00201 void wilson_dslash(IFloat *chi, 00202 IFloat *u, 00203 IFloat *psi, 00204 int cb, 00205 int dag, 00206 Wilson *wilson_p); 00207 00208 //-------------------------------------------------------------------- 00209 00211 00224 void wilson_m(IFloat *chi, 00225 IFloat *u, 00226 IFloat *psi, 00227 IFloat kappa, 00228 Wilson *wilson_p); 00229 00230 //---------------------------------------------------------------------- 00231 00233 00246 void wilson_mdag(IFloat *chi, 00247 IFloat *u, 00248 IFloat *psi, 00249 IFloat kappa, 00250 Wilson *wilson_p); 00251 00252 } 00253 00254 #endif 00255 00256 CPS_END_NAMESPACE
1.4.6