CHROMA
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members

Clover term. More...

#include <clover_term_ssed.h>

Inheritance diagram for Chroma::SSEDCloverTerm:
Chroma::CloverTermBase< LatticeFermionD, LatticeColorMatrixD > Chroma::DslashLinearOperator< T, P, Q > Chroma::DiffLinearOperator< T, P, Q > Chroma::LinearOperator< T >

Public Types

typedef LatticeDiracFermionD3 T
 
typedef multi1d< LatticeColorMatrixD3 > P
 
typedef multi1d< LatticeColorMatrixD3 > Q
 

Public Member Functions

 SSEDCloverTerm ()
 Empty constructor. Must use create later. More...
 
 ~SSEDCloverTerm ()
 Free the internals. More...
 
void create (Handle< FermState< T, P, Q > > fs, const CloverFermActParams &param_, const SSEDCloverTerm &from)
 Create from another. More...
 
void create (Handle< FermState< T, P, Q > > fs, const CloverFermActParams &param_)
 Creation routine. More...
 
void choles (int cb)
 Computes the inverse of the term on cb using Cholesky. More...
 
Double cholesDet (int cb) const
 Computes the inverse of the term on cb using Cholesky. More...
 
void apply (LatticeDiracFermionD3 &chi, const LatticeDiracFermionD3 &psi, enum PlusMinus isign, int cb) const
 
void applySite (LatticeDiracFermionD3 &chi, const LatticeDiracFermionD3 &psi, enum PlusMinus isign, int site) const
 
void triacntr (LatticeColorMatrixD3 &B, int mat, int cb) const
 Calculates Tr_D ( Gamma_mat L ) More...
 
const FermBC< T, P, Q > & getFermBC () const
 Return the fermion BC object for this linear operator. More...
 
- Public Member Functions inherited from Chroma::CloverTermBase< LatticeFermionD, LatticeColorMatrixD >
virtual ~CloverTermBase ()
 No real need for cleanup here. More...
 
const Subset & subset () const
 Subset is all here. More...
 
virtual void applySite (LatticeFermionD &chi, const LatticeFermionD &psi, enum PlusMinus isign, int site) const=0
 
void deriv (multi1d< LatticeColorMatrixD > &ds_u, const LatticeFermionD &chi, const LatticeFermionD &psi, enum PlusMinus isign) const
 Take deriv of D. More...
 
void deriv (multi1d< LatticeColorMatrixD > &ds_u, const LatticeFermionD &chi, const LatticeFermionD &psi, enum PlusMinus isign, int cb) const
 Take deriv of D. More...
 
void derivMultipole (multi1d< LatticeColorMatrixD > &ds_u, const multi1d< LatticeFermionD > &chi, const multi1d< LatticeFermionD > &psi, enum PlusMinus isign) const
 Take deriv of D. More...
 
void derivMultipole (multi1d< LatticeColorMatrixD > &ds_u, const multi1d< LatticeFermionD > &chi, const multi1d< LatticeFermionD > &psi, enum PlusMinus isign, int cb) const
 Take deriv of D. More...
 
void derivTrLn (multi1d< LatticeColorMatrixD > &ds_u, enum PlusMinus isign, int cb) const
 Take derivative of TrLn D. More...
 
void deriv_loops (const int u, const int mu, const int cb, LatticeColorMatrixD &ds_u_mu, LatticeColorMatrixD &ds_u_nu, const LatticeColorMatrixD &Lambda) const
 
unsigned long nFlops () const
 Return flops performed by the operator() More...
 
virtual void triacntr (LatticeColorMatrixD &B, int mat, int cb) const=0
 Calculates Tr_D ( Gamma_mat L ) More...
 
- Public Member Functions inherited from Chroma::DslashLinearOperator< T, P, Q >
virtual ~DslashLinearOperator ()
 Virtual destructor to help in cleanup. More...
 
virtual void operator() (T &d, const T &psi, enum PlusMinus isign) const
 Apply operator on both checkerboards (entire lattice) More...
 
virtual void apply (T &chi, const T &psi, enum PlusMinus isign, int cb) const =0
 Apply checkerboarded linear operator. More...
 
virtual void deriv (P &ds_u, const T &chi, const T &psi, enum PlusMinus isign) const
 Take deriv of D. More...
 
virtual void deriv (P &ds_u, const T &chi, const T &psi, enum PlusMinus isign, int cb) const
 Take deriv of D. More...
 
virtual void derivMultipole (P &ds_u, const multi1d< T > &chi, const multi1d< T > &psi, enum PlusMinus isign) const
 Return the force for multiple poles. More...
 
virtual void derivMultipole (P &ds_u, const multi1d< T > &chi, const multi1d< T > &psi, enum PlusMinus isign, int cb) const
 
- Public Member Functions inherited from Chroma::DiffLinearOperator< T, P, Q >
virtual ~DiffLinearOperator ()
 Virtual destructor to help with cleanup;. More...
 
virtual void deriv (P &ds_u, const T &chi, const T &psi, enum PlusMinus isign, const Real &epsilon) const
 Apply the derivative of the operator onto a source std::vector to some precision. More...
 
- Public Member Functions inherited from Chroma::LinearOperator< T >
virtual ~LinearOperator ()
 Virtual destructor to help with cleanup;. More...
 
virtual void operator() (T &chi, const T &psi, enum PlusMinus isign, Real epsilon) const
 Apply the operator onto a source std::vector to some precision. More...
 

Protected Member Functions

void makeClov (const multi1d< LatticeColorMatrixD3 > &f, const Real &diag_mass)
 Create the clover term on cb. More...
 
void ldagdlinv (LatticeDouble &tr_log_diag, int cb)
 Invert the clover term on cb using LDL^\dagger decomp. More...
 
void chlclovms (LatticeDouble &log_diag, int cb)
 Invert the clover term on cb using Cholesky decomp. More...
 
const multi1d< LatticeColorMatrixD3 > & getU () const
 Get the u field. More...
 
Real getCloverCoeff (int mu, int nu) const
 Calculates Tr_D ( Gamma_mat L ) More...
 

Private Attributes

Handle< FermBC< T, P, Q > > fbc
 
multi1d< LatticeColorMatrixD3 > u
 
CloverFermActParams param
 
LatticeDouble tr_log_diag_
 
multi1d< bool > choles_done
 
PrimitiveClovDiagtri_diag
 
PrimitiveClovOffDiagtri_off_diag
 

Detailed Description

Clover term.

Definition at line 34 of file clover_term_ssed.h.

Member Typedef Documentation

◆ P

typedef multi1d<LatticeColorMatrixD3> Chroma::SSEDCloverTerm::P

Definition at line 40 of file clover_term_ssed.h.

◆ Q

typedef multi1d<LatticeColorMatrixD3> Chroma::SSEDCloverTerm::Q

Definition at line 41 of file clover_term_ssed.h.

◆ T

typedef LatticeDiracFermionD3 Chroma::SSEDCloverTerm::T

Definition at line 39 of file clover_term_ssed.h.

Constructor & Destructor Documentation

◆ SSEDCloverTerm()

Chroma::SSEDCloverTerm::SSEDCloverTerm ( )

Empty constructor. Must use create later.

Definition at line 18 of file clover_term_ssed.cc.

References Chroma::DEFAULT, tri_diag, and tri_off_diag.

◆ ~SSEDCloverTerm()

Chroma::SSEDCloverTerm::~SSEDCloverTerm ( )

Free the internals.

Definition at line 63 of file clover_term_ssed.cc.

References tri_diag, and tri_off_diag.

Member Function Documentation

◆ apply()

void Chroma::SSEDCloverTerm::apply ( LatticeDiracFermionD3 &  chi,
const LatticeDiracFermionD3 &  psi,
enum PlusMinus  isign,
int  cb 
) const

Apply a dslash

Performs the operation

chi <- (L + D + L^dag) . psi

where L is a lower triangular matrix D is the real diagonal. (stored together in type TRIANG)

Arguments:

Parameters
chiresult (Write)
psisource (Read)
isignD'^dag or D' ( MINUS | PLUS ) resp. (Read)
cbCheckerboard of OUTPUT std::vector (Read)

Definition at line 791 of file clover_term_ssed.cc.

References Chroma::a, Chroma::cb, Chroma::chi(), Chroma::END_CODE(), getFermBC(), n, Chroma::SSEDCloverEnv::orderedApplySiteLoop(), Chroma::psi, Chroma::QDP_error_exit(), Chroma::START_CODE(), tri_diag, tri_off_diag, and Chroma::SSEDCloverEnv::unorderedApplySiteLoop().

Referenced by create().

◆ applySite()

void Chroma::SSEDCloverTerm::applySite ( LatticeDiracFermionD3 &  chi,
const LatticeDiracFermionD3 &  psi,
enum PlusMinus  isign,
int  site 
) const

Apply a dslash

Performs the operation

chi <- (L + D + L^dag) . psi

where L is a lower triangular matrix D is the real diagonal. (stored together in type TRIANG)

Arguments:

Parameters
chiresult (Write)
psisource (Read)
isignD'^dag or D' ( MINUS | PLUS ) resp. (Read)
cbCheckerboard of OUTPUT std::vector (Read)

Definition at line 837 of file clover_term_ssed.cc.

References Chroma::chi(), Chroma::END_CODE(), n, Chroma::psi, Chroma::QDP_error_exit(), Chroma::START_CODE(), tri_diag, and tri_off_diag.

Referenced by create().

◆ chlclovms()

void Chroma::SSEDCloverTerm::chlclovms ( LatticeDouble &  log_diag,
int  cb 
)
protected

Invert the clover term on cb using Cholesky decomp.

◆ choles()

void Chroma::SSEDCloverTerm::choles ( int  cb)
virtual

Computes the inverse of the term on cb using Cholesky.

Invert.

Parameters
cbcheckerboard of work (Read)

Computes the inverse of the term on cb using Cholesky

Implements Chroma::CloverTermBase< LatticeFermionD, LatticeColorMatrixD >.

Definition at line 463 of file clover_term_ssed.cc.

References Chroma::cb, Chroma::END_CODE(), ldagdlinv(), Chroma::START_CODE(), and tr_log_diag_.

◆ cholesDet()

Double Chroma::SSEDCloverTerm::cholesDet ( int  cb) const
virtual

Computes the inverse of the term on cb using Cholesky.

Invert.

Parameters
cbcheckerboard of work (Read)
Returns
logarithm of the determinant

Computes the inverse of the term on cb using Cholesky

Returns
logarithm of the determinant

Implements Chroma::CloverTermBase< LatticeFermionD, LatticeColorMatrixD >.

Definition at line 481 of file clover_term_ssed.cc.

References Chroma::cb, choles_done, Chroma::END_CODE(), Chroma::START_CODE(), sum, and tr_log_diag_.

◆ create() [1/2]

void Chroma::SSEDCloverTerm::create ( Handle< FermState< T, P, Q > >  fs,
const CloverFermActParams param_ 
)

◆ create() [2/2]

void Chroma::SSEDCloverTerm::create ( Handle< FermState< T, P, Q > >  fs,
const CloverFermActParams param_,
const SSEDCloverTerm from 
)

◆ getCloverCoeff()

Real Chroma::SSEDCloverTerm::getCloverCoeff ( int  mu,
int  nu 
) const
protectedvirtual

◆ getFermBC()

const FermBC<T,P,Q>& Chroma::SSEDCloverTerm::getFermBC ( ) const
inlinevirtual

Return the fermion BC object for this linear operator.

Implements Chroma::DslashLinearOperator< T, P, Q >.

Definition at line 96 of file clover_term_ssed.h.

References fbc.

Referenced by apply().

◆ getU()

const multi1d<LatticeColorMatrixD3>& Chroma::SSEDCloverTerm::getU ( ) const
inlineprotectedvirtual

Get the u field.

Implements Chroma::CloverTermBase< LatticeFermionD, LatticeColorMatrixD >.

Definition at line 113 of file clover_term_ssed.h.

References u.

◆ ldagdlinv()

void Chroma::SSEDCloverTerm::ldagdlinv ( LatticeDouble &  tr_log_diag,
int  cb 
)
protected

Invert the clover term on cb using LDL^\dagger decomp.

An LDL^\dag decomposition and inversion?

Definition at line 706 of file clover_term_ssed.cc.

References Chroma::a, Chroma::cb, choles_done, Chroma::END_CODE(), Chroma::SSEDCloverEnv::lDagDLInvSiteLoop(), Chroma::QDP_error_exit(), Chroma::START_CODE(), tri_diag, tri_off_diag, and Chroma::zero.

Referenced by choles().

◆ makeClov()

void Chroma::SSEDCloverTerm::makeClov ( const multi1d< LatticeColorMatrixD3 > &  f,
const Real &  diag_mass 
)
protected

Create the clover term on cb.

Parameters
ffield strength tensor F(mu,nu) (Read)
cbcheckerboard (Read)

Definition at line 424 of file clover_term_ssed.cc.

References Chroma::a, Chroma::END_CODE(), std::tr1::f1, std::tr1::f2, std::tr1::f3, std::tr1::f4, std::tr1::f5, getCloverCoeff(), Chroma::SSEDCloverEnv::makeClovSiteLoop(), Nd, Chroma::QDP_error_exit(), Chroma::START_CODE(), tri_diag, and tri_off_diag.

Referenced by create().

◆ triacntr()

void Chroma::SSEDCloverTerm::triacntr ( LatticeColorMatrixD3 &  B,
int  mat,
int  cb 
) const

Member Data Documentation

◆ choles_done

multi1d<bool> Chroma::SSEDCloverTerm::choles_done
private

Definition at line 124 of file clover_term_ssed.h.

Referenced by cholesDet(), create(), and ldagdlinv().

◆ fbc

Handle< FermBC<T,P,Q> > Chroma::SSEDCloverTerm::fbc
private

Definition at line 119 of file clover_term_ssed.h.

Referenced by create(), and getFermBC().

◆ param

CloverFermActParams Chroma::SSEDCloverTerm::param
private

Definition at line 121 of file clover_term_ssed.h.

Referenced by create(), and getCloverCoeff().

◆ tr_log_diag_

LatticeDouble Chroma::SSEDCloverTerm::tr_log_diag_
private

Definition at line 122 of file clover_term_ssed.h.

Referenced by choles(), cholesDet(), and create().

◆ tri_diag

PrimitiveClovDiag* Chroma::SSEDCloverTerm::tri_diag
private

◆ tri_off_diag

PrimitiveClovOffDiag* Chroma::SSEDCloverTerm::tri_off_diag
private

◆ u

multi1d<LatticeColorMatrixD3> Chroma::SSEDCloverTerm::u
private

Definition at line 120 of file clover_term_ssed.h.

Referenced by create(), and getU().


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