avp_bgld_solver.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: avp_bgld_solver.h,v 3.3 2007/01/17 02:39:27 edwards Exp $
00003 /*! \file
00004  *  \brief DWF/Bluegene double-prec solver
00005  */
00006 
00007 #ifndef AVP_BGLD_SOLVER_H
00008 #define AVP_BGLD_SOLVER_H
00009 
00010 #include "chromabase.h"
00011 #include "actions/ferm/qprop/avp_inverter_interface.h"
00012 
00013 extern "C" {
00014   struct MIT_bluelightd_DWF_Gauge;
00015   struct MIT_bluelightd_DWF_Fermion;
00016 };
00017 
00018 
00019 namespace Chroma 
00020 { 
00021   //! Bluegene single-prec solver
00022   /*!
00023    * \ingroup qprop
00024    *
00025    * @{
00026    */
00027   namespace AVPSolver 
00028   { 
00029     //! DWF double prec-solver for Bluegene
00030     class BGLDWFSolverD : public AVPSolverInterface< MIT_bluelightd_DWF_Gauge, MIT_bluelightd_DWF_Fermion > 
00031     {
00032     public:
00033     protected:
00034       MIT_bluelightd_DWF_Fermion* loadFermionRHS(const void* OuterFermion) const; 
00035       MIT_bluelightd_DWF_Fermion* loadFermionGuess(const void *OuterFermion) const;
00036       MIT_bluelightd_DWF_Fermion* allocateFermion(void) const;
00037       void saveFermionSolver(void *OuterFermion, 
00038                              MIT_bluelightd_DWF_Fermion* CGFermion) const;
00039 
00040       void saveFermionOperator(void *OuterFermion, 
00041                                MIT_bluelightd_DWF_Fermion* CGFermion) const;
00042       void deleteFermion(MIT_bluelightd_DWF_Fermion* ptr) const;
00043       int cgInternal(MIT_bluelightd_DWF_Fermion       *psi,
00044                      double        *out_eps,
00045                      int           *out_iter,
00046                      double        M,
00047                      double        m_f,
00048                      const MIT_bluelightd_DWF_Fermion *x0,
00049                      const MIT_bluelightd_DWF_Fermion *eta,
00050                      double        eps,
00051                      int           min_iter,
00052                      int           max_iter)  const;
00053 
00054     public:
00055       void loadGauge(const void *u,
00056                      const void *v);
00057      
00058       void deleteGauge(void);
00059 
00060       int init(const int lattice[5],
00061                void *(*allocator)(size_t size),
00062                void (*deallocator)(void *));
00063      
00064       // Finalize - destructor call
00065       void fini(void);
00066     private:
00067       MIT_bluelightd_DWF_Gauge *g;
00068     };
00069   }
00070 
00071   /*! @} */   // end of group qprop
00072 }
00073 
00074 #endif

Generated on Sun Nov 22 04:28:49 2009 for CHROMA by  doxygen 1.4.7