Bridge++  Ver. 2.0.2
AFopr_Overlap< AFIELD > Class Template Reference

Overlap fermion operator. More...

#include <afopr_Overlap.h>

Inheritance diagram for AFopr_Overlap< AFIELD >:
AFopr< AFIELD >

Public Types

typedef AFopr< AFIELDAFOPR
 
typedef AFIELD::real_t real_t
 

Public Member Functions

 AFopr_Overlap (const Parameters &params)
 
 AFopr_Overlap (AFOPR *fopr, const Parameters &params)
 
DEPRECATED AFopr_Overlap (AFOPR *fopr)
 
 ~AFopr_Overlap ()
 
void set_parameters (const Parameters &params)
 sets parameters by a Parameter object: to be implemented in a subclass. More...
 
void set_parameters (const real_t mq, const real_t M0, const int Np, const real_t x_min, const real_t x_max, const int Niter, const real_t Stop_cond, const std::vector< int > bc)
 
void get_parameters (Parameters &params) const
 gets parameters by a Parameter object: to be implemented in a subclass. More...
 
void set_config (Field *U)
 sets the gauge configuration. More...
 
void set_lowmodes (const int Nsbt, std::vector< real_t > *, std::vector< AFIELD > *)
 
void mult (AFIELD &, const AFIELD &)
 multiplies fermion operator to a given field. More...
 
void mult_dag (AFIELD &, const AFIELD &)
 hermitian conjugate of mult. More...
 
void mult_gm5 (AFIELD &, const AFIELD &)
 multiplies gamma_5 matrix. More...
 
void set_mode (const std::string mode)
 setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelevant call. More...
 
std::string get_mode () const
 returns the current mult mode. More...
 
void H (AFIELD &v, const AFIELD &w)
 
void D (AFIELD &v, const AFIELD &w)
 
void Ddag (AFIELD &v, const AFIELD &w)
 
void DdagD (AFIELD &v, const AFIELD &w)
 
virtual bool needs_convert ()
 returns true if additional field conversion is needed. More...
 
virtual void convert (AFIELD &v, const Field &w)
 converts a Field object into other format if necessary. More...
 
virtual void reverse (Field &v, const AFIELD &w)
 reverses to a Field object from other format if necessary. More...
 
int field_nin ()
 returns the on-site degree of freedom of the fermion field. More...
 
int field_nvol ()
 returns the volume of the fermion field. More...
 
int field_nex ()
 returns the external degree of freedom of the fermion field. More...
 
double flop_count ()
 returns the number of floating point operations. More...
 
double flop_count (const std::string mode)
 returns the flops per site for specified mode. More...
 
const std::string class_name
 
- Public Member Functions inherited from AFopr< AFIELD >
 AFopr ()
 
virtual ~AFopr ()
 
virtual void mult (AFIELD &, const AFIELD &, const std::string mode)
 executes mult with specified mode (unchanging internal mode). More...
 
virtual void mult_dag (AFIELD &, const AFIELD &, const std::string mode)
 executes mult_dag with specified mode (unchanging internal mode). More...
 
virtual void mult_up (int mu, AFIELD &, const AFIELD &)
 upward nearest neighbor hopping term. More...
 
virtual void mult_dn (int mu, AFIELD &, const AFIELD &)
 downward nearest neighbor hopping term. More...
 
virtual void normalize_fprop (AFIELD &)
 normalize propagator if necessary (default: do nothing) More...
 
virtual void normalize_fopr (AFIELD &)
 normalize propagator if necessary (default: do nothing) More...
 

Static Public Attributes

static const std::string class_name = "Fopr_Overlap"
 

Private Member Functions

void init (const Parameters &params)
 
void init (AFOPR *fopr, const Parameters &params)
 
void init ()
 
void tidyup ()
 

Private Attributes

real_t m_mq
 quark mass More...
 
real_t m_M0
 domain-wall height More...
 
int m_Np
 number of poles in rational approx. More...
 
real_t m_x_min
 valid range of approximate sign function More...
 
real_t m_x_max
 valid range of approximate sign function More...
 
int m_Niter
 max iteration of shiftsolver More...
 
double m_Stop_cond
 stopping condition of shift solver More...
 
std::vector< int > m_boundary
 boundary condition More...
 
std::string m_kernel_type
 kernel type (if given) More...
 
std::string m_repr
 gamma-matrix repr. (if given) More...
 
Bridge::VerboseLevel m_vl
 
std::string m_mode
 mult mode More...
 
int m_Nin
 
int m_Nvol
 
int m_Nex
 
AFOPRm_fopr_w
 kernel fermion operator. More...
 
bool m_kernel_created
 whether kernel is created in this object More...
 
AFopr_Sign< AFIELD > * m_sign
 sign function approximation. More...
 
int m_Nsbt
 
std::vector< real_t > * m_ev
 
std::vector< AFIELD > * m_vk
 
AFIELD m_w0
 
AFIELD m_w1
 
AFIELD m_w2
 
bool m_is_initial_step
 to avoid redundant setup More...
 

Additional Inherited Members

- Static Protected Attributes inherited from AFopr< AFIELD >
static const std::string class_name
 

Detailed Description

template<typename AFIELD>
class AFopr_Overlap< AFIELD >

Overlap fermion operator.

This class defines the overlap fermion operator with a given kernel fermion operator that currently is assumed as the Wilson fermion operator. All the necessary parameters for the kernel fermion operator must be set outside of the class, while the parameters for the sign function operator are set in this class. When eigenvalues and eigenvectors of the base fermion operator are given, these modes are used in the sign function to improve the approximation formula. [20 Dec 2011 H.Matsufuru] YAML is implemented. [14 Nov 2012 Y.Namekawa] unique_ptr is introduced to avoid memory leaks [21 Mar 2015 Y.Namekawa] Changed to a template class in ver.2.0. [12 Feb 2022 H.Matsufuru]

Definition at line 45 of file afopr_Overlap.h.

Member Typedef Documentation

◆ AFOPR

template<typename AFIELD >
typedef AFopr<AFIELD> AFopr_Overlap< AFIELD >::AFOPR

Definition at line 48 of file afopr_Overlap.h.

◆ real_t

template<typename AFIELD >
typedef AFIELD::real_t AFopr_Overlap< AFIELD >::real_t

Definition at line 49 of file afopr_Overlap.h.

Constructor & Destructor Documentation

◆ AFopr_Overlap() [1/3]

template<typename AFIELD >
AFopr_Overlap< AFIELD >::AFopr_Overlap ( const Parameters params)
inline

Definition at line 91 of file afopr_Overlap.h.

◆ AFopr_Overlap() [2/3]

template<typename AFIELD >
AFopr_Overlap< AFIELD >::AFopr_Overlap ( AFOPR fopr,
const Parameters params 
)
inline

Definition at line 93 of file afopr_Overlap.h.

◆ AFopr_Overlap() [3/3]

template<typename AFIELD >
DEPRECATED AFopr_Overlap< AFIELD >::AFopr_Overlap ( AFOPR fopr)
inline

Definition at line 97 of file afopr_Overlap.h.

◆ ~AFopr_Overlap()

template<typename AFIELD >
AFopr_Overlap< AFIELD >::~AFopr_Overlap ( )
inline

Definition at line 100 of file afopr_Overlap.h.

Member Function Documentation

◆ class_name()

const std::string AFopr_Overlap< Field >::class_name

Definition at line 24 of file fopr_Overlap.cpp.

◆ convert()

template<typename AFIELD >
virtual void AFopr_Overlap< AFIELD >::convert ( AFIELD v,
const Field w 
)
inlinevirtual

converts a Field object into other format if necessary.

Reimplemented from AFopr< AFIELD >.

Definition at line 134 of file afopr_Overlap.h.

◆ D()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::D ( AFIELD v,
const AFIELD w 
)

Definition at line 436 of file afopr_Overlap-tmpl.h.

◆ Ddag()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::Ddag ( AFIELD v,
const AFIELD w 
)

Definition at line 426 of file afopr_Overlap-tmpl.h.

◆ DdagD()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::DdagD ( AFIELD v,
const AFIELD w 
)

Definition at line 405 of file afopr_Overlap-tmpl.h.

◆ field_nex()

template<typename AFIELD >
int AFopr_Overlap< AFIELD >::field_nex ( )
inlinevirtual

returns the external degree of freedom of the fermion field.

Implements AFopr< AFIELD >.

Definition at line 143 of file afopr_Overlap.h.

◆ field_nin()

template<typename AFIELD >
int AFopr_Overlap< AFIELD >::field_nin ( )
inlinevirtual

returns the on-site degree of freedom of the fermion field.

Implements AFopr< AFIELD >.

Definition at line 141 of file afopr_Overlap.h.

◆ field_nvol()

template<typename AFIELD >
int AFopr_Overlap< AFIELD >::field_nvol ( )
inlinevirtual

returns the volume of the fermion field.

Implements AFopr< AFIELD >.

Definition at line 142 of file afopr_Overlap.h.

◆ flop_count() [1/2]

template<typename AFIELD >
double AFopr_Overlap< AFIELD >::flop_count
virtual

returns the number of floating point operations.

Reimplemented from AFopr< AFIELD >.

Definition at line 459 of file afopr_Overlap-tmpl.h.

◆ flop_count() [2/2]

template<typename AFIELD >
double AFopr_Overlap< AFIELD >::flop_count ( const std::string  mode)
virtual

returns the flops per site for specified mode.

Reimplemented from AFopr< AFIELD >.

Definition at line 467 of file afopr_Overlap-tmpl.h.

◆ get_mode()

template<typename AFIELD >
std::string AFopr_Overlap< AFIELD >::get_mode ( ) const
inlinevirtual

returns the current mult mode.

Reimplemented from AFopr< AFIELD >.

Definition at line 122 of file afopr_Overlap.h.

◆ get_parameters()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::get_parameters ( Parameters params) const
virtual

gets parameters by a Parameter object: to be implemented in a subclass.

Reimplemented from AFopr< AFIELD >.

Definition at line 293 of file afopr_Overlap-tmpl.h.

◆ H()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::H ( AFIELD v,
const AFIELD w 
)

Definition at line 417 of file afopr_Overlap-tmpl.h.

◆ init() [1/3]

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::init
private

Definition at line 126 of file afopr_Overlap-tmpl.h.

◆ init() [2/3]

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::init ( AFOPR fopr,
const Parameters params 
)
private

Definition at line 84 of file afopr_Overlap-tmpl.h.

◆ init() [3/3]

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::init ( const Parameters params)
private

Definition at line 29 of file afopr_Overlap-tmpl.h.

◆ mult()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::mult ( AFIELD ,
const AFIELD  
)
virtual

multiplies fermion operator to a given field.

Reimplemented from AFopr< AFIELD >.

Definition at line 357 of file afopr_Overlap-tmpl.h.

◆ mult_dag()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::mult_dag ( AFIELD ,
const AFIELD  
)
virtual

hermitian conjugate of mult.

Reimplemented from AFopr< AFIELD >.

Definition at line 377 of file afopr_Overlap-tmpl.h.

◆ mult_gm5()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::mult_gm5 ( AFIELD ,
const AFIELD  
)
virtual

multiplies gamma_5 matrix.

Reimplemented from AFopr< AFIELD >.

Definition at line 397 of file afopr_Overlap-tmpl.h.

◆ needs_convert()

template<typename AFIELD >
virtual bool AFopr_Overlap< AFIELD >::needs_convert ( )
inlinevirtual

returns true if additional field conversion is needed.

Reimplemented from AFopr< AFIELD >.

Definition at line 130 of file afopr_Overlap.h.

◆ reverse()

template<typename AFIELD >
virtual void AFopr_Overlap< AFIELD >::reverse ( Field v,
const AFIELD w 
)
inlinevirtual

reverses to a Field object from other format if necessary.

Reimplemented from AFopr< AFIELD >.

Definition at line 138 of file afopr_Overlap.h.

◆ set_config()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::set_config ( Field )
virtual

sets the gauge configuration.

Implements AFopr< AFIELD >.

Definition at line 312 of file afopr_Overlap-tmpl.h.

◆ set_lowmodes()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::set_lowmodes ( const int  Nsbt,
std::vector< real_t > *  ev,
std::vector< AFIELD > *  vk 
)

Definition at line 320 of file afopr_Overlap-tmpl.h.

◆ set_mode()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::set_mode ( const std::string  mode)
virtual

setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelevant call.

Reimplemented from AFopr< AFIELD >.

Definition at line 342 of file afopr_Overlap-tmpl.h.

◆ set_parameters() [1/2]

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::set_parameters ( const Parameters params)
virtual

sets parameters by a Parameter object: to be implemented in a subclass.

Reimplemented from AFopr< AFIELD >.

Definition at line 174 of file afopr_Overlap-tmpl.h.

◆ set_parameters() [2/2]

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::set_parameters ( const real_t  mq,
const real_t  M0,
const int  Np,
const real_t  x_min,
const real_t  x_max,
const int  Niter,
const real_t  Stop_cond,
const std::vector< int >  bc 
)

Definition at line 230 of file afopr_Overlap-tmpl.h.

◆ tidyup()

template<typename AFIELD >
void AFopr_Overlap< AFIELD >::tidyup
private

Definition at line 165 of file afopr_Overlap-tmpl.h.

Member Data Documentation

◆ class_name

template<typename AFIELD >
const std::string AFopr_Overlap< AFIELD >::class_name = "Fopr_Overlap"
static

Definition at line 50 of file afopr_Overlap.h.

◆ m_boundary

template<typename AFIELD >
std::vector<int> AFopr_Overlap< AFIELD >::m_boundary
private

boundary condition

Definition at line 62 of file afopr_Overlap.h.

◆ m_ev

template<typename AFIELD >
std::vector<real_t>* AFopr_Overlap< AFIELD >::m_ev
private

Definition at line 81 of file afopr_Overlap.h.

◆ m_fopr_w

template<typename AFIELD >
AFOPR* AFopr_Overlap< AFIELD >::m_fopr_w
private

kernel fermion operator.

Definition at line 74 of file afopr_Overlap.h.

◆ m_is_initial_step

template<typename AFIELD >
bool AFopr_Overlap< AFIELD >::m_is_initial_step
private

to avoid redundant setup

Definition at line 87 of file afopr_Overlap.h.

◆ m_kernel_created

template<typename AFIELD >
bool AFopr_Overlap< AFIELD >::m_kernel_created
private

whether kernel is created in this object

Definition at line 75 of file afopr_Overlap.h.

◆ m_kernel_type

template<typename AFIELD >
std::string AFopr_Overlap< AFIELD >::m_kernel_type
private

kernel type (if given)

Definition at line 64 of file afopr_Overlap.h.

◆ m_M0

template<typename AFIELD >
real_t AFopr_Overlap< AFIELD >::m_M0
private

domain-wall height

Definition at line 56 of file afopr_Overlap.h.

◆ m_mode

template<typename AFIELD >
std::string AFopr_Overlap< AFIELD >::m_mode
private

mult mode

Definition at line 69 of file afopr_Overlap.h.

◆ m_mq

template<typename AFIELD >
real_t AFopr_Overlap< AFIELD >::m_mq
private

quark mass

Definition at line 55 of file afopr_Overlap.h.

◆ m_Nex

template<typename AFIELD >
int AFopr_Overlap< AFIELD >::m_Nex
private

Definition at line 72 of file afopr_Overlap.h.

◆ m_Nin

template<typename AFIELD >
int AFopr_Overlap< AFIELD >::m_Nin
private

Definition at line 72 of file afopr_Overlap.h.

◆ m_Niter

template<typename AFIELD >
int AFopr_Overlap< AFIELD >::m_Niter
private

max iteration of shiftsolver

Definition at line 60 of file afopr_Overlap.h.

◆ m_Np

template<typename AFIELD >
int AFopr_Overlap< AFIELD >::m_Np
private

number of poles in rational approx.

Definition at line 57 of file afopr_Overlap.h.

◆ m_Nsbt

template<typename AFIELD >
int AFopr_Overlap< AFIELD >::m_Nsbt
private

Definition at line 80 of file afopr_Overlap.h.

◆ m_Nvol

template<typename AFIELD >
int AFopr_Overlap< AFIELD >::m_Nvol
private

Definition at line 72 of file afopr_Overlap.h.

◆ m_repr

template<typename AFIELD >
std::string AFopr_Overlap< AFIELD >::m_repr
private

gamma-matrix repr. (if given)

Definition at line 65 of file afopr_Overlap.h.

◆ m_sign

template<typename AFIELD >
AFopr_Sign<AFIELD>* AFopr_Overlap< AFIELD >::m_sign
private

sign function approximation.

Definition at line 77 of file afopr_Overlap.h.

◆ m_Stop_cond

template<typename AFIELD >
double AFopr_Overlap< AFIELD >::m_Stop_cond
private

stopping condition of shift solver

Definition at line 61 of file afopr_Overlap.h.

◆ m_vk

template<typename AFIELD >
std::vector<AFIELD>* AFopr_Overlap< AFIELD >::m_vk
private

Definition at line 82 of file afopr_Overlap.h.

◆ m_vl

template<typename AFIELD >
Bridge::VerboseLevel AFopr_Overlap< AFIELD >::m_vl
private

Definition at line 67 of file afopr_Overlap.h.

◆ m_w0

template<typename AFIELD >
AFIELD AFopr_Overlap< AFIELD >::m_w0
private

Definition at line 85 of file afopr_Overlap.h.

◆ m_w1

template<typename AFIELD >
AFIELD AFopr_Overlap< AFIELD >::m_w1
private

Definition at line 85 of file afopr_Overlap.h.

◆ m_w2

template<typename AFIELD >
AFIELD AFopr_Overlap< AFIELD >::m_w2
private

Definition at line 85 of file afopr_Overlap.h.

◆ m_x_max

template<typename AFIELD >
real_t AFopr_Overlap< AFIELD >::m_x_max
private

valid range of approximate sign function

Definition at line 59 of file afopr_Overlap.h.

◆ m_x_min

template<typename AFIELD >
real_t AFopr_Overlap< AFIELD >::m_x_min
private

valid range of approximate sign function

Definition at line 58 of file afopr_Overlap.h.


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