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

Clover term. More...

#include <clover_term_bagel_clover.h>

Inheritance diagram for Chroma::BAGELCloverTerm:
Chroma::CloverTermBase< LatticeFermion, LatticeColorMatrix > Chroma::DslashLinearOperator< T, P, Q > Chroma::DiffLinearOperator< T, P, Q > Chroma::LinearOperator< T >

Public Types

typedef LatticeFermion T
 
typedef multi1d< LatticeColorMatrix > P
 
typedef multi1d< LatticeColorMatrix > Q
 

Public Member Functions

 BAGELCloverTerm ()
 Empty constructor. Must use create later. More...
 
 ~BAGELCloverTerm ()
 Free the internals. More...
 
void create (Handle< FermState< T, P, Q > > fs, const CloverFermActParams &param_, const BAGELCloverTerm &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 (LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign, int cb) const
 
void applySite (LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign, int site) const
 
void triacntr (LatticeColorMatrix &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< LatticeFermion, LatticeColorMatrix >
virtual ~CloverTermBase ()
 No real need for cleanup here. More...
 
const Subset & subset () const
 Subset is all here. More...
 
void deriv (multi1d< LatticeColorMatrix > &ds_u, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign) const
 Take deriv of D. More...
 
void deriv (multi1d< LatticeColorMatrix > &ds_u, const LatticeFermion &chi, const LatticeFermion &psi, enum PlusMinus isign, int cb) const
 Take deriv of D. More...
 
void derivMultipole (multi1d< LatticeColorMatrix > &ds_u, const multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign) const
 Take deriv of D. More...
 
void derivMultipole (multi1d< LatticeColorMatrix > &ds_u, const multi1d< LatticeFermion > &chi, const multi1d< LatticeFermion > &psi, enum PlusMinus isign, int cb) const
 Take deriv of D. More...
 
void derivTrLn (multi1d< LatticeColorMatrix > &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, LatticeColorMatrix &ds_u_mu, LatticeColorMatrix &ds_u_nu, const LatticeColorMatrix &Lambda) const
 
unsigned long nFlops () const
 Return flops performed by the operator() 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 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< LatticeColorMatrix > &f, const Real &diag_mass)
 Create the clover term on cb. More...
 
void ldagdlinv (LatticeReal &tr_log_diag, int cb)
 Invert the clover term on cb using LDL^\dagger decomp. More...
 
void chlclovms (LatticeReal &log_diag, int cb)
 Invert the clover term on cb using Cholesky decomp. More...
 
const multi1d< LatticeColorMatrix > & 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< LatticeColorMatrix > u
 
CloverFermActParams param
 
LatticeReal tr_log_diag_
 
multi1d< bool > choles_done
 
PrimitiveClovDiagtri_diag
 
PrimitiveClovOffDiagtri_off_diag
 

Detailed Description

Clover term.

Definition at line 44 of file clover_term_bagel_clover.h.

Member Typedef Documentation

◆ P

typedef multi1d<LatticeColorMatrix> Chroma::BAGELCloverTerm::P

Definition at line 49 of file clover_term_bagel_clover.h.

◆ Q

typedef multi1d<LatticeColorMatrix> Chroma::BAGELCloverTerm::Q

Definition at line 50 of file clover_term_bagel_clover.h.

◆ T

typedef LatticeFermion Chroma::BAGELCloverTerm::T

Definition at line 48 of file clover_term_bagel_clover.h.

Constructor & Destructor Documentation

◆ BAGELCloverTerm()

Chroma::BAGELCloverTerm::BAGELCloverTerm ( )

Empty constructor. Must use create later.

Definition at line 79 of file clover_term_bagel_clover.cc.

References Chroma::DEFAULT, tri_diag, and tri_off_diag.

◆ ~BAGELCloverTerm()

Chroma::BAGELCloverTerm::~BAGELCloverTerm ( )

Free the internals.

Definition at line 124 of file clover_term_bagel_clover.cc.

References tri_diag, and tri_off_diag.

Member Function Documentation

◆ apply()

void Chroma::BAGELCloverTerm::apply ( LatticeFermion &  chi,
const LatticeFermion &  psi,
enum PlusMinus  isign,
int  cb 
) const
virtual

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)

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

Definition at line 970 of file clover_term_bagel_clover.cc.

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

Referenced by create().

◆ applySite()

void Chroma::BAGELCloverTerm::applySite ( LatticeFermion &  chi,
const LatticeFermion &  psi,
enum PlusMinus  isign,
int  site 
) const
virtual

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)

Implements Chroma::CloverTermBase< LatticeFermion, LatticeColorMatrix >.

Definition at line 1043 of file clover_term_bagel_clover.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::BAGELCloverTerm::chlclovms ( LatticeReal &  tr_log_diag,
int  cb 
)
protected

Invert the clover term on cb using Cholesky decomp.

CHLCLOVMS - Cholesky decompose the clover mass term and uses it to compute lower(A^-1) = lower((L.L^dag)^-1) Adapted from Golub and Van Loan, Matrix Computations, 2nd, Sec 4.2.4

Arguments:

Parameters
DetPflag whether to compute determinant (Read)
logdetlogarithm of the determinant (Write)
cbcheckerboard of work (Read)

Definition at line 788 of file clover_term_bagel_clover.cc.

References Chroma::cb, choles_done, elem_ij, elem_ji, Chroma::END_CODE(), Chroma::i, j, Chroma::k, n, Chroma::one, Chroma::QDP_error_exit(), Chroma::s(), Chroma::START_CODE(), sum, tri_diag, tri_off_diag, and Chroma::zero.

◆ choles()

void Chroma::BAGELCloverTerm::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< LatticeFermion, LatticeColorMatrix >.

Definition at line 539 of file clover_term_bagel_clover.cc.

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

◆ cholesDet()

Double Chroma::BAGELCloverTerm::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< LatticeFermion, LatticeColorMatrix >.

Definition at line 557 of file clover_term_bagel_clover.cc.

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

◆ create() [1/2]

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

◆ create() [2/2]

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

◆ getCloverCoeff()

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

◆ getFermBC()

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

Return the fermion BC object for this linear operator.

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

Definition at line 105 of file clover_term_bagel_clover.h.

References fbc.

Referenced by apply().

◆ getU()

const multi1d<LatticeColorMatrix>& Chroma::BAGELCloverTerm::getU ( ) const
inlineprotectedvirtual

Get the u field.

Implements Chroma::CloverTermBase< LatticeFermion, LatticeColorMatrix >.

Definition at line 122 of file clover_term_bagel_clover.h.

References u.

◆ ldagdlinv()

void Chroma::BAGELCloverTerm::ldagdlinv ( LatticeReal &  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 574 of file clover_term_bagel_clover.cc.

References Chroma::block(), Chroma::cb, choles_done, elem_ij, elem_ji, Chroma::END_CODE(), Chroma::i, j, Chroma::k, l, Chroma::one, Chroma::QDP_error_exit(), Chroma::START_CODE(), sum, tri_diag, tri_off_diag, and Chroma::zero.

Referenced by choles().

◆ makeClov()

void Chroma::BAGELCloverTerm::makeClov ( const multi1d< LatticeColorMatrix > &  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 347 of file clover_term_bagel_clover.cc.

References elem_ij, Chroma::END_CODE(), std::tr1::f1, std::tr1::f2, std::tr1::f3, std::tr1::f4, std::tr1::f5, getCloverCoeff(), Chroma::i, j, Nd, Chroma::QDP_error_exit(), Chroma::START_CODE(), tri_diag, and tri_off_diag.

Referenced by create().

Member Data Documentation

◆ choles_done

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

Definition at line 133 of file clover_term_bagel_clover.h.

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

◆ fbc

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

Definition at line 128 of file clover_term_bagel_clover.h.

Referenced by create(), and getFermBC().

◆ param

CloverFermActParams Chroma::BAGELCloverTerm::param
private

Definition at line 130 of file clover_term_bagel_clover.h.

Referenced by create(), and getCloverCoeff().

◆ tr_log_diag_

LatticeReal Chroma::BAGELCloverTerm::tr_log_diag_
private

Definition at line 131 of file clover_term_bagel_clover.h.

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

◆ tri_diag

PrimitiveClovDiag* Chroma::BAGELCloverTerm::tri_diag
private

◆ tri_off_diag

PrimitiveClovOffDiag* Chroma::BAGELCloverTerm::tri_off_diag
private

◆ u

multi1d<LatticeColorMatrix> Chroma::BAGELCloverTerm::u
private

Definition at line 129 of file clover_term_bagel_clover.h.

Referenced by create(), and getU().


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