#include <mdp_lattice.h>
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_prng & | random (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 *) |
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;
|
||||||||||||||||||||||||||||||||
|
declares a lattice object
|
|
||||||||||||||||||||||||||||||||
|
reallocate a lattice dynamically
|
1.4.1