Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Fopr_CRS Class Reference

Fermion operator with CRS matrix format. More...

#include <fopr_CRS.h>

Inheritance diagram for Fopr_CRS:
Fopr

Public Member Functions

 Fopr_CRS (Fopr *fopr)
 
 Fopr_CRS (unique_ptr< Fopr > &fopr)
 
 Fopr_CRS (const std::string fname)
 
void set_parameters (const Parameters &)
 
void write_matrix (const std::string)
 
void set_config (Field *U)
 setting pointer to the gauge configuration. More...
 
void set_config (unique_ptr< Field_G > &U)
 
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
 only for Fopr_Overlap More...
 
void mult (Field &v, const Field &f)
 multiplies fermion operator to a given field (2nd argument) More...
 
void mult_dag (Field &v, const Field &f)
 hermitian conjugate of mult(Field&, const Field&). 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 for which the fermion operator is defined. More...
 
int field_nin ()
 returns the on-site d.o.f. for which the fermion operator is defined. More...
 
int field_nex ()
 returns the external d.o.f. for which the fermion operator is defined. More...
 
- Public Member Functions inherited from Fopr
 Fopr ()
 
virtual ~Fopr ()
 
void set_parameter_verboselevel (const Bridge::VerboseLevel vl)
 
virtual void mult_gm5 (Field &, const Field &)
 gamma_5 multiplication. [31 Mar 2017 H.Matsufuru] More...
 
virtual void mult (Field &, const Field &, const std::string mode)
 execute mult with specified mode (unchanging internal mode). [23 May 2016 H.Matsufuru]. More...
 
virtual void mult_dag (Field &, const Field &, const std::string mode)
 execute mult_dag with specified mode (unchanging internal mode). [23 May 2016 H.Matsufuru]. More...
 
virtual void mult_up (const int mu, Field &, const Field &)
 nearest neighbor hopping term: temporary entry [H.Matsufuru] More...
 
virtual void mult_dn (const int mu, Field &, const Field &)
 
virtual double flop_count ()
 returns the flop in giga unit More...
 
virtual double flop_count (const std::string mode)
 returns the flop in giga unit for a specified mode. [23 May 2016 H.Matsufuru] 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

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

- Protected Attributes inherited from Fopr
Bridge::VerboseLevel m_vl
 

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::Fopr_CRS ( Fopr fopr)
inline

Definition at line 53 of file fopr_CRS.h.

Fopr_CRS::Fopr_CRS ( unique_ptr< Fopr > &  fopr)
inline

Definition at line 59 of file fopr_CRS.h.

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

Definition at line 65 of file fopr_CRS.h.

Member Function Documentation

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

Definition at line 46 of file fopr_CRS.cpp.

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

Definition at line 83 of file fopr_CRS.cpp.

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

Definition at line 36 of file fopr_CRS.cpp.

int Fopr_CRS::field_nex ( )
inlinevirtual

returns the external d.o.f. for which the fermion operator is defined.

Implements Fopr.

Definition at line 140 of file fopr_CRS.h.

int Fopr_CRS::field_nin ( )
inlinevirtual

returns the on-site d.o.f. for which the fermion operator is defined.

Implements Fopr.

Definition at line 139 of file fopr_CRS.h.

int Fopr_CRS::field_nvol ( )
inlinevirtual

returns the volume for which the fermion operator is defined.

Implements Fopr.

Definition at line 138 of file fopr_CRS.h.

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

only for Fopr_Overlap

Reimplemented from Fopr.

Definition at line 100 of file fopr_CRS.h.

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

multiplies fermion operator to a given field (2nd argument)

Implements Fopr.

Definition at line 105 of file fopr_CRS.h.

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

hermitian conjugate of mult(Field&, const Field&).

Reimplemented from Fopr.

Definition at line 119 of file fopr_CRS.h.

void Fopr_CRS::set_config ( Field )
inlinevirtual

setting pointer to the gauge configuration.

Implements Fopr.

Definition at line 75 of file fopr_CRS.h.

void Fopr_CRS::set_config ( unique_ptr< Field_G > &  U)
inlinevirtual

Implements Fopr.

Definition at line 85 of file fopr_CRS.h.

void Fopr_CRS::set_matrix ( )
private

Definition at line 118 of file fopr_CRS.cpp.

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

Definition at line 226 of file fopr_CRS.cpp.

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 201 of file fopr_CRS.cpp.

void Fopr_CRS::set_mode ( const std::string  mode)
inlinevirtual

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

Reimplemented from Fopr.

Definition at line 95 of file fopr_CRS.h.

void Fopr_CRS::set_parameters ( const Parameters params)
virtual

Implements Fopr.

Definition at line 27 of file fopr_CRS.cpp.

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

Definition at line 271 of file fopr_CRS.cpp.

Member Data Documentation

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

Definition at line 40 of file fopr_CRS.h.

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

Definition at line 46 of file fopr_CRS.h.

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

Definition at line 47 of file fopr_CRS.h.

Fopr* Fopr_CRS::m_fopr
private

Definition at line 49 of file fopr_CRS.h.

std::string Fopr_CRS::m_mode
private

Definition at line 48 of file fopr_CRS.h.

int Fopr_CRS::m_Nex
private

Definition at line 43 of file fopr_CRS.h.

int Fopr_CRS::m_Nin
private

Definition at line 43 of file fopr_CRS.h.

int Fopr_CRS::m_Nnz
private

Definition at line 44 of file fopr_CRS.h.

int Fopr_CRS::m_Nsize
private

Definition at line 44 of file fopr_CRS.h.

int Fopr_CRS::m_Nvol
private

Definition at line 43 of file fopr_CRS.h.

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

Definition at line 45 of file fopr_CRS.h.


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