CHROMA
avp_bgld_solver.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief DWF/Bluegene double-prec solver
3  */
4 
6 
7 #include <dwf-bluelightd.h>
8 
9 
10 using namespace QDP;
11 namespace Chroma
12 {
13  //! Bluegene double-prec solver
14  /*!
15  * \ingroup qprop
16  *
17  * @{
18  */
19  namespace AVPSolver
20  {
21  MIT_bluelightd_DWF_Fermion* BGLDWFSolverD::loadFermionRHS(const void* OuterFermion) const {
22  return MIT_bluelightd_DWF_load_fermion(OuterFermion, NULL, &AVPSolverFunctions::fermionReaderRHS);
23  }
24 
25  MIT_bluelightd_DWF_Fermion* BGLDWFSolverD::loadFermionGuess(const void *OuterFermion) const {
26  return MIT_bluelightd_DWF_load_fermion(OuterFermion, NULL, &AVPSolverFunctions::fermionReaderGuess);
27  }
28 
29  MIT_bluelightd_DWF_Fermion* BGLDWFSolverD::allocateFermion(void) const {
30  return MIT_bluelightd_DWF_allocate_fermion();
31  }
32 
33  void BGLDWFSolverD::saveFermionSolver(void *OuterFermion,
34  MIT_bluelightd_DWF_Fermion* CGFermion) const {
35  MIT_bluelightd_DWF_save_fermion(OuterFermion, NULL, &AVPSolverFunctions::fermionWriterSolver, CGFermion);
36  }
37 
38  void BGLDWFSolverD::saveFermionOperator(void *OuterFermion,
39  MIT_bluelightd_DWF_Fermion* CGFermion) const {
40  MIT_bluelightd_DWF_save_fermion(OuterFermion, NULL, &AVPSolverFunctions::fermionWriterOperator, CGFermion);
41  }
42 
43  void BGLDWFSolverD::deleteFermion(MIT_bluelightd_DWF_Fermion* ptr) const {
44  MIT_bluelightd_DWF_delete_fermion(ptr);
45  }
46 
47 
48  int BGLDWFSolverD::cgInternal(MIT_bluelightd_DWF_Fermion *psi,
49  double *out_eps,
50  int *out_iter,
51  double M,
52  double m_f,
53  const MIT_bluelightd_DWF_Fermion *x0,
54  const MIT_bluelightd_DWF_Fermion *eta,
55  double eps,
56  int min_iter,
57  int max_iter) const
58  {
59  QDPIO::cout << "Entering MIT_bluelightd_DWF_cg_solver" << std::endl;
60  return MIT_bluelightd_DWF_cg_solver(psi, out_eps, out_iter, g, M, m_f,
61  x0, eta, eps, min_iter, max_iter);
62  }
63 
64  void BGLDWFSolverD::loadGauge(const void *u,
65  const void *v) {
66  g=MIT_bluelightd_DWF_load_gauge(u, v, NULL, &AVPSolverFunctions::gaugeReader);
67  }
68 
69  void BGLDWFSolverD::deleteGauge(void) {
70  MIT_bluelightd_DWF_delete_gauge(g);
71  }
72 
73 
74  // Init the system -- Constructor call?
75  int BGLDWFSolverD::init(const int lattice[5],
76  void *(*allocator)(size_t size),
77  void (*deallocator)(void *)) {
78  return MIT_bluelightd_DWF_init(lattice, allocator, deallocator);
79  }
80 
81  // Finalize - destructor call
82  void BGLDWFSolverD::fini(void) {
83  MIT_bluelightd_DWF_fini();
84  }
85  }
86 
87  /*! @} */ // end of group qprop
88 
89 }
DWF/Bluegene 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