CHROMA
t_dslashm.cc
Go to the documentation of this file.
1 
2 #include <iostream>
3 #include <cstdio>
4 
5 #include "chroma.h"
6 
7 using namespace Chroma;
8 
9 
10 int main(int argc, char **argv)
11 {
12  // Put the machine into a known state
13  Chroma::initialize(&argc, &argv);
14 
15  // Setup the layout
16  const int foo[] = {2,2,2,2};
17  multi1d<int> nrow(Nd);
18  nrow = foo; // Use only Nd elements
19  Layout::setLattSize(nrow);
20  Layout::create();
21 
22  //! Test out dslash
23  multi1d<LatticeColorMatrix> u(Nd);
24  for(int m=0; m < u.size(); ++m)
25  gaussian(u[m]);
26 
27  LatticeFermion psi, chi;
28  random(psi);
29  chi = zero;
30  dslash(chi, u, psi, +1, 0);
31 
32  XMLFileWriter xml("t_dslashm.xml");
33  push(xml,"t_dslashm");
34 
35  write(xml,"Nd", Nd);
36  write(xml,"Nc", Nc);
37  write(xml,"Ns", Ns);
38  write(xml,"nrow", nrow);
39  write(xml,"psi", psi);
40  write(xml,"chi", chi);
41 
42  pop(xml);
43 
44  // Time to bolt
46 
47  exit(0);
48 }
Primary include file for CHROMA in application codes.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
static int m[4]
Definition: make_seeds.cc:16
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
gaussian(aux)
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
Definition: chroma_init.cc:114
void finalize(void)
Chroma finalization routine.
Definition: chroma_init.cc:308
dslash(u, eta, tmp, MINUS, 1)
multi1d< LatticeFermion > chi(Ncb)
LatticeFermion psi
Definition: mespbg5p_w.cc:35
pop(xml_out)
Double zero
Definition: invbicg.cc:106
int main(int argc, char **argv)
Definition: t_dslashm.cc:10