core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::amr::BlockOctreeView< Dim, Bits > Struct Template Reference

Device mirror of a BlockOctree's leaf arrays + device-callable queries. More...

#include <block_octree_view.hpp>

Public Types

using Host = BlockOctree< Dim, Bits >
 
using M = typename Host::M
 
using Code = typename Host::Code
 
using Coord = typename Host::Coord
 

Public Member Functions

void upload (const Host &t)
 (Re)upload the host octree's current leaf set to the device.
 
Index numLeaves () const
 
Index locate (Code p) const
 Leaf containing Morton code p, or -1. Callable in a device kernel.
 
Index faceNeighbor (Index i, int axis, int dir) const
 Leaf across leaf i's face on axis in direction dir (±1), or -1 if it lies outside the block.
 

Public Attributes

View< Codecodes
 
View< std::uint8_t > levels
 
Index n = 0
 

Detailed Description

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
struct peclet::core::amr::BlockOctreeView< Dim, Bits >

Device mirror of a BlockOctree's leaf arrays + device-callable queries.

Definition at line 29 of file block_octree_view.hpp.

Member Typedef Documentation

◆ Host

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::BlockOctreeView< Dim, Bits >::Host = BlockOctree<Dim, Bits>

Definition at line 30 of file block_octree_view.hpp.

◆ M

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::BlockOctreeView< Dim, Bits >::M = typename Host::M

Definition at line 31 of file block_octree_view.hpp.

◆ Code

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::BlockOctreeView< Dim, Bits >::Code = typename Host::Code

Definition at line 32 of file block_octree_view.hpp.

◆ Coord

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::BlockOctreeView< Dim, Bits >::Coord = typename Host::Coord

Definition at line 33 of file block_octree_view.hpp.

Member Function Documentation

◆ upload()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
void peclet::core::amr::BlockOctreeView< Dim, Bits >::upload ( const Host t)
inline

◆ numLeaves()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Index peclet::core::amr::BlockOctreeView< Dim, Bits >::numLeaves ( ) const
inline

◆ locate()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Index peclet::core::amr::BlockOctreeView< Dim, Bits >::locate ( Code  p) const
inline

◆ faceNeighbor()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Index peclet::core::amr::BlockOctreeView< Dim, Bits >::faceNeighbor ( Index  i,
int  axis,
int  dir 
) const
inline

Leaf across leaf i's face on axis in direction dir (±1), or -1 if it lies outside the block.

Same arithmetic as BlockOctree::faceNeighbor.

Definition at line 55 of file block_octree_view.hpp.

References peclet::core::amr::BlockOctreeView< Dim, Bits >::codes, peclet::core::amr::BlockOctreeView< Dim, Bits >::levels, and peclet::core::amr::BlockOctreeView< Dim, Bits >::locate().

Member Data Documentation

◆ codes

◆ levels

◆ n


The documentation for this struct was generated from the following file: