15 QDPIO::cerr <<
"This routine only works for Nd=4, not Nd="<<
Nd << std::endl;
20 if( delta.size() !=
Nd ) {
21 QDPIO::cerr <<
"Delta has to have Nd elements as opposed to " << delta.size();
27 if( delta[
mu] != 0 && delta[
mu] != 1 ) {
28 QDPIO::cerr <<
"Delta must be made up of either zeros or ones. Element " <<
mu <<
" has value " << delta[
mu] << std::endl;
35 return(delta[0] + 2*( delta[1] + 2*(delta[2] + 2*delta[3])));
45 QDPIO::cerr <<
"This routine only works for Nd=4, not Nd="<<
Nd << std::endl;
50 if( delta.size() !=
Nd ) {
51 QDPIO::cerr <<
"Delta has to have Nd elements as opposed to " << delta.size();
56 if( src_index < 0 || src_index > 15 ) {
57 QDPIO::cerr <<
"src_index out of range " << src_index <<
"\n" ;
62 delta[0] = src_index % 2 ;
64 int tmp = ( src_index - delta[0] ) / 2 ;
67 int tmpA = (
tmp - delta[1] ) / 2 ;
70 tmp = ( tmpA - delta[2] ) / 2 ;
76 if( delta[
mu] != 0 && delta[
mu] != 1 ) {
77 QDPIO::cerr <<
"Delta must be made up of either zeros or ones. Element " <<
mu <<
" has value " << delta[
mu] << std::endl;
92 const LatticeStaggeredPropagator& src)
97 if( delta.size() !=
Nd ) {
98 QDPIO::cerr <<
"Delta has to have Nd elements as opposed to " << delta.size();
103 if( delta[
mu] != 0 && delta[
mu] != 1 ) {
104 QDPIO::cerr <<
"Delta must be made up of either zeros or ones. Element " <<
mu <<
" has value " << delta[
mu] << std::endl;
109 LatticeStaggeredPropagator ret_val = src;
110 LatticeStaggeredPropagator
tmp;
113 if( delta[
mu] == 1 ) {
131 multi1d<LatticeColorMatrix>
u,
bool sym_flag){
148 const int length = 1 ;
149 double inv_num_perms;
155 const int shift_index[24][4]=
156 {{0,1,2,3},{1,0,2,3},{0,2,1,3},{2,0,1,3},{1,2,0,3},{2,1,0,3},
157 {0,1,3,2},{1,0,3,2},{0,3,1,2},{3,0,1,2},{1,3,0,2},{3,1,0,2},
158 {0,2,3,1},{0,3,2,1},{2,0,3,1},{2,3,0,1},{3,2,0,1},{3,0,2,1},
159 {1,2,3,0},{1,3,2,0},{2,1,3,0},{2,3,1,0},{3,1,2,0},{3,2,1,0}};
194 QDPIO::cerr <<
"This only works for Nd=4 , not Nd=" <<
Nd;
198 if( delta.size() !=
Nd ) {
199 QDPIO::cerr <<
"Delta has to have Nd elements as opposed to " << delta.size();
204 if( delta[
mu] != 0 && delta[
mu] != 1 ) {
205 QDPIO::cerr <<
"Delta must be made up of either zeros or ones. Element " <<
mu <<
" has value " << delta[
mu] << std::endl;
211 multi1d<int> delta_order(4);
216 delta_order[num_shifts] =
mu ;
230 inv_num_perms= 1.0/((double)num_perms);
234 for(
i=0;
i<num_perms;
i++){
237 for(
j=0;
j<num_shifts;
j++){
255 ret_val*=inv_num_perms;
261 const LatticeStaggeredPropagator& src,
262 multi1d<LatticeColorMatrix>
u,
bool sym_flag)
265 return shiftDeltaPropCov_t<LatticeStaggeredPropagator>(delta,src,
u,
272 const LatticeStaggeredFermion& src,
273 multi1d<LatticeColorMatrix>
u,
bool sym_flag)
276 LatticeStaggeredFermion
tmp =
277 shiftDeltaPropCov_t<LatticeStaggeredFermion>(delta,src,
u,
291 const LatticeStaggeredPropagator& src,
306 if( delta.size() !=
Nd ) {
307 QDPIO::cerr <<
"Delta has to have Nd elements as opposed to " << delta.size();
312 if( delta[
mu] != 0 && delta[
mu] != 1 ) {
313 QDPIO::cerr <<
"Delta must be made up of either zeros or ones. Element " <<
mu <<
" has value " << delta[
mu] << std::endl;
318 LatticeStaggeredPropagator ret_val = src;
319 LatticeStaggeredPropagator tmp1;
320 LatticeStaggeredPropagator
tmp2;
323 if( delta[
mu] == 1 ) {
330 ret_val = 0.5*(tmp1+
tmp2);
Primary include file for CHROMA library code.
Parallel transport a lattice field.
LatticePropagator displacement(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &chi, int length, int dir)
Apply a displacement operator to a lattice field.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
int deltaToPropIndex(multi1d< int > &delta)
LinOpSysSolverMGProtoClover::T T
LatticeStaggeredPropagator shiftDeltaPropCov(multi1d< int > &delta, const LatticeStaggeredPropagator &src, multi1d< LatticeColorMatrix > u, bool sym_flag)
T shiftDeltaPropCov_t(multi1d< int > &delta, const T &src, multi1d< LatticeColorMatrix > u, bool sym_flag)
void PropIndexTodelta(int src_index, multi1d< int > &delta)
LatticeStaggeredPropagator shiftDeltaProp(multi1d< int > &delta, const LatticeStaggeredPropagator &src)