su2hmc
|
Header for routines related to lattice sites. More...
Go to the source code of this file.
Functions | |
int | Addrc (unsigned int *iu, unsigned int *id) |
Loads the addresses required during the update. | |
int | ia (int x, int y, int z, int t) |
Described as a 21st Century address calculator, it gets the memory address of an array entry. | |
int | Check_addr (unsigned int *table, int lns, int lnt, int imin, int imax) |
int | Index2lcoord (int index, int *coord) |
Converts the index of a point in memory to the equivalent point in the 4 dimensional array, where the time index is the last coordinate in the array. | |
int | Index2gcoord (int index, int *coord) |
Converts the index of a point in memory to the equivalent point in the 4 dimensional array, where the time index is the last coordinate in the array. | |
int | Coord2lindex (int ix, int iy, int iz, int it) |
Converts the coordinates of a local lattice point to its index in the computer memory. | |
int | Coord2gindex (int ix, int iy, int iz, int it) |
Converts the coordinates of a global lattice point to its index in the computer memory. | |
int | Testlcoord (int cap) |
Tests if the local coordinate transformation functions are working. | |
int | Testgcoord (int cap) |
This is completely new and missing from the original code. | |
Variables | |
unsigned int * | hu |
Up halo indices. | |
unsigned int * | hd |
Down halo indices. | |
unsigned int * | h1u |
Up halo starting element. | |
unsigned int * | h1d |
Down halo starting element. | |
unsigned int * | halosize |
Array containing the size of the halo in each direction. | |
Header for routines related to lattice sites.
Definition in file coord.h.
int Addrc | ( | unsigned int * | iu, |
unsigned int * | id ) |
Loads the addresses required during the update.
iu | Upper halo indices |
id | Lower halo indices |
Definition at line 16 of file coord.c.
References AVX, h1d, h1u, halo, halosize, halot, halox, haloy, haloz, hd, hu, ia(), ksize, ksizet, ksizex, ksizey, ksizez, kvol, and ndim.
int Check_addr | ( | unsigned int * | table, |
int | lns, | ||
int | lnt, | ||
int | imin, | ||
int | imax ) |
Checks that the addresses are within bounds before an update
table | Pointer to the table in question |
lns | Size of each spacial dimension |
lnt | Size of the time dimension |
imin | Lower bound for element of the table |
imax | Upper bound for an element of the table |
Definition at line 334 of file coord.c.
References ndim.
|
inline |
Converts the coordinates of a global lattice point to its index in the computer memory.
This is a rather nuanced function, as C and Fortran are rather different in how they store arrays. C starts with index 0 and Fortran (by default) starts with index 1
Also C and Fortran store data in the opposite memory order so be careful when calling this function!
ix,iy,iz,it | Index in each direction |
int index: The position of the point
Definition at line 469 of file coord.c.
|
inline |
Converts the coordinates of a local lattice point to its index in the computer memory.
This is a rather nuanced function, as C and Fortran are rather different in how they store arrays. C starts with index 0 and Fortran (by default) starts with index 1
Also C and Fortran store data in the opposite memory order so be careful when calling this function!
ix,iy,iz,it | Index in each direction |
int index: The position of the point
Definition at line 443 of file coord.c.
|
inline |
Described as a 21st Century address calculator, it gets the memory address of an array entry.
x,y,z,t | The coordinates |
Definition at line 307 of file coord.c.
References ksizet, ksizex, ksizey, and ksizez.
|
inline |
Converts the index of a point in memory to the equivalent point in the 4 dimensional array, where the time index is the last coordinate in the array.
This is a rather nuanced function, as C and Fortran are rather different in how they store arrays. C starts with index 0 and Fortran (by default) starts with index 1
Also C and Fortran store data in the opposite memory order so be careful when calling this function!
index | The index of the point as stored linearly in computer memory |
coord | The 4-array for the coordinates. The first three spots are for the time index. |
Definition at line 406 of file coord.c.
|
inline |
Converts the index of a point in memory to the equivalent point in the 4 dimensional array, where the time index is the last coordinate in the array.
This is a rather nuanced function, as C and Fortran are rather different in how they store arrays. C starts with index 0 and Fortran (by default) starts with index 1
Also C and Fortran store data in the opposite memory order so be careful when calling this function!
index | The index of the point as stored linearly in computer memory |
coord | The 4-array for the coordinates. The first three spots are for the time index. |
Definition at line 369 of file coord.c.
References ksizet, ksizey, and ksizez.
int Testgcoord | ( | int | cap | ) |
This is completely new and missing from the original code.
We test the coordinate conversion functions by doing the following
The code is basically the same as the previous function with different magic numbers.
cap | The max value the index can take on. Should be the size of our array |
Definition at line 537 of file coord.c.
References Index2gcoord().
int Testlcoord | ( | int | cap | ) |
Tests if the local coordinate transformation functions are working.
Going to expand a little on the original here and do the following
cap | The max value the index can take on. Should be the size of the array |
Definition at line 495 of file coord.c.
References Index2lcoord().
|
extern |