QUDA  v1.1.0
A library for QCD on GPUs
Public Member Functions | Protected Attributes | List of all members
quda::DiracImprovedStaggered Class Reference

#include <dirac_quda.h>

+ Inheritance diagram for quda::DiracImprovedStaggered:

Public Member Functions

 DiracImprovedStaggered (const DiracParam &param)
 
 DiracImprovedStaggered (const DiracImprovedStaggered &dirac)
 
virtual ~DiracImprovedStaggered ()
 
DiracImprovedStaggeredoperator= (const DiracImprovedStaggered &dirac)
 
virtual void checkParitySpinor (const ColorSpinorField &, const ColorSpinorField &) const
 Check parity spinors are usable (check geometry ?) More...
 
virtual void Dslash (ColorSpinorField &out, const ColorSpinorField &in, const QudaParity parity) const
 apply 'dslash' operator for the DiracOp. This may be e.g. AD More...
 
virtual void DslashXpay (ColorSpinorField &out, const ColorSpinorField &in, const QudaParity parity, const ColorSpinorField &x, const double &k) const
 Xpay version of Dslash. More...
 
virtual void M (ColorSpinorField &out, const ColorSpinorField &in) const
 Apply M for the dirac op. E.g. the Schur Complement operator. More...
 
virtual void MdagM (ColorSpinorField &out, const ColorSpinorField &in) const
 Apply MdagM operator which may be optimized. More...
 
virtual void prepare (ColorSpinorField *&src, ColorSpinorField *&sol, ColorSpinorField &x, ColorSpinorField &b, const QudaSolutionType) const
 
virtual void reconstruct (ColorSpinorField &x, const ColorSpinorField &b, const QudaSolutionType) const
 
virtual QudaDiracType getDiracType () const
 returns the Dirac type More...
 
virtual const cudaGaugeFieldgetFatLinkField () const
 Get the fat link field for MG setup. More...
 
virtual const cudaGaugeFieldgetLongLinkField () const
 Get the long link field for MG setup. More...
 
virtual void updateFields (cudaGaugeField *gauge_in, cudaGaugeField *fat_gauge_in, cudaGaugeField *long_gauge_in, cudaCloverField *clover_in)
 Update the internal gauge, fat gauge, long gauge, clover field pointer as appropriate. These are pointers as opposed to references to support passing in nullptr. More...
 
void createCoarseOp (GaugeField &Y, GaugeField &X, const Transfer &T, double kappa, double mass, double mu=0., double mu_factor=0.) const
 Create the coarse staggered operator. More...
 
virtual void prefetch (QudaFieldLocation mem_space, qudaStream_t stream=0) const
 If managed memory and prefetch is enabled, prefetch all relevant memory fields (fat+long links, temporary spinors) to the CPU or GPU as requested. More...
 
- Public Member Functions inherited from quda::Dirac
 Dirac (const DiracParam &param)
 
 Dirac (const Dirac &dirac)
 
virtual ~Dirac ()
 
Diracoperator= (const Dirac &dirac)
 
void setCommDim (const int commDim_[QUDA_MAX_DIM]) const
 Enable / disable communications for the Dirac operator. More...
 
virtual bool isCoarse () const
 Whether the Dirac object is the DiracCoarse. More...
 
virtual void checkFullSpinor (const ColorSpinorField &, const ColorSpinorField &) const
 check full spinors are compatible (check geometry ?) More...
 
void checkSpinorAlias (const ColorSpinorField &, const ColorSpinorField &) const
 check spinors do not alias More...
 
virtual bool hasDslash () const
 Whether or not the operator has a single-parity Dslash. More...
 
virtual void MdagMLocal (ColorSpinorField &out, const ColorSpinorField &in) const
 Apply the local MdagM operator: equivalent to applying zero Dirichlet boundary condition to MdagM on each rank. Depending on the number of stencil steps of the fermion type, this may require additional effort to include the terms that hop out of the boundary and then hop back. More...
 
virtual void Dslash4 (ColorSpinorField &out, const ColorSpinorField &in, const QudaParity parity) const
 Apply the local MdagM operator: equivalent to applying zero Dirichlet boundary condition to MdagM on each rank. Depending on the number of stencil steps of the fermion type, this may require additional effort to include the terms that hop out of the boundary and then hop back. More...
 
void Mdag (ColorSpinorField &out, const ColorSpinorField &in) const
 Apply Mdag (daggered operator of M. More...
 
void MMdag (ColorSpinorField &out, const ColorSpinorField &in) const
 Apply Normal Operator. More...
 
virtual void prepareSpecialMG (ColorSpinorField *&src, ColorSpinorField *&sol, ColorSpinorField &x, ColorSpinorField &b, const QudaSolutionType solType) const
 
virtual void reconstructSpecialMG (ColorSpinorField &x, const ColorSpinorField &b, const QudaSolutionType solType) const
 
virtual bool hasSpecialMG () const
 specifies whether or not there's a specialized prepare/reconstruct used before/after transfering to/from the coarse level in MG More...
 
void setMass (double mass)
 
double Kappa () const
 accessor for Kappa (mass parameter) More...
 
virtual double Mass () const
 accessor for Mass (in case of a factor of 2 for staggered) More...
 
virtual double Mu () const
 accessor for twist parameter – overrride can return better value More...
 
virtual double MuFactor () const
 accessor for mu factoo for MG/ – override can return a better value More...
 
unsigned long long Flops () const
 returns and then zeroes flopcount More...
 
QudaMatPCType getMatPCType () const
 returns preconditioning type More...
 
int getStencilSteps () const
 I have no idea what this does. More...
 
void Dagger (QudaDagType dag) const
 sets whether operator is daggered or not More...
 
void flipDagger () const
 Flips value of daggered. More...
 
virtual bool hermitian () const
 is operator hermitian More...
 
QudaPrecision HaloPrecision () const
 
void setHaloPrecision (QudaPrecision halo_precision_) const
 
- Public Member Functions inherited from quda::Object
 Object ()
 
virtual ~Object ()
 

Protected Attributes

cudaGaugeFieldfatGauge
 
cudaGaugeFieldlongGauge
 
- Protected Attributes inherited from quda::Dirac
cudaGaugeFieldgauge
 
double kappa
 
double mass
 
int laplace3D
 
QudaMatPCType matpcType
 
QudaDagType dagger
 
unsigned long long flops
 
ColorSpinorFieldtmp1
 
ColorSpinorFieldtmp2
 
QudaDiracType type
 
QudaPrecision halo_precision
 
int commDim [QUDA_MAX_DIM]
 
TimeProfile profile
 

Additional Inherited Members

- Static Public Member Functions inherited from quda::Dirac
static Diraccreate (const DiracParam &param)
 Creates a subclass from parameters. More...
 
- Static Public Member Functions inherited from quda::Object
static void * operator new (std::size_t size)
 
static void operator delete (void *p)
 
static void * operator new[] (std::size_t size)
 
static void operator delete[] (void *p)
 
- Protected Member Functions inherited from quda::Dirac
bool newTmp (ColorSpinorField **, const ColorSpinorField &) const
 
void deleteTmp (ColorSpinorField **, const bool &reset) const
 

Detailed Description

Definition at line 1353 of file dirac_quda.h.

Constructor & Destructor Documentation

◆ DiracImprovedStaggered() [1/2]

quda::DiracImprovedStaggered::DiracImprovedStaggered ( const DiracParam param)

Definition at line 7 of file dirac_improved_staggered.cpp.

◆ DiracImprovedStaggered() [2/2]

quda::DiracImprovedStaggered::DiracImprovedStaggered ( const DiracImprovedStaggered dirac)

Definition at line 14 of file dirac_improved_staggered.cpp.

◆ ~DiracImprovedStaggered()

quda::DiracImprovedStaggered::~DiracImprovedStaggered ( )
virtual

Definition at line 17 of file dirac_improved_staggered.cpp.

Member Function Documentation

◆ checkParitySpinor()

void quda::DiracImprovedStaggered::checkParitySpinor ( const ColorSpinorField out,
const ColorSpinorField in 
) const
virtual

Check parity spinors are usable (check geometry ?)

Reimplemented from quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD.

Definition at line 29 of file dirac_improved_staggered.cpp.

◆ createCoarseOp()

void quda::DiracImprovedStaggered::createCoarseOp ( GaugeField Y,
GaugeField X,
const Transfer T,
double  kappa,
double  mass,
double  mu = 0.,
double  mu_factor = 0. 
) const
virtual

Create the coarse staggered operator.

Takes the multigrid transfer class, which knows about the coarse grid blocking, as well as having prolongate and restrict member functions, and returns color matrices Y[0..2*dim-1] corresponding to the coarse grid hopping terms and X corresponding to the coarse grid "clover" term. Unike the Wilson operator, we assume a mass normalization, not a kappa normalization. Ultimately this routine just performs the Kahler-Dirac rotation, dropping the long links.

Parameters
T[in]Transfer operator defining the coarse grid
Y[out]Coarse link field
X[out]Coarse clover field
kappaKappa parameter for the coarse operator (ignored, set to 1.0)
massMass parameter for the coarse operator (gets explicitly built into clover)
muMu parameter for the coarse operator (ignored for staggered)
mu_factorMu scaling factor for the coarse operator (ignored for staggered)

Reimplemented from quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD.

Definition at line 133 of file dirac_improved_staggered.cpp.

◆ Dslash()

void quda::DiracImprovedStaggered::Dslash ( ColorSpinorField out,
const ColorSpinorField in,
const QudaParity  parity 
) const
virtual

apply 'dslash' operator for the DiracOp. This may be e.g. AD

Implements quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD.

Definition at line 50 of file dirac_improved_staggered.cpp.

◆ DslashXpay()

void quda::DiracImprovedStaggered::DslashXpay ( ColorSpinorField out,
const ColorSpinorField in,
const QudaParity  parity,
const ColorSpinorField x,
const double &  k 
) const
virtual

Xpay version of Dslash.

Implements quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD.

Definition at line 58 of file dirac_improved_staggered.cpp.

◆ getDiracType()

virtual QudaDiracType quda::DiracImprovedStaggered::getDiracType ( ) const
inlinevirtual

returns the Dirac type

Returns
Dirac type

Implements quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD, and quda::DiracImprovedStaggeredPC.

Definition at line 1380 of file dirac_quda.h.

◆ getFatLinkField()

virtual const cudaGaugeField* quda::DiracImprovedStaggered::getFatLinkField ( ) const
inlinevirtual

Get the fat link field for MG setup.

Returns
fat link field

Definition at line 1387 of file dirac_quda.h.

◆ getLongLinkField()

virtual const cudaGaugeField* quda::DiracImprovedStaggered::getLongLinkField ( ) const
inlinevirtual

Get the long link field for MG setup.

Returns
long link field

Definition at line 1394 of file dirac_quda.h.

◆ M()

void quda::DiracImprovedStaggered::M ( ColorSpinorField out,
const ColorSpinorField in 
) const
virtual

Apply M for the dirac op. E.g. the Schur Complement operator.

Implements quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD, and quda::DiracImprovedStaggeredPC.

Definition at line 80 of file dirac_improved_staggered.cpp.

◆ MdagM()

void quda::DiracImprovedStaggered::MdagM ( ColorSpinorField out,
const ColorSpinorField in 
) const
virtual

Apply MdagM operator which may be optimized.

Implements quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD, and quda::DiracImprovedStaggeredPC.

Definition at line 100 of file dirac_improved_staggered.cpp.

◆ operator=()

DiracImprovedStaggered & quda::DiracImprovedStaggered::operator= ( const DiracImprovedStaggered dirac)

Definition at line 19 of file dirac_improved_staggered.cpp.

◆ prefetch()

void quda::DiracImprovedStaggered::prefetch ( QudaFieldLocation  mem_space,
qudaStream_t  stream = 0 
) const
virtual

If managed memory and prefetch is enabled, prefetch all relevant memory fields (fat+long links, temporary spinors) to the CPU or GPU as requested.

Parameters
[in]mem_spaceMemory space we are prefetching to
[in]streamWhich stream to run the prefetch in (default 0)

Reimplemented from quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD.

Definition at line 144 of file dirac_improved_staggered.cpp.

◆ prepare()

void quda::DiracImprovedStaggered::prepare ( ColorSpinorField *&  src,
ColorSpinorField *&  sol,
ColorSpinorField x,
ColorSpinorField b,
const QudaSolutionType  solType 
) const
virtual

Implements quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD, and quda::DiracImprovedStaggeredPC.

Definition at line 115 of file dirac_improved_staggered.cpp.

◆ reconstruct()

void quda::DiracImprovedStaggered::reconstruct ( ColorSpinorField x,
const ColorSpinorField b,
const QudaSolutionType  solType 
) const
virtual

Implements quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD, and quda::DiracImprovedStaggeredPC.

Definition at line 127 of file dirac_improved_staggered.cpp.

◆ updateFields()

virtual void quda::DiracImprovedStaggered::updateFields ( cudaGaugeField gauge_in,
cudaGaugeField fat_gauge_in,
cudaGaugeField long_gauge_in,
cudaCloverField clover_in 
)
inlinevirtual

Update the internal gauge, fat gauge, long gauge, clover field pointer as appropriate. These are pointers as opposed to references to support passing in nullptr.

Parameters
gauge_inUpdated gauge field
fat_gauge_inUpdated fat links
long_gauge_inUpdated long links
clover_inUpdated clover field

Reimplemented from quda::Dirac.

Reimplemented in quda::DiracImprovedStaggeredKD.

Definition at line 1405 of file dirac_quda.h.

Member Data Documentation

◆ fatGauge

cudaGaugeField* quda::DiracImprovedStaggered::fatGauge
protected

Definition at line 1356 of file dirac_quda.h.

◆ longGauge

cudaGaugeField* quda::DiracImprovedStaggered::longGauge
protected

Definition at line 1357 of file dirac_quda.h.


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