SUNphi  1.0
Grid.hpp File Reference

Defines hypercubic cartesian grids. More...

#include <array>
#include <vector>
#include <debug/Crash.hpp>
#include <ios/Logger.hpp>
#include <math/Arithmetic.hpp>
#include <metaprogramming/CRTP.hpp>
#include <utility/Bits.hpp>
#include <utility/Flags.hpp>
#include <utility/Position.hpp>

Go to the source code of this file.

Classes

class  SUNphi::GridHashable< T, NDims, Coord, Idx, Hashing >
 
class  SUNphi::GridHashable< T, NDims, Coord, Idx, true >
 
class  SUNphi::GridHashable< T, NDims, Coord, Idx, false >
 
class  SUNphi::GridShiftableBC< T, NDims, Coord, Idx, Shifting >
 
class  SUNphi::GridShiftableBC< T, NDims, Coord, Idx, true >
 
class  SUNphi::GridShiftableBC< T, NDims, Coord, Idx, false >
 
class  SUNphi::Grid< NDims, Coord, Idx, Flags >
 A grid of points spanning an hypercubic grid. More...
 

Macros

#define PROVIDE_COORDS_TYPES
 Provide the type needed to deal with grids. More...
 
#define GRID_DEBUG   true
 Flag to enable Grid debug.
 

Enumerations

enum  SUNphi::Orientation { BW =0, FW =1 }
 Value to identifiy orientations.
 
enum  SUNphi::GridFlag { SUNphi::GridFlag::HASHED, SUNphi::GridFlag::SHIFTED_BC, ALWAYS_WRAPPING }
 List of flags.
 

Functions

template<int NDims, typename Side >
 SUNphi::Grid (const Side(&sides)[NDims]) -> Grid< NDims, int >
 Deduction guide for bracket list.
 

Variables

constexpr int SUNphi::moveOffset [2]
 Offset to move BW or FW. More...
 
constexpr int SUNphi::GRID_DEFAULT_FLAGS
 Default parameters for grid. More...
 

Detailed Description

Defines hypercubic cartesian grids.

An hypercubic grid with number of dimensions fixed at compile time. Periodic boundary conditions are imposed at all faces and lexicographic indexing with first-neighbours connectivity is embedded. The coordinates of points and neighbors can be hashed, deciding at compile time.

Given the number of dimensions, the two orientations are provided, such that the 2*nDims neighbors are stored putting first all backwards, then forward directions.

Definition in file Grid.hpp.

Macro Definition Documentation

#define PROVIDE_COORDS_TYPES
Value:
\
typedef std::array<Coord,NDims> Coords; \ \
typedef std::array<Coord,2*NDims> Neigh; \ \
typedef Idx Vol; \ \
typedef Coord Side; \ \
typedef Coords Sides

Provide the type needed to deal with grids.

Definition at line 30 of file Grid.hpp.

Variable Documentation

constexpr int SUNphi::GRID_DEFAULT_FLAGS
Initial value:
=
combineFlags<GridFlag::HASHED>

Default parameters for grid.

Definition at line 61 of file Grid.hpp.

constexpr int SUNphi::moveOffset[2]
Initial value:
=
{-1,+1}

Offset to move BW or FW.

Definition at line 52 of file Grid.hpp.