Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Field Class Reference

Container of Field-type object. More...

#include <field.h>

Inheritance diagram for Field:
Field_F Field_F_1spinor Field_G Field_G_SF

Public Types

enum  complexness { COMPLEX, REAL }
 

Public Member Functions

 Field ()
 
 Field (const int Nin, const int Nvol, const int Nex, const complexness cmpl=COMPLEX)
 
void reset (const int Nin, const int Nvol, const int Nex, const complexness cmpl=COMPLEX)
 
int nin () const
 
int nex () const
 
int nvol () const
 
int ntot () const
 
int size () const
 
complexness field_complexness () const
 
double cmp (const int jin, const int site, const int jex) const
 
double cmp (const int i) const
 
double * ptr (const int i)
 
void set (const int jin, const int site, const int jex, double v)
 
void set (const int i, double v)
 
void add (const int jin, const int site, const int jex, double v)
 
void add (const int i, double v)
 
void setpart_ex (int ex, const Field &w, int exw)
 
void addpart_ex (int ex, const Field &w, int exw)
 
void addpart_ex (int ex, const Field &w, int exw, double prf)
 
double norm () const
 
double ddotc (const Field &x) const
 
double norm2 () const
 
void daxpy (double a, const Field &x)
 
void daxpy (dcomplex a, const Field &x)
 
void dscal (double a)
 
void dcopy (const Field &x)
 
void dcopy (double a, const Field &x)
 
void clear ()
 
void stat (double &Fave, double &Fmax, double &Fdev)
 determines the statistics of the field. average, maximum value, and deviation is determined over global lattice. On-site degree of freedom is sumed over in quadrature, not averaged. This function works only on single node. More...
 
void write_text (std::string)
 write field values to a text file. More...
 
void read_text (std::string)
 read field values from text file. Assumes field size is already defined, and if it is inconsistent with the field in the file, aborted. This function works only on single node. More...
 
Fieldoperator- ()
 
Fieldoperator= (const double &)
 
Fieldoperator+= (const Field &)
 
Fieldoperator-= (const Field &)
 
Fieldoperator*= (const double &)
 
Fieldoperator/= (const double &)
 
double operator* (const Field &rhs)
 

Protected Member Functions

int myindex (const int jin, const int site, const int jex) const
 

Protected Attributes

std::valarray< double > field
 
int m_Nvol
 
int m_Nin
 
int m_Nex
 
complexness m_complexness
 
int m_Ntot
 
Bridge::VerboseLevel m_vl
 

Detailed Description

Container of Field-type object.

This class defines field-type quantity which has three size parameters, Nin: on-site degree of freedom, Nvol: site d.o.f, Nex: extra d.o.f. The detailed structure of these degrees of freedom is not defined in this class but in subclasses. Expression template was implemented by J.Noaki. [28 Dec 2011 H.Matsufuru]

Definition at line 39 of file field.h.

Member Enumeration Documentation

Enumerator
COMPLEX 
REAL 

Definition at line 43 of file field.h.

Constructor & Destructor Documentation

Field::Field ( )
inline

Definition at line 61 of file field.h.

Field::Field ( const int  Nin,
const int  Nvol,
const int  Nex,
const complexness  cmpl = COMPLEX 
)
inline

Definition at line 65 of file field.h.

Member Function Documentation

void Field::add ( const int  jin,
const int  site,
const int  jex,
double  v 
)
inline

Definition at line 108 of file field.h.

void Field::add ( const int  i,
double  v 
)
inline

Definition at line 113 of file field.h.

void Field::addpart_ex ( int  ex,
const Field w,
int  exw 
)
inline

Definition at line 126 of file field.h.

void Field::addpart_ex ( int  ex,
const Field w,
int  exw,
double  prf 
)
inline

Definition at line 137 of file field.h.

void Field::clear ( )
inline

Definition at line 261 of file field.h.

double Field::cmp ( const int  jin,
const int  site,
const int  jex 
) const
inline

Definition at line 92 of file field.h.

double Field::cmp ( const int  i) const
inline

Definition at line 97 of file field.h.

void Field::daxpy ( double  a,
const Field x 
)
inline

Definition at line 195 of file field.h.

void Field::daxpy ( dcomplex  a,
const Field x 
)
inline

Definition at line 208 of file field.h.

void Field::dcopy ( const Field x)
inline

Definition at line 241 of file field.h.

void Field::dcopy ( double  a,
const Field x 
)
inline

Definition at line 248 of file field.h.

double Field::ddotc ( const Field x) const
inline

Definition at line 167 of file field.h.

void Field::dscal ( double  a)
inline

Definition at line 231 of file field.h.

complexness Field::field_complexness ( ) const
inline

Definition at line 90 of file field.h.

int Field::myindex ( const int  jin,
const int  site,
const int  jex 
) const
inlineprotected

Definition at line 54 of file field.h.

int Field::nex ( ) const
inline

Definition at line 86 of file field.h.

int Field::nin ( ) const
inline

Definition at line 85 of file field.h.

double Field::norm ( ) const
inline

Definition at line 149 of file field.h.

double Field::norm2 ( ) const
inline

Definition at line 183 of file field.h.

int Field::ntot ( ) const
inline

Definition at line 88 of file field.h.

int Field::nvol ( ) const
inline

Definition at line 87 of file field.h.

double Field::operator* ( const Field rhs)
inline

Definition at line 358 of file field.h.

Field & Field::operator*= ( const double &  rhs)
inline

Definition at line 344 of file field.h.

Field & Field::operator+= ( const Field rhs)
inline

Definition at line 330 of file field.h.

Field & Field::operator- ( )
inline

Definition at line 316 of file field.h.

Field & Field::operator-= ( const Field rhs)
inline

Definition at line 337 of file field.h.

Field & Field::operator/= ( const double &  rhs)
inline

Definition at line 351 of file field.h.

Field & Field::operator= ( const double &  r)
inline

Definition at line 323 of file field.h.

double* Field::ptr ( const int  i)
inline

Definition at line 99 of file field.h.

void Field::read_text ( std::string  )

read field values from text file. Assumes field size is already defined, and if it is inconsistent with the field in the file, aborted. This function works only on single node.

Definition at line 56 of file field.cpp.

void Field::reset ( const int  Nin,
const int  Nvol,
const int  Nex,
const complexness  cmpl = COMPLEX 
)
inline

Definition at line 74 of file field.h.

void Field::set ( const int  jin,
const int  site,
const int  jex,
double  v 
)
inline

Definition at line 101 of file field.h.

void Field::set ( const int  i,
double  v 
)
inline

Definition at line 106 of file field.h.

void Field::setpart_ex ( int  ex,
const Field w,
int  exw 
)
inline

Definition at line 115 of file field.h.

int Field::size ( ) const
inline

Definition at line 89 of file field.h.

void Field::stat ( double &  Fave,
double &  Fmax,
double &  Fdev 
)

determines the statistics of the field. average, maximum value, and deviation is determined over global lattice. On-site degree of freedom is sumed over in quadrature, not averaged. This function works only on single node.

Definition at line 97 of file field.cpp.

void Field::write_text ( std::string  )

write field values to a text file.

Definition at line 23 of file field.cpp.

Member Data Documentation

std::valarray<double> Field::field
protected

Definition at line 46 of file field.h.

complexness Field::m_complexness
protected

Definition at line 50 of file field.h.

int Field::m_Nex
protected

Definition at line 49 of file field.h.

int Field::m_Nin
protected

Definition at line 48 of file field.h.

int Field::m_Ntot
protected

Definition at line 52 of file field.h.

int Field::m_Nvol
protected

Definition at line 47 of file field.h.

Bridge::VerboseLevel Field::m_vl
protected

Definition at line 57 of file field.h.


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