56 std::vector<ColorSpinorField*> &
B;
195 Solver *presmoother, *postsmoother;
207 char coarse_prefix[128];
228 std::vector<ColorSpinorField*> *B_coarse;
252 const Dirac *diracResidual;
255 const Dirac *diracSmoother;
258 const Dirac *diracSmootherSloppy;
261 Dirac *diracCoarseResidual;
264 Dirac *diracCoarseSmoother;
267 Dirac *diracCoarseSmootherSloppy;
285 void pushLevel(
int level)
const;
291 void popLevel(
int level)
const;
316 void reset(
bool refresh=
false);
359 void verify(
bool recursively =
false);
372 void loadVectors(std::vector<ColorSpinorField *> &B);
378 void saveVectors(
const std::vector<ColorSpinorField *> &B)
const;
401 double flops()
const;
424 bool dslash=
true,
bool clover=
true,
bool dagger=
false,
const int *
commDim=0,
512 std::vector<ColorSpinorField*>
B;
528 for (
unsigned int i=0; i<
B.size(); i++)
delete B[i];
double flops() const
Return the total flops done on this and all coarser levels.
MG(MGParam ¶m, TimeProfile &profile)
void operator()(ColorSpinorField &out, ColorSpinorField &in)
void destroySmoother()
Destroy the smoothers.
void createCoarseDirac()
Create the coarse dirac operator.
void createSmoother()
Create the smoothers.
void saveVectors(const std::vector< ColorSpinorField * > &B) const
Save the null space vectors in from file.
void buildFreeVectors(std::vector< ColorSpinorField * > &B)
Build free-field null-space vectors.
void createCoarseSolver()
Create the solver wrapper.
void verify(bool recursively=false)
Verify the correctness of the MG method, optionally recursively starting from the top down.
void dumpNullVectors() const
Dump the null-space vectors to disk. Will recurse dumping all levels.
void loadVectors(std::vector< ColorSpinorField * > &B)
Load the null space vectors in from file.
void generateEigenVectors()
Generate lowest eigenvectors.
void destroyCoarseSolver()
Destroy the solver wrapper.
void reset(bool refresh=false)
This method resets the solver, e.g., when a parameter has changed such as the mass.
void generateNullVectors(std::vector< ColorSpinorField * > &B, bool refresh=false)
Generate the null-space vectors.
Class declaration to initialize and hold CURAND RNG states.
quda::mgarray< int > n_block_ortho
quda::mgarray< double > mu_factor
void matpc(void *outEven, void **gauge, void *inEven, double kappa, QudaMatPCType matpc_type, int dagger_bit, QudaPrecision sPrecision, QudaPrecision gPrecision, double mferm)
enum QudaSolveType_s QudaSolveType
enum QudaPrecision_s QudaPrecision
enum QudaTransferType_s QudaTransferType
enum QudaMultigridCycleType_s QudaMultigridCycleType
enum QudaDiracType_s QudaDiracType
enum QudaBoolean_s QudaBoolean
enum QudaSolutionType_s QudaSolutionType
enum QudaInverterType_s QudaInverterType
enum QudaFieldLocation_s QudaFieldLocation
enum QudaMatPCType_s QudaMatPCType
void calculateYhat(GaugeField &Yhat, GaugeField &Xinv, const GaugeField &Y, const GaugeField &X, bool use_mma=false)
Calculate preconditioned coarse links and coarse clover inverse field.
void CoarseCoarseOp(GaugeField &Y, GaugeField &X, const Transfer &T, const GaugeField &gauge, const GaugeField &clover, const GaugeField &cloverInv, double kappa, double mass, double mu, double mu_factor, QudaDiracType dirac, QudaMatPCType matpc, bool need_bidirectional, bool use_mma=false)
Coarse operator construction from an intermediate-grid operator (Coarse)
void ApplyCoarse(ColorSpinorField &out, const ColorSpinorField &inA, const ColorSpinorField &inB, const GaugeField &Y, const GaugeField &X, double kappa, int parity=QUDA_INVALID_PARITY, bool dslash=true, bool clover=true, bool dagger=false, const int *commDim=0, QudaPrecision halo_precision=QUDA_INVALID_PRECISION)
Apply the coarse dslash stencil. This single driver accounts for all variations with and without the ...
void StaggeredCoarseOp(GaugeField &Y, GaugeField &X, const Transfer &T, const cudaGaugeField &gauge, const cudaGaugeField *XinvKD, double mass, QudaDiracType dirac, QudaMatPCType matpc)
Coarse operator construction from a fine-grid operator (Staggered)
void CoarseOp(GaugeField &Y, GaugeField &X, const Transfer &T, const cudaGaugeField &gauge, const cudaCloverField *clover, double kappa, double mass, double mu, double mu_factor, QudaDiracType dirac, QudaMatPCType matpc)
Coarse operator construction from a fine-grid operator (Wilson / Clover)
#define QUDA_MAX_DIM
Maximum number of dimensions supported by QUDA. In practice, no routines make use of more than 5.
DiracMatrix * matResidual
MGParam(QudaMultigridParam ¶m, std::vector< ColorSpinorField * > &B, DiracMatrix *matResidual, DiracMatrix *matSmooth, DiracMatrix *matSmoothSloppy, int level=0)
std::vector< ColorSpinorField * > & B
QudaInverterType smoother
QudaSolutionType coarse_grid_solution_type
MGParam(const MGParam ¶m, std::vector< ColorSpinorField * > &B, DiracMatrix *matResidual, DiracMatrix *matSmooth, DiracMatrix *matSmoothSloppy, int level=0)
DiracMatrix * matSmoothSloppy
QudaFieldLocation location
QudaBoolean global_reduction
QudaMultigridCycleType cycle_type
int geoBlockSize[QUDA_MAX_DIM]
QudaMultigridParam & mg_global
QudaSolveType smoother_solve_type
QudaTransferType transfer_type
QudaFieldLocation setup_location
virtual ~multigrid_solver()
multigrid_solver(QudaMultigridParam &mg_param, TimeProfile &profile)
std::vector< ColorSpinorField * > B