Bridge++  Ver. 2.0.2
Fopr_CRS Class Reference

Fermion operator with CRS matrix format. More...

#include <fopr_CRS.h>

Inheritance diagram for Fopr_CRS:
AFopr< Field >

Public Member Functions

 Fopr_CRS (Fopr *fopr)
 
 Fopr_CRS (const std::string fname)
 
void set_parameters (const Parameters &)
 sets parameters by a Parameter object: to be implemented in a subclass. More...
 
void get_parameters (Parameters &) const
 gets parameters by a Parameter object: to be implemented in a subclass. More...
 
void write_matrix (const std::string)
 
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
 
void mult (Field &v, const Field &f)
 multiplies fermion operator to a given field. More...
 
void mult_dag (Field &v, const Field &f)
 hermitian conjugate of mult. More...
 
void DdagD (Field &, const Field &)
 
void D (Field &, const Field &)
 
void Ddag (Field &, const Field &)
 
void H (Field &, const Field &)
 
int field_nvol ()
 returns the volume of the fermion field. More...
 
int field_nin ()
 returns the on-site degree of freedom of the fermion field. More...
 
int field_nex ()
 returns the external degree of freedom of the fermion field. More...
 
double flop_count ()
 this returns the number of floating point operations. More...
 
- Public Member Functions inherited from AFopr< Field >
 AFopr ()
 
virtual ~AFopr ()
 
virtual std::string get_mode () const
 returns the current mult mode. More...
 
virtual void mult (Field &, const Field &, const std::string mode)
 executes mult with specified mode (unchanging internal mode). More...
 
virtual void mult_dag (Field &, const Field &, const std::string mode)
 executes mult_dag with specified mode (unchanging internal mode). More...
 
virtual void mult_gm5 (Field &, const Field &)
 multiplies gamma_5 matrix. More...
 
virtual void mult_up (int mu, Field &, const Field &)
 upward nearest neighbor hopping term. More...
 
virtual void mult_dn (int mu, Field &, const Field &)
 downward nearest neighbor hopping term. More...
 
virtual void normalize_fprop (Field &)
 normalize propagator if necessary (default: do nothing) More...
 
virtual void normalize_fopr (Field &)
 normalize propagator if necessary (default: do nothing) More...
 
virtual double flop_count (const std::string mode)
 returns the flops per site for specified mode. More...
 
virtual bool needs_convert ()
 returns true if additional field conversion is needed. More...
 
virtual void convert (Field &, const Field &)
 converts a Field object into other format if necessary. More...
 
virtual void reverse (Field &, const Field &)
 converts an alternative field to a Field object. More...
 

Static Public Attributes

static const std::string class_name = "Fopr_CRS"
 

Private Member Functions

void set_matrix ()
 
void set_matrix (const std::string)
 
void set_matrix_1row (int &, std::vector< int > &, std::vector< double > &, const Field &)
 

Private Attributes

Bridge::VerboseLevel m_vl
 
int m_Nin
 
int m_Nvol
 
int m_Nex
 
int m_Nsize
 
int m_Nnz
 
std::vector< int > m_rowidx_nz
 
std::vector< int > m_column_nz
 
std::vector< double > m_elem_nz
 
std::string m_mode
 
Foprm_fopr
 

Additional Inherited Members

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

Detailed Description

Fermion operator with CRS matrix format.

This fermion operator class is defined by CRS matrix format which is widely used in studies of linear algorithms. The matrix is defined by giving fermion operator, or reading from a file (filename is provided at construction). In present implementation, this class works only on single node. Parallel version should be implemented. [07 Dec 2011 H.Matsufuru]

Definition at line 37 of file fopr_CRS.h.

Constructor & Destructor Documentation

◆ Fopr_CRS() [1/2]

Fopr_CRS::Fopr_CRS ( Fopr fopr)
inline

Definition at line 55 of file fopr_CRS.h.

◆ Fopr_CRS() [2/2]

Fopr_CRS::Fopr_CRS ( const std::string  fname)
inline

Definition at line 61 of file fopr_CRS.h.

Member Function Documentation

◆ D()

void Fopr_CRS::D ( Field v,
const Field w 
)

Definition at line 68 of file fopr_CRS.cpp.

◆ Ddag()

void Fopr_CRS::Ddag ( Field v,
const Field w 
)

Definition at line 105 of file fopr_CRS.cpp.

◆ DdagD()

void Fopr_CRS::DdagD ( Field v,
const Field w 
)

Definition at line 58 of file fopr_CRS.cpp.

◆ field_nex()

int Fopr_CRS::field_nex ( )
inlinevirtual

returns the external degree of freedom of the fermion field.

Implements AFopr< Field >.

Definition at line 125 of file fopr_CRS.h.

◆ field_nin()

int Fopr_CRS::field_nin ( )
inlinevirtual

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

Implements AFopr< Field >.

Definition at line 124 of file fopr_CRS.h.

◆ field_nvol()

int Fopr_CRS::field_nvol ( )
inlinevirtual

returns the volume of the fermion field.

Implements AFopr< Field >.

Definition at line 123 of file fopr_CRS.h.

◆ flop_count()

double Fopr_CRS::flop_count ( )
virtual

this returns the number of floating point operations.

Reimplemented from AFopr< Field >.

Definition at line 335 of file fopr_CRS.cpp.

◆ get_mode()

std::string Fopr_CRS::get_mode ( ) const
inline

Definition at line 85 of file fopr_CRS.h.

◆ get_parameters()

void Fopr_CRS::get_parameters ( Parameters params) const
virtual

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

Reimplemented from AFopr< Field >.

Definition at line 39 of file fopr_CRS.cpp.

◆ H()

void Fopr_CRS::H ( Field ,
const Field  
)

◆ mult()

void Fopr_CRS::mult ( Field ,
const Field  
)
inlinevirtual

multiplies fermion operator to a given field.

Reimplemented from AFopr< Field >.

Definition at line 90 of file fopr_CRS.h.

◆ mult_dag()

void Fopr_CRS::mult_dag ( Field ,
const Field  
)
inlinevirtual

hermitian conjugate of mult.

Reimplemented from AFopr< Field >.

Definition at line 104 of file fopr_CRS.h.

◆ set_config()

void Fopr_CRS::set_config ( Field )
inlinevirtual

sets the gauge configuration.

Implements AFopr< Field >.

Definition at line 73 of file fopr_CRS.h.

◆ set_matrix() [1/2]

void Fopr_CRS::set_matrix ( )
private

Definition at line 140 of file fopr_CRS.cpp.

◆ set_matrix() [2/2]

void Fopr_CRS::set_matrix ( const std::string  fname)
private

Definition at line 248 of file fopr_CRS.cpp.

◆ set_matrix_1row()

void Fopr_CRS::set_matrix_1row ( int &  Nnz,
std::vector< int > &  index_nz,
std::vector< double > &  elem_nz,
const Field v 
)
private

Definition at line 223 of file fopr_CRS.cpp.

◆ set_mode()

void Fopr_CRS::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< Field >.

Definition at line 46 of file fopr_CRS.cpp.

◆ set_parameters()

void Fopr_CRS::set_parameters ( const Parameters params)
virtual

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

Reimplemented from AFopr< Field >.

Definition at line 29 of file fopr_CRS.cpp.

◆ write_matrix()

void Fopr_CRS::write_matrix ( const std::string  fname)

Definition at line 293 of file fopr_CRS.cpp.

Member Data Documentation

◆ class_name

const std::string Fopr_CRS::class_name = "Fopr_CRS"
static

Definition at line 40 of file fopr_CRS.h.

◆ m_column_nz

std::vector<int> Fopr_CRS::m_column_nz
private

Definition at line 48 of file fopr_CRS.h.

◆ m_elem_nz

std::vector<double> Fopr_CRS::m_elem_nz
private

Definition at line 49 of file fopr_CRS.h.

◆ m_fopr

Fopr* Fopr_CRS::m_fopr
private

Definition at line 51 of file fopr_CRS.h.

◆ m_mode

std::string Fopr_CRS::m_mode
private

Definition at line 50 of file fopr_CRS.h.

◆ m_Nex

int Fopr_CRS::m_Nex
private

Definition at line 45 of file fopr_CRS.h.

◆ m_Nin

int Fopr_CRS::m_Nin
private

Definition at line 45 of file fopr_CRS.h.

◆ m_Nnz

int Fopr_CRS::m_Nnz
private

Definition at line 46 of file fopr_CRS.h.

◆ m_Nsize

int Fopr_CRS::m_Nsize
private

Definition at line 46 of file fopr_CRS.h.

◆ m_Nvol

int Fopr_CRS::m_Nvol
private

Definition at line 45 of file fopr_CRS.h.

◆ m_rowidx_nz

std::vector<int> Fopr_CRS::m_rowidx_nz
private

Definition at line 47 of file fopr_CRS.h.

◆ m_vl

Bridge::VerboseLevel Fopr_CRS::m_vl
private

Definition at line 43 of file fopr_CRS.h.


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