Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

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 (long i, mdp_lattice *ptr2)
 mdp_site (const mdp_site &x)
mdp_site operator= (long 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 ()
long local_index ()
long global_index ()
 returns the global (unique) index of the site
void set_local (long idx2)
 sets the site by its local index (dangerous)
void set_global (long 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

long idx
 this points to the lattice for this field

Friends

long site2binary (mdp_site x)
int on_which_process (mdp_lattice &a, int x0=0, 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)


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 const mdp_lattice a  )  [inline]
 

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


Member Function Documentation

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_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

long 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.

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- mdp_vector  v  )  [inline]
 

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

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()


Friends And Related Function Documentation

int on_which_process mdp_lattice a,
int  x0 = 0,
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
[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()

long 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


The documentation for this class was generated from the following file:
Generated on Sun Feb 27 15:12:26 2005 by  doxygen 1.4.1