CHROMA
ldumul_w.cc
Go to the documentation of this file.
1 
2 #error "NOT FULLY CONVERTED"
3 
4 /*# This routine is specific to Wilson fermions! */
5 
6 /*# LDUMUL - Performs the operation */
7 
8 /*# chi <- (L + D + L^dag) . psi */
9 
10 /*# where */
11 /*# L is stored as a lower triangular matrix (no diagonal) */
12 /*# diag(L) is stored separately as a real. */
13 
14 /*# Arguments: */
15 
16 /*# L Lower tri. mat. (no diag) (Read) */
17 /*# Diag_L diag(L) (Read) */
18 /*# Psi Pseudofermion Source (Read) */
19 /*# Chi Pseudofermion output (Write) */
20 include(types.mh)
21 
22 SUBROUTINE(ldumul, L, diag_L, psix, chix)
23 
24 LATTICE_TRIANGULAR(L);
26 LatticeFermion psix;
27 LatticeFermion chix;
28 { /* Local variables */
29  include(COMMON_DECLARATIONS)
30 
31  multi2d<LatticeComplex> psi(n, 2);
32  multi2d<LatticeComplex> chi(n, 2);
33 
34  unsigned i;
35  unsigned j;
36  unsigned n;
37  unsigned s;
38  unsigned elem_ij;
39  unsigned elem_ji;
40 
42 
43  n = 2*Nc;
44 
45  if ( Ns != 4 )
46  QDP_error_exit("code requires Ns == 4", Ns);
47 
48 
49  psi = CAST(psix);
50 
51  for(s = 0; s < 2; ++s)
52  {
53  for(i = 0; i < n; ++i)
54  {
55  chi[s][i] = diag_L[s][i] * psi[s][i];
56 
57  for(j = 0; j < i; ++j)
58  {
59  elem_ij = i*(i-1)/2 + j;
60 
61  chi[s][i] += L[s][elem_ij] * psi[s][j];
62  }
63 
64  for(j = i+1; j < n; ++j)
65  {
66  elem_ji = j*(j-1)/2 + i;
67 
68  chi[s][i] += adj(L[s][elem_ji]) * psi[s][j];
69  }
70  }
71  }
72 
73  chix = CAST(chi);
74 
75 
76  END_CODE();
77 }
#define END_CODE()
Definition: chromabase.h:65
LatticeFermion chix
Definition: ldumul_w.cc:27
START_CODE()
include(types.mh) LATTICE_TRIANGULAR(L)
LATTICE_DIAG_TRIANGULAR(diag_L)
LatticeFermion psix
Definition: ldumul_w.cc:26
unsigned elem_ij
Definition: ldumul_w.cc:38
unsigned s
Definition: ldumul_w.cc:37
unsigned j
Definition: ldumul_w.cc:35
unsigned elem_ji
Definition: ldumul_w.cc:39
unsigned i
Definition: ldumul_w.cc:34
multi2d< LatticeComplex > chi(n, 2)
unsigned n
Definition: ldumul_w.cc:36
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
psi
Definition: pade_trln_w.cc:191