![]() |
A parallel C++ Library for Simulations in the Heisenberg Model
|
A class storing spin values as a grid and certain meta information. More...
#include <grid.h>
Public Member Functions | |
| Grid ()=default | |
| Grid (const short int spatialDimensions, const dim3 gridSize) | |
| constructs a grid and allocates memory More... | |
| void | calcNeighbourTable () |
| generates a table of the neighbouring points of each spin and stores it More... | |
| void | setGridSize (const dim3 gridSize) |
| sets grid size nad resizes grid More... | |
| dim3 | getGridSize () const |
| thrust::host_vector< T > | getGridData () const |
| void | setGridData (const thrust::host_vector< T > &gridData) |
| thrust::host_vector< NB > | getNeighbourTable () const |
| void | setNeighbourTable (const thrust::host_vector< NB > &neighbourTable) |
| T | getSpin (const dim3 index) const |
| void | setSpin (const dim3 index, const T spin) |
| NB | getNeighbours (const dim3 index) const |
| short int | getDim () const |
| void | setDim (const short int dim) |
| void | hotStart () |
| initializes all spins randomly between 0 and 2*pi More... | |
| void | coldStart () |
| initializes all spins as up, i.e. mGrid.x[...] = 0.5*pi and mGrid.y[...] = 0 More... | |
| herr_t | saveGrid (const std::string path) |
| saves grid as hdf5 file More... | |
Private Attributes | |
| dim3 | mGridSize |
| copies grid and table to device More... | |
| short int | mDim |
| thrust::host_vector< T > | mGridData |
| thrust::host_vector< NB > | mNeighbourTable |
A class storing spin values as a grid and certain meta information.
| void HB::Grid< T >::calcNeighbourTable | ( | ) |
generates a table of the neighbouring points of each spin and stores it
| void HB::Grid< T >::coldStart | ( | ) |
initializes all spins as up, i.e. mGrid.x[...] = 0.5*pi and mGrid.y[...] = 0
|
inline |
|
inline |
|
inline |
|
inline |
| void HB::Grid< T >::hotStart | ( | ) |
initializes all spins randomly between 0 and 2*pi
| herr_t HB::Grid< T >::saveGrid | ( | const std::string | path | ) |
saves grid as hdf5 file
| path | Path to file |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |