Bridge++
Ver. 2.0.2
|
Sign function of a given fermion operator. More...
#include <afopr_Sign.h>
Public Types | |
typedef AFopr< AFIELD > | AFOPR |
typedef AFIELD::real_t | real_t |
typedef ComplexTraits< real_t >::complex_t | complex_t |
Public Member Functions | |
AFopr_Sign (AFOPR *fopr, const Parameters ¶ms) | |
DEPRECATED | AFopr_Sign (AFOPR *fopr) |
~AFopr_Sign () | |
void | set_parameters (const Parameters ¶ms) |
sets parameters by a Parameter object: to be implemented in a subclass. More... | |
void | set_parameters (const int Np, const real_t x_min, const real_t x_max, const int Niter, const real_t Stop_cond) |
void | get_parameters (Parameters ¶ms) 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_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 | set_lowmodes (const int Nsbt, std::vector< real_t > *, std::vector< AFIELD > *) |
void | mult (AFIELD &v, const AFIELD &w) |
multiplies fermion operator to a given field. More... | |
void | mult_dag (AFIELD &v, const AFIELD &w) |
hermitian conjugate of mult. More... | |
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... | |
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_gm5 (AFIELD &, const AFIELD &) |
multiplies gamma_5 matrix. 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 = "AFopr_Sign" |
Private Member Functions | |
void | init () |
void | init (const Parameters ¶ms) |
void | tidyup () |
void | init_parameters () |
void | subtract_lowmodes (AFIELD &) |
void | evaluate_lowmodes (AFIELD &, const AFIELD &) |
real_t | sign_zolotarev (const real_t x) |
Private Attributes | |
int | m_Np |
number of poles in rational approx. More... | |
real_t | m_x_min |
lower range of approximate sign function More... | |
real_t | m_x_max |
upper range of approximate sign function More... | |
int | m_Niter |
max iteration of shiftsolver More... | |
real_t | m_Stop_cond |
stopping condition of shift solver More... | |
Bridge::VerboseLevel | m_vl |
std::string | m_mode |
AFOPR * | m_fopr |
int | m_Nin |
int | m_Nvol |
int | m_Nex |
std::vector< real_t > | m_cl |
std::vector< real_t > | m_bl |
std::vector< real_t > | m_sigma |
int | m_Nsbt |
std::vector< real_t > * | m_ev |
std::vector< AFIELD > * | m_vk |
AShiftsolver_CG< AFIELD, AFOPR > * | m_solver |
std::vector< AFIELD > | m_xq |
AFIELD | m_w1 |
Additional Inherited Members | |
Static Protected Attributes inherited from AFopr< AFIELD > | |
static const std::string | class_name |
Sign function of a given fermion operator.
This class defines a sign function of a given fermion operator, which must be provided at the construction, and thus itself being a kind of fermion operator. The sign function is approximated with partially fractional series whose coefficients are given by Zolotarev approximation. When eigenvalues and eigenvectors of the base fermion operator are given, contribution of these modes to sign function are explicitly calculated and subtracted from the approximation formula. Number of subtracted modes are initially set to zero, and if the function set_lowmodes() is not called, no subtraction is performed. In the present implementation, shiftsolver is explicitly set to CG, which might be generalized. 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 56 of file afopr_Sign.h.
typedef AFopr<AFIELD> AFopr_Sign< AFIELD >::AFOPR |
Definition at line 59 of file afopr_Sign.h.
typedef ComplexTraits<real_t>::complex_t AFopr_Sign< AFIELD >::complex_t |
Definition at line 61 of file afopr_Sign.h.
typedef AFIELD::real_t AFopr_Sign< AFIELD >::real_t |
Definition at line 60 of file afopr_Sign.h.
|
inline |
Definition at line 100 of file afopr_Sign.h.
|
inline |
Definition at line 104 of file afopr_Sign.h.
|
inline |
Definition at line 106 of file afopr_Sign.h.
|
inlinevirtual |
converts a Field object into other format if necessary.
Reimplemented from AFopr< AFIELD >.
Definition at line 133 of file afopr_Sign.h.
|
private |
Definition at line 333 of file afopr_Sign-tmpl.h.
|
inlinevirtual |
returns the external degree of freedom of the fermion field.
Implements AFopr< AFIELD >.
Definition at line 142 of file afopr_Sign.h.
|
inlinevirtual |
returns the on-site degree of freedom of the fermion field.
Implements AFopr< AFIELD >.
Definition at line 140 of file afopr_Sign.h.
|
inlinevirtual |
returns the volume of the fermion field.
Implements AFopr< AFIELD >.
Definition at line 141 of file afopr_Sign.h.
|
virtual |
returns the number of floating point operations.
Reimplemented from AFopr< AFIELD >.
Definition at line 368 of file afopr_Sign-tmpl.h.
|
virtual |
returns the flops per site for specified mode.
Reimplemented from AFopr< AFIELD >.
Definition at line 376 of file afopr_Sign-tmpl.h.
|
inlinevirtual |
returns the current mult mode.
Reimplemented from AFopr< AFIELD >.
Definition at line 119 of file afopr_Sign.h.
|
virtual |
gets parameters by a Parameter object: to be implemented in a subclass.
Reimplemented from AFopr< AFIELD >.
Definition at line 222 of file afopr_Sign-tmpl.h.
|
private |
Definition at line 56 of file afopr_Sign-tmpl.h.
|
private |
Definition at line 28 of file afopr_Sign-tmpl.h.
|
private |
Definition at line 174 of file afopr_Sign-tmpl.h.
|
virtual |
multiplies fermion operator to a given field.
Reimplemented from AFopr< AFIELD >.
Definition at line 278 of file afopr_Sign-tmpl.h.
|
inlinevirtual |
hermitian conjugate of mult.
Reimplemented from AFopr< AFIELD >.
Definition at line 126 of file afopr_Sign.h.
|
inlinevirtual |
returns true if additional field conversion is needed.
Reimplemented from AFopr< AFIELD >.
Definition at line 129 of file afopr_Sign.h.
|
inlinevirtual |
reverses to a Field object from other format if necessary.
Reimplemented from AFopr< AFIELD >.
Definition at line 137 of file afopr_Sign.h.
|
virtual |
sets the gauge configuration.
Implements AFopr< AFIELD >.
Definition at line 236 of file afopr_Sign-tmpl.h.
void AFopr_Sign< AFIELD >::set_lowmodes | ( | const int | Nsbt, |
std::vector< real_t > * | ev, | ||
std::vector< AFIELD > * | vk | ||
) |
Definition at line 260 of file afopr_Sign-tmpl.h.
|
virtual |
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelevant call.
Reimplemented from AFopr< AFIELD >.
Definition at line 244 of file afopr_Sign-tmpl.h.
void AFopr_Sign< AFIELD >::set_parameters | ( | const int | Np, |
const real_t | x_min, | ||
const real_t | x_max, | ||
const int | Niter, | ||
const real_t | Stop_cond | ||
) |
Definition at line 125 of file afopr_Sign-tmpl.h.
|
virtual |
sets parameters by a Parameter object: to be implemented in a subclass.
Reimplemented from AFopr< AFIELD >.
Definition at line 88 of file afopr_Sign-tmpl.h.
|
private |
Definition at line 351 of file afopr_Sign-tmpl.h.
|
private |
Definition at line 319 of file afopr_Sign-tmpl.h.
|
private |
Definition at line 80 of file afopr_Sign-tmpl.h.
|
static |
Definition at line 63 of file afopr_Sign.h.
|
private |
Definition at line 83 of file afopr_Sign.h.
|
private |
Definition at line 82 of file afopr_Sign.h.
|
private |
Definition at line 88 of file afopr_Sign.h.
|
private |
Definition at line 77 of file afopr_Sign.h.
|
private |
Definition at line 75 of file afopr_Sign.h.
|
private |
Definition at line 80 of file afopr_Sign.h.
|
private |
Definition at line 80 of file afopr_Sign.h.
|
private |
max iteration of shiftsolver
Definition at line 70 of file afopr_Sign.h.
|
private |
number of poles in rational approx.
Definition at line 67 of file afopr_Sign.h.
|
private |
Definition at line 87 of file afopr_Sign.h.
|
private |
Definition at line 80 of file afopr_Sign.h.
|
private |
Definition at line 84 of file afopr_Sign.h.
|
private |
Definition at line 92 of file afopr_Sign.h.
|
private |
stopping condition of shift solver
Definition at line 71 of file afopr_Sign.h.
|
private |
Definition at line 89 of file afopr_Sign.h.
|
private |
Definition at line 73 of file afopr_Sign.h.
|
private |
Definition at line 96 of file afopr_Sign.h.
|
private |
upper range of approximate sign function
Definition at line 69 of file afopr_Sign.h.
|
private |
lower range of approximate sign function
Definition at line 68 of file afopr_Sign.h.
|
private |
Definition at line 93 of file afopr_Sign.h.