Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
PeriodicGrid Class Reference

Points on a grid of spacing h. A point within the tolerance of a query lies in one of the 3^N_DIM grid cells around the query's. More...

#include <periodic.h>

Public Types

using Point = std::array< rtype, N_DIM >
 
using Cell = std::array< int64_t, N_DIM >
 

Public Member Functions

 PeriodicGrid (rtype spacing)
 
Cell cell_of (const Point &x) const
 
void insert (uint32_t id, const Point &x)
 
uint32_t find (const Point &y, uint32_t &match) const
 Number of points within the tolerance of y; match is the last one's id.
 

Static Public Member Functions

static Cell neighbor (const Cell &c, int m)
 Neighbor m of cell c, m in [0, N_NEIGHBORS) (c itself included).
 

Static Public Attributes

static constexpr int N_NEIGHBORS = N_DIM == 2 ? 9 : 27
 

Detailed Description

Points on a grid of spacing h. A point within the tolerance of a query lies in one of the 3^N_DIM grid cells around the query's.

Member Typedef Documentation

◆ Cell

◆ Point

Constructor & Destructor Documentation

◆ PeriodicGrid()

PeriodicGrid::PeriodicGrid ( rtype  spacing)
inlineexplicit

Member Function Documentation

◆ cell_of()

PeriodicGrid::Cell PeriodicGrid::cell_of ( const Point &  x) const

◆ find()

uint32_t PeriodicGrid::find ( const Point &  y,
uint32_t &  match 
) const

Number of points within the tolerance of y; match is the last one's id.

◆ insert()

void PeriodicGrid::insert ( uint32_t  id,
const Point &  x 
)
inline

◆ neighbor()

PeriodicGrid::Cell PeriodicGrid::neighbor ( const Cell &  c,
int  m 
)
static

Neighbor m of cell c, m in [0, N_NEIGHBORS) (c itself included).

Member Data Documentation

◆ N_NEIGHBORS

constexpr int PeriodicGrid::N_NEIGHBORS = N_DIM == 2 ? 9 : 27
staticconstexpr

The documentation for this class was generated from the following files: