core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
types.hpp File Reference
#include <array>
#include <cstdint>

Go to the source code of this file.

Classes

struct  peclet::core::Range< Label >
 Half-open range [begin, end) carrying a label (e.g. a block id). Ported from pbs::IndxRange. More...
 
struct  peclet::core::NestedLoop< Dim, Axis >
 Compile-time-unrolled nested loop over [bgn, end) in row-major (axis 0 fastest) order. More...
 
struct  peclet::core::NestedLoop< Dim, 0 >
 

Namespaces

namespace  peclet
 
namespace  peclet::core
 

Typedefs

using peclet::core::Index = std::int64_t
 Signed index type for grids and particles (supersedes block_decomposer's long int IndxT).
 
using peclet::core::Real = double
 Default host floating type. Device kernels may use float; conversions happen at the boundary.
 
template<int Dim>
using peclet::core::IVec = std::array< Index, Dim >
 Multi-dimensional integer index / coordinate (x-fastest order by convention).
 
template<int Dim>
using peclet::core::Vec = std::array< Real, Dim >
 Multi-dimensional real vector.
 

Functions

Index peclet::core::wrap (Index x, Index n)
 Periodic wrap of a coordinate into [0, n): wrap(x, n) = (x % n + n) % n.
 
template<int Dim, typename Func >
void peclet::core::forEachInBox (const IVec< Dim > &bgn, const IVec< Dim > &end, Func &&func)
 Iterate the box [bgn, end) calling func(const IVec<Dim>&).