QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
quda::Deflation Class Reference

#include <deflation.h>

Collaboration diagram for quda::Deflation:
Collaboration graph
[legend]

Public Member Functions

 Deflation (DeflationParam &param, TimeProfile &profile)
 
virtual ~Deflation ()
 
void verify ()
 
void increment (ColorSpinorField &V, int nev)
 
void reduce (double tol, int max_nev)
 
void operator() (ColorSpinorField &out, ColorSpinorField &in)
 
void loadVectors (ColorSpinorField *RV)
 Load the eigen space vectors from file. More...
 
void saveVectors (ColorSpinorField *RV)
 Save the eigen space vectors in file. More...
 
bool is_complete ()
 Test whether the deflation space is complete and therefore cannot be further extended. More...
 
int size ()
 return deflation space size More...
 
double flops () const
 Return the total flops done on this and all coarser levels. More...
 

Private Attributes

DeflationParamparam
 
TimeProfile profile
 
ColorSpinorFieldr
 
ColorSpinorFieldAv
 
ColorSpinorFieldr_sloppy
 
ColorSpinorFieldAv_sloppy
 

Detailed Description

Deflation methods :

Definition at line 78 of file deflation.h.

Constructor & Destructor Documentation

◆ Deflation()

quda::Deflation::Deflation ( DeflationParam param,
TimeProfile profile 
)

◆ ~Deflation()

quda::Deflation::~Deflation ( )
virtual

Destructor for Deflation class. Frees any existing Deflation instance

Definition at line 69 of file deflation.cpp.

References Av, Av_sloppy, QudaEigParam_s::cuda_prec_ritz, quda::DeflationParam::eig_global, getVerbosity(), param, quda::TimeProfile::Print(), profile, QUDA_DOUBLE_PRECISION, QUDA_SUMMARIZE, r, and r_sloppy.

Here is the call graph for this function:

Member Function Documentation

◆ flops()

double quda::Deflation::flops ( ) const

Return the total flops done on this and all coarser levels.

Definition at line 82 of file deflation.cpp.

◆ increment()

void quda::Deflation::increment ( ColorSpinorField V,
int  nev 
)

◆ is_complete()

bool quda::Deflation::is_complete ( )
inline

Test whether the deflation space is complete and therefore cannot be further extended.

Definition at line 159 of file deflation.h.

References quda::DeflationParam::cur_dim, and quda::DeflationParam::tot_dim.

Referenced by quda::IncEigCG::operator()().

Here is the caller graph for this function:

◆ loadVectors()

void quda::Deflation::loadVectors ( ColorSpinorField RV)

Load the eigen space vectors from file.

Parameters
RVLoaded eigen-space vectors (pre-allocated)

Definition at line 352 of file deflation.cpp.

References quda::ColorSpinorField::Components(), quda::DeflationParam::eig_global, errorQuda, quda::ColorSpinorField::IsComposite(), param, printfQuda, profile, quda::QUDA_PROFILE_INIT, quda::QUDA_PROFILE_IO, read_spinor_field(), V, and QudaEigParam_s::vec_infile.

Referenced by Deflation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()()

void quda::Deflation::operator() ( ColorSpinorField out,
ColorSpinorField in 
)

◆ reduce()

void quda::Deflation::reduce ( double  tol,
int  max_nev 
)

◆ saveVectors()

void quda::Deflation::saveVectors ( ColorSpinorField RV)

Save the eigen space vectors in file.

Parameters
RVSave eigen-space vectors from here

Definition at line 385 of file deflation.cpp.

References quda::ColorSpinorField::Components(), quda::DeflationParam::eig_global, errorQuda, host_free, quda::ColorSpinorField::IsComposite(), param, printfQuda, profile, quda::QUDA_PROFILE_INIT, quda::QUDA_PROFILE_IO, safe_malloc, V, QudaEigParam_s::vec_outfile, and write_spinor_field().

Here is the call graph for this function:

◆ size()

int quda::Deflation::size ( )
inline

return deflation space size

Definition at line 164 of file deflation.h.

References quda::DeflationParam::cur_dim, and quda::blas::flops.

Referenced by quda::IncEigCG::operator()().

Here is the caller graph for this function:

◆ verify()

void quda::Deflation::verify ( )

This method verifies the correctness of the MG method. It checks:

  1. eigen-vector accuracy
  2. ...

Verification that the computed approximate eigenvectors are (not) valid

Definition at line 92 of file deflation.cpp.

References Av_sloppy, quda::blas::caxpy(), quda::blas::cDotProductNormA(), quda::ColorSpinorField::Components(), quda::DeflationParam::cur_dim, quda::DeflationParam::eig_global, errorQuda, QudaEigParam_s::extlib_type, quda::DeflationParam::ld, magma_Xheev(), quda::DeflationParam::matDeflation, quda::DeflationParam::matProj, quda::norm2(), param, quda::pinned_allocator, quda::pinned_deleter, printfQuda, QUDA_EIGEN_EXTLIB, QUDA_MAGMA_EXTLIB, r, r_sloppy, quda::DeflationParam::RV, quda::sqrt(), quda::blas::xpay(), and quda::zero().

Referenced by Deflation(), and quda::IncEigCG::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ Av

ColorSpinorField* quda::Deflation::Av
private

High precision aux field

Definition at line 91 of file deflation.h.

Referenced by Deflation(), increment(), and ~Deflation().

◆ Av_sloppy

ColorSpinorField* quda::Deflation::Av_sloppy
private

Deflation matrix operation result

Definition at line 97 of file deflation.h.

Referenced by Deflation(), increment(), reduce(), verify(), and ~Deflation().

◆ param

DeflationParam& quda::Deflation::param
private

Local copy of the deflation metadata

Definition at line 82 of file deflation.h.

Referenced by increment(), loadVectors(), operator()(), reduce(), saveVectors(), verify(), and ~Deflation().

◆ profile

TimeProfile quda::Deflation::profile
private

TimeProfile for this level

Definition at line 85 of file deflation.h.

Referenced by loadVectors(), saveVectors(), and ~Deflation().

◆ r

ColorSpinorField* quda::Deflation::r
private

High precision aux field

Definition at line 88 of file deflation.h.

Referenced by Deflation(), increment(), reduce(), verify(), and ~Deflation().

◆ r_sloppy

ColorSpinorField* quda::Deflation::r_sloppy
private

Ritz precision residual vector

Definition at line 94 of file deflation.h.

Referenced by Deflation(), operator()(), reduce(), verify(), and ~Deflation().


The documentation for this class was generated from the following files: