main interface class to lattices.
More...
#include <lattice.h>
|
bool | can_block (const CoordinateVector &factor) const |
| Test if lattice can be blocked by factor given in argument.
|
|
bool | is_base () const |
| lattice.is_base() is used to check if the current lattice is the original one, i.e. not a blocked one
|
|
const lattice_struct * | operator-> () const noexcept |
| lattice-> defines an operator with which detailed lattice_struct fields can be accessed.
|
|
bool | operator== (const Lattice &rhs) |
| Equality operator == is true if the two Lattices are the same, i.e. point to the same lattice.
|
|
lattice_struct * | ptr () const |
| get non-const pointer to lattice_struct (cf. operator ->)
|
|
const lattice_struct & | ref () const |
| get const ref to lattice_struct, lattice.ref(). is equivalent to lattice->
|
|
void | setup (const CoordinateVector &siz) |
| lattice.setup(CoordinateVector size) - set up the base lattice. Called at the beginning of the program. Can be called only once during the program run
|
|
int | size (Direction d) const |
| lattice.size() -> CoordinateVector or lattice.size(d) -> int returns the dimensions of the lattice, in latter case to direction d Can be used inside onsites()-loops
|
|
Lattice | switch_to (Lattice &lat) |
| With a valid Lattice, switch this lattice to be active.
|
|
Lattice | switch_to (lattice_struct *lat) |
| With a valid lattice_struct pointer, switch this lattice to be active.
|
|
Lattice | switch_to_base () |
| lattice.switch_to_base() switches the base lattice active (if not already)
|
|
Lattice | unblock () |
| Unblock lattice, returning to parent. Current lattice must be a blocked lattice.
|
|
int64_t | volume () const |
| lattice.volume() returns lattice volume Can be used inside onsites()-loops
|
|
main interface class to lattices.
Lightweight class, contains only pointer to lattice_struct so can be returned as such from functions.
- Examples
- /home/runner/work/HILA/HILA/libraries/plumbing/field.h.
Definition at line 396 of file lattice.h.
◆ can_block()
Test if lattice can be blocked by factor given in argument.
lattice.size() must be element-by-element divisible by factor
Example: lattice.can_block({2,2,2}) returns true if (3-dim) lattice dimensions are even
Definition at line 531 of file lattice.h.
◆ is_base()
bool Lattice::is_base |
( |
| ) |
const |
|
inline |
lattice.is_base() is used to check if the current lattice is the original one, i.e. not a blocked one
- Returns
- true if current lattice is the base lattice, otherwise false
Definition at line 605 of file lattice.h.
◆ operator->()
lattice-> defines an operator with which detailed lattice_struct fields can be accessed.
For example: lattice->mynode.min: CoordinateVector of the min-corner managed by this MPI rank lattice->mynode.size: CV of the local node dimensions.
For further info, check the class lattice_struct. This cannot be used within onsites(), copy the relevant field to local variable first.
Definition at line 463 of file lattice.h.
◆ operator==()
bool Lattice::operator== |
( |
const Lattice & |
rhs | ) |
|
|
inline |
Equality operator == is true if the two Lattices are the same, i.e. point to the same lattice.
- Parameters
-
Definition at line 492 of file lattice.h.
◆ ptr()
◆ switch_to()
With a valid Lattice, switch this lattice to be active.
useful e.g. in switching to lattice where field a belongs to: lattice.switch_to(a.mylattice());
Definition at line 517 of file lattice.h.
◆ switch_to_base()
Lattice Lattice::switch_to_base |
( |
| ) |
|
|
inline |
◆ unblock()
◆ volume()
int64_t Lattice::volume |
( |
| ) |
const |
|
inline |
lattice.volume() returns lattice volume Can be used inside onsites()-loops
- Returns
- lattice volume
Definition at line 424 of file lattice.h.
The documentation for this class was generated from the following file: