CHROMA
avp_ssed_solver.cc
Go to the documentation of this file.
2 
3 #include <dwf-ssed.h>
4 
5 
6 using namespace QDP;
7 namespace Chroma
8 {
9  namespace AVPSolver
10  {
11 
12  MIT_ssed_DWF_Fermion* SSEDWFSolverD::loadFermionRHS(const void* OuterFermion) const {
13  return MIT_ssed_DWF_load_fermion(OuterFermion, NULL, &AVPSolverFunctions::fermionReaderRHS);
14  }
15 
16  MIT_ssed_DWF_Fermion* SSEDWFSolverD::loadFermionGuess(const void *OuterFermion) const {
17  return MIT_ssed_DWF_load_fermion(OuterFermion, NULL, &AVPSolverFunctions::fermionReaderGuess);
18  }
19 
20  MIT_ssed_DWF_Fermion* SSEDWFSolverD::allocateFermion(void) const {
21  return MIT_ssed_DWF_allocate_fermion();
22  }
23 
24  void SSEDWFSolverD::saveFermionSolver(void *OuterFermion,
25  MIT_ssed_DWF_Fermion* CGFermion) const {
26  MIT_ssed_DWF_save_fermion(OuterFermion, NULL, &AVPSolverFunctions::fermionWriterSolver, CGFermion);
27  }
28 
29  void SSEDWFSolverD::saveFermionOperator(void *OuterFermion,
30  MIT_ssed_DWF_Fermion* CGFermion) const {
31  MIT_ssed_DWF_save_fermion(OuterFermion, NULL, &AVPSolverFunctions::fermionWriterOperator, CGFermion);
32  }
33 
34  void SSEDWFSolverD::deleteFermion(MIT_ssed_DWF_Fermion* ptr) const {
35  MIT_ssed_DWF_delete_fermion(ptr);
36  }
37 
38 
39  int SSEDWFSolverD::cgInternal(MIT_ssed_DWF_Fermion *psi,
40  double *out_eps,
41  int *out_iter,
42  double M,
43  double m_f,
44  const MIT_ssed_DWF_Fermion *x0,
45  const MIT_ssed_DWF_Fermion *eta,
46  double eps,
47  int min_iter,
48  int max_iter) const
49  {
50  QDPIO::cout << "Entering MIT_ssed_DWF_cg_solver" << std::endl;
51  return MIT_ssed_DWF_cg_solver(psi, out_eps, out_iter, g, M, m_f,
52  x0, eta, eps, min_iter, max_iter);
53  }
54 
55  void SSEDWFSolverD::loadGauge(const void *u,
56  const void *v) {
57  g=MIT_ssed_DWF_load_gauge(u, v, NULL, &AVPSolverFunctions::gaugeReader);
58  }
59 
60  void SSEDWFSolverD::deleteGauge(void) {
61  MIT_ssed_DWF_delete_gauge(g);
62  }
63 
64 
65  // Init the system -- Constructor call?
66  int SSEDWFSolverD::init(const int lattice[5],
67  void *(*allocator)(size_t size),
68  void (*deallocator)(void *)) {
69  return MIT_ssed_DWF_init(lattice, allocator, deallocator);
70  }
71 
72  // Finalize - destructor call
73  void SSEDWFSolverD::fini(void) {
74  MIT_ssed_DWF_fini();
75  }
76  };
77 
78 };
DWF/SSE double-prec solver.
void fermionWriterOperator(void *OuterFermion, void *env, const int latt_coord[5], int color, int spin, int reim, double val)
double fermionReaderGuess(const void *OuterFermion, void *env, const int latt_coord[5], int color, int spin, int reim)
double gaugeReader(const void *OuterGauge, void *env, const int latt_coord[4], int mu, int row, int col, int reim)
double fermionReaderRHS(const void *OuterFermion, void *env, const int latt_coord[5], int color, int spin, int reim)
void fermionWriterSolver(void *OuterFermion, void *env, const int latt_coord[5], int color, int spin, int reim, double val)
void init(MesonSpecData_t &data, XMLWriter &xml, const std::string &path, const std::string &id_tag, const Params &params)
Do some initialization.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
LatticeFermion eta
Definition: mespbg5p_w.cc:37
psi
Definition: pade_trln_w.cc:191