CHROMA
|
Clover term. More...
#include <clover_term_bagel_clover.h>
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 ¶m_, const BAGELCloverTerm &from) |
Create from another. More... | |
void | create (Handle< FermState< T, P, Q > > fs, const CloverFermActParams ¶m_) |
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 |
PrimitiveClovDiag * | tri_diag |
PrimitiveClovOffDiag * | tri_off_diag |
Clover term.
Definition at line 44 of file clover_term_bagel_clover.h.
typedef multi1d<LatticeColorMatrix> Chroma::BAGELCloverTerm::P |
Definition at line 49 of file clover_term_bagel_clover.h.
typedef multi1d<LatticeColorMatrix> Chroma::BAGELCloverTerm::Q |
Definition at line 50 of file clover_term_bagel_clover.h.
typedef LatticeFermion Chroma::BAGELCloverTerm::T |
Definition at line 48 of file clover_term_bagel_clover.h.
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.
Chroma::BAGELCloverTerm::~BAGELCloverTerm | ( | ) |
Free the internals.
Definition at line 124 of file clover_term_bagel_clover.cc.
References tri_diag, and tri_off_diag.
|
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:
chi | result (Write) |
psi | source (Read) |
isign | D'^dag or D' ( MINUS | PLUS ) resp. (Read) |
cb | Checkerboard 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().
|
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:
chi | result (Write) |
psi | source (Read) |
isign | D'^dag or D' ( MINUS | PLUS ) resp. (Read) |
cb | Checkerboard 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().
|
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:
DetP | flag whether to compute determinant (Read) |
logdet | logarithm of the determinant (Write) |
cb | checkerboard 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.
|
virtual |
Computes the inverse of the term on cb using Cholesky.
Invert.
cb | checkerboard 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_.
|
virtual |
Computes the inverse of the term on cb using Cholesky.
Invert.
cb | checkerboard of work (Read) |
Computes the inverse of the term on cb using Cholesky
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_.
void Chroma::BAGELCloverTerm::create | ( | Handle< FermState< T, P, Q > > | fs, |
const CloverFermActParams & | param_ | ||
) |
Creation routine.
Definition at line 135 of file clover_term_bagel_clover.cc.
References Chroma::AnisoParam_t::anisoP, Chroma::CloverFermActParams::anisoParam, apply(), applySite(), choles_done, Chroma::CloverFermActParams::clovCoeffR, Chroma::CloverFermActParams::clovCoeffT, Chroma::END_CODE(), fbc, Chroma::gaussian(), Chroma::i, makeClov(), Chroma::CloverFermActParams::Mass, Chroma::mesField(), Nd, Chroma::AnisoParam_t::nu, param, Chroma::PLUS, Chroma::pop(), Chroma::push(), Chroma::START_CODE(), u, Chroma::write(), Chroma::AnisoParam_t::xi_0, and Chroma::zero.
void Chroma::BAGELCloverTerm::create | ( | Handle< FermState< T, P, Q > > | fs, |
const CloverFermActParams & | param_, | ||
const BAGELCloverTerm & | from | ||
) |
Create from another.
Definition at line 201 of file clover_term_bagel_clover.cc.
References Chroma::AnisoParam_t::anisoP, Chroma::CloverFermActParams::anisoParam, Chroma::block(), choles_done, Chroma::CloverFermActParams::clovCoeffR, Chroma::CloverFermActParams::clovCoeffT, Chroma::END_CODE(), fbc, Chroma::i, Chroma::CloverFermActParams::Mass, Nd, Chroma::AnisoParam_t::nu, param, Chroma::START_CODE(), tr_log_diag_, tri_diag, tri_off_diag, u, and Chroma::AnisoParam_t::xi_0.
|
protectedvirtual |
Calculates Tr_D ( Gamma_mat L )
Returns the appropriate clover coefficient for indices mu and nu.
Implements Chroma::CloverTermBase< LatticeFermion, LatticeColorMatrix >.
Definition at line 1485 of file clover_term_bagel_clover.cc.
References Chroma::AnisoParam_t::anisoP, Chroma::CloverFermActParams::anisoParam, Chroma::CloverFermActParams::clovCoeffR, Chroma::CloverFermActParams::clovCoeffT, Chroma::END_CODE(), mu, nu, param, Chroma::START_CODE(), and Chroma::AnisoParam_t::t_dir.
Referenced by makeClov().
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().
|
inlineprotectedvirtual |
Get the u field.
Implements Chroma::CloverTermBase< LatticeFermion, LatticeColorMatrix >.
Definition at line 122 of file clover_term_bagel_clover.h.
References u.
|
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().
|
protected |
Create the clover term on cb.
f | field strength tensor F(mu,nu) (Read) |
cb | checkerboard (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().
|
private |
Definition at line 133 of file clover_term_bagel_clover.h.
Referenced by chlclovms(), cholesDet(), create(), and ldagdlinv().
Definition at line 128 of file clover_term_bagel_clover.h.
Referenced by create(), and getFermBC().
|
private |
Definition at line 130 of file clover_term_bagel_clover.h.
Referenced by create(), and getCloverCoeff().
|
private |
Definition at line 131 of file clover_term_bagel_clover.h.
Referenced by choles(), cholesDet(), and create().
|
private |
Definition at line 135 of file clover_term_bagel_clover.h.
Referenced by apply(), applySite(), BAGELCloverTerm(), chlclovms(), create(), ldagdlinv(), makeClov(), triacntr(), and ~BAGELCloverTerm().
|
private |
Definition at line 136 of file clover_term_bagel_clover.h.
Referenced by apply(), applySite(), BAGELCloverTerm(), chlclovms(), create(), ldagdlinv(), makeClov(), triacntr(), and ~BAGELCloverTerm().
|
private |
Definition at line 129 of file clover_term_bagel_clover.h.