Block-Structured AMR Software Framework
AMReX_IntVect.H File Reference
#include <AMReX_Config.H>
#include <AMReX_INT.H>
#include <AMReX_SPACE.H>
#include <AMReX_Array.H>
#include <AMReX_Vector.H>
#include <AMReX_Dim3.H>
#include <AMReX_BLassert.H>
#include <AMReX_Extension.H>
#include <AMReX_GpuQualifiers.H>
#include <AMReX_Math.H>
#include <AMReX_Tuple.H>
#include <AMReX_TypeTraits.H>
#include <iosfwd>
#include <cstdlib>
#include <cmath>
#include <limits>
#include <climits>
#include <algorithm>

Go to the source code of this file.

Classes

class  amrex::IntVectND< dim >
 
struct  amrex::IntVectND< dim >::shift_hasher
 
struct  std::tuple_size< amrex::IntVectND< dim > >
 
struct  std::tuple_element< s, amrex::IntVectND< dim > >
 

Namespaces

 amrex
 
 amrex::detail
 

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::coarsen (int i, int ratio) noexcept
 
template<std::size_t dim>
AMREX_GPU_HOST_DEVICE amrex::IntVectND (const Array< int, dim > &) -> IntVectND< dim >
 
template<class... Args, std::enable_if_t< IsConvertible_v< int, Args... >, int > = 0>
AMREX_GPU_HOST_DEVICE amrex::IntVectND (int, int, Args...) -> IntVectND< sizeof...(Args)+2 >
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::operator+ (int s, const IntVectND< dim > &p) noexcept
 Returns p + s. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE IntVectND< dim > amrex::operator- (int s, const IntVectND< dim > &p) noexcept
 Returns -p + s. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::operator* (int s, const IntVectND< dim > &p) noexcept
 Returns p * s. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::min (const IntVectND< dim > &p1, const IntVectND< dim > &p2) noexcept
 Returns the IntVectND that is the component-wise minimum of two argument IntVectNDs. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::elemwiseMin (const IntVectND< dim > &p1, const IntVectND< dim > &p2) noexcept
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::max (const IntVectND< dim > &p1, const IntVectND< dim > &p2) noexcept
 Returns the IntVectND that is the component-wise maximum of two argument IntVectNDs. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::elemwiseMax (const IntVectND< dim > &p1, const IntVectND< dim > &p2) noexcept
 
template<int dim = AMREX_SPACEDIM>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::BASISV (int dir) noexcept
 Returns a basis vector in the given coordinate direction; eg. IntVectND<3> BASISV<3>(1) == (0,1,0). Note that the coordinate directions are zero based. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::scale (const IntVectND< dim > &p, int s) noexcept
 Returns a IntVectND obtained by multiplying each of the components of this IntVectND by s. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::reflect (const IntVectND< dim > &a, int ref_ix, int idir) noexcept
 Returns an IntVectND that is the reflection of input in the plane which passes through ref_ix and normal to the coordinate direction idir. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::diagShift (const IntVectND< dim > &p, int s) noexcept
 Returns IntVectND obtained by adding s to each of the components of this IntVectND. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::coarsen (const IntVectND< dim > &p, int s) noexcept
 Returns an IntVectND that is the component-wise integer projection of p by s. More...
 
template<int dim>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > amrex::coarsen (const IntVectND< dim > &p1, const IntVectND< dim > &p2) noexcept
 Returns an IntVectND which is the component-wise integer projection of IntVectND p1 by IntVectND p2. More...
 
template<int dim, std::enable_if_t<(1<=dim &&dim<=3), int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 amrex::refine (Dim3 const &coarse, IntVectND< dim > const &ratio) noexcept
 
template<int dim, std::enable_if_t<(1<=dim &&dim<=3), int > = 0>
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 amrex::coarsen (Dim3 const &fine, IntVectND< dim > const &ratio) noexcept
 
std::ostream & amrex::detail::int_vector_write (std::ostream &os, const int *iv, int dim)
 
std::istream & amrex::detail::int_vector_read (std::istream &is, int *iv, int dim)
 
template<int dim>
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE void amrex::detail::IntVectCat_imp (int *&dst, const IntVectND< dim > &src) noexcept
 
template<int dim>
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE void amrex::detail::IntVectSplit_imp2 (IntVectND< dim > &dst, const int *&src) noexcept
 
template<class T , std::size_t... Ns>
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINEamrex::detail::IntVectSplit_imp (T &retval, std::index_sequence< Ns... >, const int *src) noexcept
 
template<int... dims>
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE int amrex::detail::get_sum ()
 
template<int dim>
std::ostream & amrex::operator<< (std::ostream &os, const IntVectND< dim > &iv)
 
template<int dim>
std::istream & amrex::operator>> (std::istream &is, IntVectND< dim > &iv)
 
template<int d, int... dims>
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE IntVectND< detail::get_sum< d, dims... >)> amrex::IntVectCat (const IntVectND< d > &v, const IntVectND< dims > &...vects) noexcept
 Returns a IntVectND obtained by concatenating the input IntVectNDs. The dimension of the return value equals the sum of the dimensions of the inputted IntVectNDs. More...
 
template<int d, int... dims>
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE GpuTuple< IntVectND< d >, IntVectND< dims >... > amrex::IntVectSplit (const IntVectND< detail::get_sum< d, dims... >()> &v) noexcept
 Returns a tuple of IntVectND obtained by splitting the input IntVectND according to the dimensions specified by the template arguments. More...
 
template<int new_dim, int old_dim>
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE IntVectND< new_dim > amrex::IntVectShrink (const IntVectND< old_dim > &iv) noexcept
 Returns a new IntVectND of size new_dim and assigns the first new_dim values of iv to it. More...
 
template<int new_dim, int old_dim>
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE IntVectND< new_dim > amrex::IntVectExpand (const IntVectND< old_dim > &iv, int fill_extra=0) noexcept
 Returns a new IntVectND of size new_dim and assigns all values of iv to it and fill_extra to the remaining elements. More...
 
template<int new_dim, int old_dim>
AMREX_GPU_HOST_DEVICE constexpr AMREX_FORCE_INLINE IntVectND< new_dim > amrex::IntVectResize (const IntVectND< old_dim > &iv, int fill_extra=0) noexcept
 Returns a new IntVectND of size new_dim by either shrinking or expanding iv. More...