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

mdp_lattice Class Reference

distributed lattice object More...

#include <mdp_lattice.h>

List of all members.

Public Member Functions

long global_coordinate (int *x)
void global_coordinate (long global_idx, int *x)
int compute_parity (int *x)
 mdp_lattice (int ndim_, int nx_[], int(*where_)(int *, int, int *)=default_partitioning0, void(*neighbour_)(int, int *, int *, int *, int, int *)=torus_topology, long random_seed_=0, int next_next_=1, bool local_random_=true)
 mdp_lattice (int ndim_, int ndir_, int nx_[], int(*where_)(int *, int, int *)=default_partitioning0, void(*neighbour_)(int, int *, int *, int *, int, int *)=torus_topology, long random_seed_=0, int next_next_=1, bool local_random_=true)
 for weird stuff
void allocate_lattice (int ndim_, int nx_[], int(*where_)(int *, int, int *)=default_partitioning0, void(*neighbour_)(int, int *, int *, int *, int, int *)=torus_topology, long random_seed_=0, int next_next_=1, bool local_random_=true)
void allocate_lattice (int ndim_, int ndir_, int nx_[], int(*where_)(int *, int, int *)=default_partitioning0, void(*neighbour_)(int, int *, int *, int *, int, int *)=torus_topology, long random_seed_=0, int next_next_=1, bool local_random_=true)
 for weird stuff
void deallocate_memory ()
 dynamically deallocate a lattice
void initialize_random (long random_seed_=0)
mdp_prngrandom (mdp_site)
int n_dimensions () const
 number of dimensions of the lattice (deprecated_
int n_directions () const
 number of directions one can move on the lattice; usually same as ndim
long size () const
 number of sites of the lattice
long size (const int mu) const
 size of the lattice in direction mu
long local_volume () const
 number of lattice sites stored locally by current process
long global_volume () const
 total lattice volume (deprecated)
long move_up (const long idx, const int mu) const
long move_down (const long idx, const int mu) const
long local (long idx) const
long global (long idx) const
int site_parity (const long idx) const
long start_index (const int process, int p=EVENODD) const
long stop_index (const int process, int p=EVENODD) const

Public Attributes

int ndim
int ndir
int next_next
int * nx
long nvol
long nvol_gl
long nvol_in
long * gl
long * lg
FILE * lg_file
long ** up
long ** dw
int ** co
int * wh
int * parity
long start [_NprocMax_][2]
long stop [_NprocMax_][2]
long len_to_send [_NprocMax_][2]
long * to_send [_NprocMax_]
bool local_random_generator
int(* where )(int *, int, int *)
void(* neighbour )(int, int *, int *, int *, int, int *)


Detailed Description

distributed lattice object

Example:

       int box[]={3,3,3};
       int seed=0, border_width=1;
       mdp_lattice lattice(3,box,default_partitioning0,
                           torus_topology,seed,border_width);
       mdp_site x(lattice);
       forallsites(x)
         cout << lattice.random(x).plain() << endl;
    


Constructor & Destructor Documentation

mdp_lattice::mdp_lattice int  ndim_,
int  nx_[],
int(*)(int *, int, int *)  where_ = default_partitioning0,
void(*)(int, int *, int *, int *, int, int *)  neighbour_ = torus_topology,
long  random_seed_ = 0,
int  next_next_ = 1,
bool  local_random_ = true
[inline]
 

declares a lattice object

Parameters:
ndim_ dimensions of the lattice
nx_ size of the lattice
where pointer to a partitioning function neighbour_ pointer to a topology function.
random_seed_ seed to be used by the parallel prng
next_next_ size of the buffer between neighbour processes
local_random_ true is local random generator is required


Member Function Documentation

void mdp_lattice::allocate_lattice int  ndim_,
int  nx_[],
int(*)(int *, int, int *)  where_ = default_partitioning0,
void(*)(int, int *, int *, int *, int, int *)  neighbour_ = torus_topology,
long  random_seed_ = 0,
int  next_next_ = 1,
bool  local_random_ = true
[inline]
 

reallocate a lattice dynamically

Parameters:
ndim_ dimensions of the lattice
nx_ size of the lattice
where pointer to a partitioning function neighbour_ pointer to a topology function.
random_seed_ seed to be used by the parallel prng
next_next_ size of the buffer between neighbour processes
local_random_ true is local random generator is required


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