mdp_site Class Reference

site object to loop on a lattice More...

#include <mdp_site.h>

List of all members.

Public Member Functions

 mdp_site ()
 value of the mdp_site in local coordinate
 mdp_site (const mdp_lattice &a)
void on (const mdp_lattice &a)
mdp_latticelattice ()
 returns by reference the lattice the site lives on
 mdp_site (mdp_int i, mdp_lattice *ptr2)
 mdp_site (const mdp_site &x)
mdp_site operator= (mdp_int i)
mdp_site operator= (mdp_site x)
int operator== (mdp_site x)
int operator!= (mdp_site x)
void start (int np=0)
void next ()
int is_in ()
int is_here ()
int parity ()
 returns the parity EVEN or ODD of the site
int is_in_boundary ()
mdp_int local_index ()
mdp_int global_index ()
 returns the global (unique) index of the site
void set_local (mdp_int idx2)
 sets the site by its local index (dangerous)
void set_global (mdp_int idx_gl)
 sets the site by its global index
mdp_site operator+ (int mu)
 returns the site shifted forward in direction mu=(0...ndim-1)
mdp_site operator- (int mu)
 returns the site shifted backwards in direction mu=(0...ndim-1)
mdp_site hop (int i, int mu)
mdp_site operator= (mdp_vector v)
 sets the site to the coordinates stored in vector v
mdp_site operator+ (mdp_vector v)
mdp_site operator- (mdp_vector v)
int operator() (int mu)
 returns mu coordinate of the site
void operator= (int *x)
void set (int x0, int x1=0, int x2=0, int x3=0, int x4=0, int x5=0, int x6=0, int x7=0, int x8=0, int x9=0)
int operator== (int *x)
int operator!= (int *x)
int is_equal (int x0, int x1=0, int x2=0, int x3=0, int x4=0, int x5=0, int x6=0, int x7=0, int x8=0, int x9=0)
 checks the site coordinates vs the coordinates passed as args

Public Attributes

mdp_int idx
 this points to the lattice for this field

Friends

mdp_int site2binary (mdp_site x)
int on_which_process (mdp_lattice &a, int x0, int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9)

Detailed Description

site object to loop on a lattice

Example:

///   int box[]={10,10,10};
///   mdp_lattice lattice(3,box);
///   mdp_site x(lattice);
///   forallsites(x) cout << x << endl;
///   if(on_which_process(lattice,1,1,1)==ME) {
///      x.set(1,1,1);
///      cout << lattice.random(x).plain() << endl;
///   }
/// 

Constructor & Destructor Documentation

mdp_site::mdp_site (  )  [inline]

value of the mdp_site in local coordinate

mdp_site::mdp_site ( const mdp_lattice a  )  [inline]

declares object of class mdp_site living on the lattice passed by reference

mdp_site::mdp_site ( mdp_int  i,
mdp_lattice ptr2 
) [inline]
mdp_site::mdp_site ( const mdp_site x  )  [inline]

Member Function Documentation

mdp_int mdp_site::global_index (  )  [inline]

returns the global (unique) index of the site

mdp_site mdp_site::hop ( int  i,
int  mu 
) [inline]

returns a site shifted i position (backwards if i<0 or forward if i>0) in direction mu=(0...mdim-1)

int mdp_site::is_equal ( int  x0,
int  x1 = 0,
int  x2 = 0,
int  x3 = 0,
int  x4 = 0,
int  x5 = 0,
int  x6 = 0,
int  x7 = 0,
int  x8 = 0,
int  x9 = 0 
) [inline]

checks the site coordinates vs the coordinates passed as args

int mdp_site::is_here (  )  [inline]

checks if the site is inside the portion of the lattice stored by the current process or if the site is in a local copy of a remote site

int mdp_site::is_in (  )  [inline]

checks if the site is inside the portion of the lattice stored by the current process

int mdp_site::is_in_boundary (  )  [inline]

true if the site is stored locally as a copy of a site local in another process

mdp_lattice& mdp_site::lattice (  )  [inline]

returns by reference the lattice the site lives on

mdp_int mdp_site::local_index (  )  [inline]

returns the local index of the site local index is assigned by the process to the local sites and copies of remote sites. local index is not unique thoughout the lattice.

void mdp_site::next (  )  [inline]
void mdp_site::on ( const mdp_lattice a  )  [inline]
int mdp_site::operator!= ( int *  x  )  [inline]
int mdp_site::operator!= ( mdp_site  x  )  [inline]
int mdp_site::operator() ( int  mu  )  [inline]

returns mu coordinate of the site

mdp_site mdp_site::operator+ ( mdp_vector  v  )  [inline]

retruns a site similar to the present but each coordinates mu of the site shifted according to v[mu]

mdp_site mdp_site::operator+ ( int  mu  )  [inline]

returns the site shifted forward in direction mu=(0...ndim-1)

mdp_site mdp_site::operator- ( mdp_vector  v  )  [inline]

retruns a site similar to the present but each coordinates mu of the site shifted according to -v[mu]

mdp_site mdp_site::operator- ( int  mu  )  [inline]

returns the site shifted backwards in direction mu=(0...ndim-1)

void mdp_site::operator= ( int *  x  )  [inline]
mdp_site mdp_site::operator= ( mdp_vector  v  )  [inline]

sets the site to the coordinates stored in vector v

mdp_site mdp_site::operator= ( mdp_site  x  )  [inline]
mdp_site mdp_site::operator= ( mdp_int  i  )  [inline]
int mdp_site::operator== ( int *  x  )  [inline]
int mdp_site::operator== ( mdp_site  x  )  [inline]
int mdp_site::parity (  )  [inline]

returns the parity EVEN or ODD of the site

void mdp_site::set ( int  x0,
int  x1 = 0,
int  x2 = 0,
int  x3 = 0,
int  x4 = 0,
int  x5 = 0,
int  x6 = 0,
int  x7 = 0,
int  x8 = 0,
int  x9 = 0 
) [inline]

sets the site to a the location spacified by the coordinates and assumes the site is local (or at least a copy)

See also:
on_which_process()
void mdp_site::set_global ( mdp_int  idx_gl  )  [inline]

sets the site by its global index

void mdp_site::set_local ( mdp_int  idx2  )  [inline]

sets the site by its local index (dangerous)

void mdp_site::start ( int  np = 0  )  [inline]

Friends And Related Function Documentation

int on_which_process ( mdp_lattice a,
int  x0,
int  x1,
int  x2,
int  x3,
int  x4,
int  x5,
int  x6,
int  x7,
int  x8,
int  x9 
) [friend]

checks which process of the lattice a stores locally the site of coordinates x0,x1,x2,...,x9 to be used before calling mdp_site::set()

checks which process of the lattice a stores locally the site of coordinates x0,x1,x2,...,x9 to be used before calling mdp_site::set() (note: prototyping of friend functions is required by some compilers)

mdp_int site2binary ( mdp_site  x  )  [friend]

converts a site into a binary number to be used only if the site is a vertex of an hypercube centered at the origin. this is used to make staggered mesons


Member Data Documentation

this points to the lattice for this field


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines

Generated on Wed Dec 23 14:03:15 2009 for fermiqcd by  doxygen 1.6.1