Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::BoxIndexerND< 1, UIntT > Struct Template Reference

Specialization for the 1D case where no fast-division table is needed. More...

#include <AMReX_Box.H>

Public Types

using UInt = UIntT
using Divmod

Public Member Functions

 BoxIndexerND (BoxND< 1 > const &box)
 Construct the 1D indexer; no fast divisors are needed because only one axis exists.
__host__ __device__ IntVectND< 1 > intVect (std::uint64_t icell) const
 Convert flattened point index icell to the 1D coordinate.
__host__ __device__ Dim3 operator() (std::uint64_t icell) const
 Return the coordinate padded to Dim3.
__host__ __device__ UInt numPts () const
 Return the number of points covered by the indexed box.

Public Attributes

UInt npts
IntVectND< 1 > lo
Divmod fdm [dim-1]

Detailed Description

template<typename UIntT>
struct amrex::BoxIndexerND< 1, UIntT >

Specialization for the 1D case where no fast-division table is needed.

Member Typedef Documentation

◆ Divmod

using amrex::BoxIndexerND< dim, UIntT >::Divmod

◆ UInt

template<typename UIntT>
using amrex::BoxIndexerND< 1, UIntT >::UInt = UIntT

Constructor & Destructor Documentation

◆ BoxIndexerND()

template<typename UIntT>
amrex::BoxIndexerND< 1, UIntT >::BoxIndexerND ( BoxND< 1 > const & box)
inline

Construct the 1D indexer; no fast divisors are needed because only one axis exists.

Parameters
boxBox that supplies the span.

Member Function Documentation

◆ intVect()

template<typename UIntT>
__host__ __device__ IntVectND< 1 > amrex::BoxIndexerND< 1, UIntT >::intVect ( std::uint64_t icell) const
inlinenodiscard

Convert flattened point index icell to the 1D coordinate.

Parameters
icellZero-based flattened point index.
Returns
Coordinate within the tracked box.

◆ numPts()

template<typename UIntT>
__host__ __device__ UInt amrex::BoxIndexerND< 1, UIntT >::numPts ( ) const
inlinenodiscard

Return the number of points covered by the indexed box.

Returns
Total number of points.

◆ operator()()

template<typename UIntT>
__host__ __device__ Dim3 amrex::BoxIndexerND< 1, UIntT >::operator() ( std::uint64_t icell) const
inlinenodiscard

Return the coordinate padded to Dim3.

Parameters
icellZero-based flattened point index.
Returns
Coordinate as Dim3.

Member Data Documentation

◆ fdm

Divmod amrex::BoxIndexerND< dim, UIntT >::fdm[dim-1]

◆ lo

template<typename UIntT>
IntVectND<1> amrex::BoxIndexerND< 1, UIntT >::lo

◆ npts

template<typename UIntT>
UInt amrex::BoxIndexerND< 1, UIntT >::npts

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