DDC 0.0.0

a discrete domain computation library

ddc Namespace Reference

The top-level namespace of DDC. More...

Namespaces

namespace  reducer
 

Classes

class  AlignedAllocator
 
struct  cartesian_prod
 
struct  cartesian_prod< ddc::DiscreteDomain< DDim1... >, ddc::DiscreteDomain< DDim2... > >
 
struct  cartesian_prod< DDom >
 
struct  cartesian_prod< DDom1, DDom2, Tail... >
 
class  Chunk
 
class  Chunk< ElementType, DiscreteDomain< DDims... >, Allocator >
 
struct  chunk_traits
 
class  ChunkCommon
 
class  ChunkCommon< ElementType, DiscreteDomain< DDims... >, LayoutStridedPolicy >
 
class  ChunkSpan
 
class  ChunkSpan< ElementType, DiscreteDomain< DDims... >, LayoutStridedPolicy, MemorySpace >
 
struct  ConstantExtrapolationRule
 
struct  ConstantExtrapolationRule< DimI >
 A functor for describing a spline boundary value by a constant extrapolation for 1D evaluator. More...
 
struct  ConstantExtrapolationRule< DimI, DimNI >
 A functor for describing a spline boundary value by a constant extrapolation for 2D evaluator. More...
 
struct  coordinate_of
 
struct  Deriv
 A templated struct representing a discrete dimension storing the derivatives of a function along a continuous dimension CDim. More...
 
class  DiscreteDomain
 
class  DiscreteDomain<>
 
struct  DiscreteDomainIterator
 
class  DiscreteElement
 A DiscreteElement identifies an element of the discrete dimension. More...
 
class  DiscreteVector
 A DiscreteVector is a vector in the discrete dimension. More...
 
struct  Fourier
 A templated tag representing a continuous dimension in the Fourier space associated to the original continuous dimension. More...
 
class  GrevilleInterpolationPoints
 A class which provides helper functions to initialise the Greville points from a B-Spline definition. More...
 
struct  is_discrete_domain
 
struct  is_discrete_domain< DiscreteDomain< Tags... > >
 
struct  is_discrete_element
 
struct  is_discrete_element< DiscreteElement< Tags... > >
 
struct  is_discrete_vector
 
struct  is_discrete_vector< DiscreteVector< Tags... > >
 
struct  is_non_uniform_bsplines
 
struct  is_non_uniform_point_sampling
 
struct  is_periodic_sampling
 
struct  is_uniform_bsplines
 
struct  is_uniform_point_sampling
 
struct  KnotDiscreteDimension
 If the type DDim is a B-spline, defines type to the discrete dimension of the associated knots. More...
 
class  KnotsAsInterpolationPoints
 Helper class for the initialisation of the mesh of interpolation points. More...
 
class  KokkosAllocator
 
struct  kwArgs_fft
 A structure embedding the configuration of the exposed FFT function with the type of normalization. More...
 
class  NonUniformBSplines
 The type of a non-uniform 1D spline basis (B-spline). More...
 
struct  NonUniformBsplinesKnots
 
class  NonUniformPointSampling
 NonUniformPointSampling models a non-uniform discretization of the CDim segment $[a, b]$. More...
 
struct  NullExtrapolationRule
 A functor describing a null extrapolation boundary value for 1D spline evaluator. More...
 
class  PdiEvent
 
struct  PeriodicExtrapolationRule
 
class  PeriodicSampling
 PeriodicSampling models a periodic discretization of the provided continuous dimension. More...
 
class  ScopeGuard
 
class  SplineBuilder
 A class for creating a spline approximation of a function. More...
 
class  SplineBuilder2D
 A class for creating a 2D spline approximation of a function. More...
 
class  SplineEvaluator
 A class to evaluate, differentiate or integrate a spline function. More...
 
class  SplineEvaluator2D
 A class to evaluate, differentiate or integrate a 2D spline function. More...
 
class  UniformBSplines
 The type of a uniform 1D spline basis (B-spline). More...
 
struct  UniformBsplinesKnots
 
class  UniformPointSampling
 UniformPointSampling models a uniform discretization of the provided continuous dimension. More...
 

Typedefs

template<class ElementType , class SupportType , class LayoutStridedPolicy = std::experimental::layout_right, class MemorySpace = Kokkos::HostSpace>
using ChunkView = ChunkSpan< ElementType const, SupportType, LayoutStridedPolicy, MemorySpace >
 
template<class T >
using chunk_value_t = typename chunk_traits< T >::value_type
 
template<class T >
using chunk_pointer_t = typename chunk_traits< T >::pointer_type
 
template<class T >
using chunk_reference_t = typename chunk_traits< T >::reference_type
 
using CoordinateElement = Real
 A CoordinateElement the type of the scalar used to represent elements of coordinates in the continuous space.
 
template<class... CDims>
using Coordinate = detail::TaggedVector< CoordinateElement, CDims... >
 A Coordinate represents a coordinate in the continuous space.
 
template<class T >
using coordinate_of_t = typename coordinate_of< T >::type
 Helper type of ddc::coordinate_of.
 
template<typename... DDom>
using cartesian_prod_t = typename cartesian_prod< DDom... >::type
 
template<typename DDom , typename... DDims>
using remove_dims_of_t = decltype(remove_dims_of< DDims... >(std::declval< DDom >()))
 
template<typename DDom , typename DDim1 , typename DDim2 >
using replace_dim_of_t = decltype(replace_dim_of< DDim1, DDim2 >(std::declval< DDom >(), std::declval< DiscreteDomain< DDim2 > >()))
 
using DiscreteElementType = std::size_t
 A DiscreteCoordElement is a scalar that identifies an element of the discrete dimension.
 
using DiscreteVectorElement = std::ptrdiff_t
 A DiscreteVectorElement is a scalar that represents the difference between two coordinates.
 
template<class DDim >
using knot_discrete_dimension_t = typename KnotDiscreteDimension< DDim >::type
 Helper type to easily access KnotDiscreteDimension<DDim>::type
 
template<std::size_t N, class ElementType >
using SpanND = std::experimental::mdspan< ElementType, std::experimental::dextents< std::size_t, N > >
 
template<std::size_t N, class ElementType >
using ViewND = SpanND< N, ElementType const >
 
template<class ElementType >
using Span1D = SpanND< 1, ElementType >
 
template<class ElementType >
using Span2D = SpanND< 2, ElementType >
 
template<class ElementType >
using View1D = ViewND< 1, ElementType >
 
template<class ElementType >
using View2D = ViewND< 2, ElementType >
 
using DSpan1D = ddc::Span1D< double >
 
using DSpan2D = ddc::Span2D< double >
 
using CDSpan1D = ddc::Span1D< double const >
 
using CDSpan2D = ddc::Span2D< double const >
 
using DView1D = View1D< double >
 
using DView2D = View2D< double >
 
template<class T >
using DeviceAllocator = KokkosAllocator< T, Kokkos::DefaultExecutionSpace::memory_space >
 
template<class T >
using HostAllocator = KokkosAllocator< T, Kokkos::HostSpace >
 
using Real = float
 

Enumerations

enum class  FFT_Direction {
  FORWARD ,
  BACKWARD
}
 A named argument to choose the direction of the FFT. More...
 
enum class  FFT_Normalization {
  OFF ,
  FORWARD ,
  BACKWARD ,
  ORTHO ,
  FULL
}
 A named argument to choose the type of normalization of the FFT. More...
 
enum class  BoundCond {
  PERIODIC ,
  HERMITE ,
  GREVILLE
}
 An enum representing a spline boundary condition. More...
 
enum class  SplineSolver {
  GINKGO ,
  LAPACK
}
 An enum determining the backend solver of a SplineBuilder or SplineBuilder2d. More...
 

Functions

template<class T , std::size_t NT, class U , std::size_t NU>
constexpr bool operator== (AlignedAllocator< T, NT > const &, AlignedAllocator< U, NU > const &) noexcept
 
template<class T , std::size_t NT, class U , std::size_t NU>
constexpr bool operator!= (AlignedAllocator< T, NT > const &, AlignedAllocator< U, NU > const &) noexcept
 
template<class... DDims, class Allocator >
 Chunk (std::string const &, DiscreteDomain< DDims... > const &, Allocator) -> Chunk< typename Allocator::value_type, DiscreteDomain< DDims... >, Allocator >
 
template<class... DDims, class Allocator >
 Chunk (DiscreteDomain< DDims... > const &, Allocator) -> Chunk< typename Allocator::value_type, DiscreteDomain< DDims... >, Allocator >
 
template<class... QueryDDims, class ChunkType >
KOKKOS_FUNCTION auto get_domain (ChunkType const &chunk) noexcept
 Access the domain (or subdomain) of a view.
 
template<class KokkosView , class... DDims, class = std::enable_if_t<Kokkos::is_view<KokkosView>::value>>
 ChunkSpan (KokkosView const &view, DiscreteDomain< DDims... > domain) -> ChunkSpan< detail::kokkos_to_mdspan_element_t< typename KokkosView::data_type >, DiscreteDomain< DDims... >, detail::kokkos_to_mdspan_layout_t< typename KokkosView::array_layout >, typename KokkosView::memory_space >
 
template<class... DDim, std::enable_if_t<(sizeof...(DDim) > 1), int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type... > coordinate (DiscreteElement< DDim... > const &c)
 
template<class Space , class ElementType , class Support , class Layout , class MemorySpace >
auto create_mirror (Space const &space, ChunkSpan< ElementType, Support, Layout, MemorySpace > const &src)
 
template<class ElementType , class Support , class Layout , class MemorySpace >
auto create_mirror (ChunkSpan< ElementType, Support, Layout, MemorySpace > const &src)
 Equivalent to create_mirror(Kokkos::HostSpace(), src).
 
template<class Space , class ElementType , class Support , class Layout , class MemorySpace >
auto create_mirror_and_copy (Space const &space, ChunkSpan< ElementType, Support, Layout, MemorySpace > const &src)
 
template<class ElementType , class Support , class Layout , class MemorySpace >
auto create_mirror_and_copy (ChunkSpan< ElementType, Support, Layout, MemorySpace > const &src)
 Equivalent to create_mirror_and_copy(Kokkos::HostSpace(), src).
 
template<class Space , class ElementType , class Support , class Layout , class MemorySpace >
auto create_mirror_view (Space const &space, ChunkSpan< ElementType, Support, Layout, MemorySpace > const &src)
 
template<class ElementType , class Support , class Layout , class MemorySpace >
auto create_mirror_view (ChunkSpan< ElementType, Support, Layout, MemorySpace > const &src)
 Equivalent to create_mirror_view(Kokkos::HostSpace(), src).
 
template<class Space , class ElementType , class Support , class Layout , class MemorySpace >
auto create_mirror_view_and_copy (Space const &space, ChunkSpan< ElementType, Support, Layout, MemorySpace > const &src)
 
template<class ElementType , class Support , class Layout , class MemorySpace >
auto create_mirror_view_and_copy (ChunkSpan< ElementType, Support, Layout, MemorySpace > const &src)
 Equivalent to create_mirror_view_and_copy(Kokkos::HostSpace(), src).
 
template<class... QueryDDims, class... DDims>
KOKKOS_FUNCTION constexpr DiscreteDomain< QueryDDims... > select (DiscreteDomain< DDims... > const &domain)
 
template<class... DDimsA, class... DDimsB>
KOKKOS_FUNCTION constexpr auto remove_dims_of (DiscreteDomain< DDimsA... > const &DDom_a, DiscreteDomain< DDimsB... > const &DDom_b) noexcept
 
template<class... DDimsB, class DDomA >
KOKKOS_FUNCTION constexpr auto remove_dims_of (DDomA const &DDom_a) noexcept
 Remove the dimensions DDimsB from DDom_a.
 
template<typename DDim1 , typename DDim2 , typename... DDimsA, typename... DDimsB>
KOKKOS_FUNCTION constexpr auto replace_dim_of (DiscreteDomain< DDimsA... > const &DDom_a, DiscreteDomain< DDimsB... > const &DDom_b) noexcept
 
template<class... QueryDDims, class... DDims>
KOKKOS_FUNCTION constexpr DiscreteVector< QueryDDims... > extents (DiscreteDomain< DDims... > const &domain) noexcept
 
template<class... QueryDDims, class... DDims>
KOKKOS_FUNCTION constexpr DiscreteElement< QueryDDims... > front (DiscreteDomain< DDims... > const &domain) noexcept
 
template<class... QueryDDims, class... DDims>
KOKKOS_FUNCTION constexpr DiscreteElement< QueryDDims... > back (DiscreteDomain< DDims... > const &domain) noexcept
 
template<class QueryDDimSeq , class... DDims>
KOKKOS_FUNCTION constexpr auto select_by_type_seq (DiscreteDomain< DDims... > const &domain)
 
template<class Tag >
KOKKOS_FUNCTION constexpr DiscreteElementType constuid (DiscreteElement< Tag > const &tuple) noexcept
 
template<class Tag >
KOKKOS_FUNCTION constexpr DiscreteElementTypeuid (DiscreteElement< Tag > &tuple) noexcept
 
template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElementType constuid (DiscreteElement< Tags... > const &tuple) noexcept
 
template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElementTypeuid (DiscreteElement< Tags... > &tuple) noexcept
 
template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElementType constuid_or (DiscreteElement< Tags... > const &tuple, DiscreteElementType const &default_value) noexcept
 
template<class... QueryTags, class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElement< QueryTags... > select (DiscreteElement< Tags... > const &arr) noexcept
 
template<class... QueryTags, class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElement< QueryTags... > select (DiscreteElement< Tags... > &&arr) noexcept
 
template<class QueryTag , class HeadDElem , class... TailDElems, std::enable_if_t< is_discrete_element_v< HeadDElem > &&(is_discrete_element_v< TailDElems > &&...), int > = 1>
KOKKOS_FUNCTION constexpr auto consttake (HeadDElem const &head, TailDElems const &... tail)
 Returns a reference towards the DiscreteElement that contains the QueryTag.
 
std::ostream & operator<< (std::ostream &out, DiscreteElement<> const &)
 
template<class Head , class... Tags>
std::ostream & operator<< (std::ostream &out, DiscreteElement< Head, Tags... > const &arr)
 
template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr bool operator== (DiscreteElement< Tags... > const &lhs, DiscreteElement< OTags... > const &rhs) noexcept
 
template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr bool operator!= (DiscreteElement< Tags... > const &lhs, DiscreteElement< OTags... > const &rhs) noexcept
 
template<class Tag >
KOKKOS_FUNCTION constexpr bool operator< (DiscreteElement< Tag > const &lhs, DiscreteElement< Tag > const &rhs)
 
template<class Tag >
KOKKOS_FUNCTION constexpr bool operator<= (DiscreteElement< Tag > const &lhs, DiscreteElement< Tag > const &rhs)
 
template<class Tag >
KOKKOS_FUNCTION constexpr bool operator> (DiscreteElement< Tag > const &lhs, DiscreteElement< Tag > const &rhs)
 
template<class Tag >
KOKKOS_FUNCTION constexpr bool operator>= (DiscreteElement< Tag > const &lhs, DiscreteElement< Tag > const &rhs)
 
template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr DiscreteElement< Tags... > operator+ (DiscreteElement< Tags... > const &lhs, DiscreteVector< OTags... > const &rhs)
 right external binary operators: +, -
 
template<class Tag , class IntegralType , class = std::enable_if_t<std::is_integral_v<IntegralType>>, class = std::enable_if_t<!is_discrete_vector_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteElement< Tagoperator+ (DiscreteElement< Tag > const &lhs, IntegralType const &rhs)
 
template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr DiscreteElement< Tags... > operator- (DiscreteElement< Tags... > const &lhs, DiscreteVector< OTags... > const &rhs)
 
template<class Tag , class IntegralType , class = std::enable_if_t<std::is_integral_v<IntegralType>>, class = std::enable_if_t<!is_discrete_vector_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteElement< Tagoperator- (DiscreteElement< Tag > const &lhs, IntegralType const &rhs)
 
template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr DiscreteVector< Tags... > operator- (DiscreteElement< Tags... > const &lhs, DiscreteElement< OTags... > const &rhs)
 binary operator: -
 
template<class DDim , class... Args>
void init_discrete_space (Args &&... args)
 Initialize (emplace) a global singleton discrete space.
 
template<class DDim , class DDimImpl , class Arg0 >
Arg0 init_discrete_space (std::tuple< DDimImpl, Arg0 > &&a)
 Move construct a global singleton discrete space and pass through the other argument.
 
template<class DDim , class DDimImpl , class Arg0 , class Arg1 , class... Args>
std::tuple< Arg0, Arg1, Args... > init_discrete_space (std::tuple< DDimImpl, Arg0, Arg1, Args... > &&a)
 Move construct a global singleton discrete space and pass through remaining arguments.
 
template<class DDim , class MemorySpace = DDC_CURRENT_KOKKOS_SPACE>
KOKKOS_FUNCTION detail::ddim_impl_t< DDim, MemorySpace > constdiscrete_space ()
 
template<class DDim >
bool is_discrete_space_initialized () noexcept
 
template<class DDim >
detail::ddim_impl_t< DDim, Kokkos::HostSpace > consthost_discrete_space ()
 
template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVectorElement constget (DiscreteVector< Tags... > const &tuple) noexcept
 
template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVectorElementget (DiscreteVector< Tags... > &tuple) noexcept
 
template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVectorElement constget_or (DiscreteVector< Tags... > const &tuple, DiscreteVectorElement const &default_value) noexcept
 
template<class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVector< Tags... > operator+ (DiscreteVector< Tags... > const &x)
 Unary operators: +, -.
 
template<class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVector< Tags... > operator- (DiscreteVector< Tags... > const &x)
 
template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr auto operator+ (DiscreteVector< Tags... > const &lhs, DiscreteVector< OTags... > const &rhs)
 Internal binary operators: +, -.
 
template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr auto operator- (DiscreteVector< Tags... > const &lhs, DiscreteVector< OTags... > const &rhs)
 
template<class Tag , class IntegralType , class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteVector< Tagoperator+ (DiscreteVector< Tag > const &lhs, IntegralType const &rhs)
 
template<class IntegralType , class Tag , class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteVector< Tagoperator+ (IntegralType const &lhs, DiscreteVector< Tag > const &rhs)
 
template<class Tag , class IntegralType , class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteVector< Tagoperator- (DiscreteVector< Tag > const &lhs, IntegralType const &rhs)
 
template<class IntegralType , class Tag , class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteVector< Tagoperator- (IntegralType const &lhs, DiscreteVector< Tag > const &rhs)
 
template<class IntegralType , class... Tags, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr auto operator* (IntegralType const &lhs, DiscreteVector< Tags... > const &rhs)
 external left binary operator: *
 
template<class... QueryTags, class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVector< QueryTags... > select (DiscreteVector< Tags... > const &arr) noexcept
 
template<class... QueryTags, class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVector< QueryTags... > select (DiscreteVector< Tags... > &&arr) noexcept
 
template<class QueryTag , class HeadDVect , class... TailDVects, std::enable_if_t< is_discrete_vector_v< HeadDVect > &&(is_discrete_vector_v< TailDVects > &&...), int > = 1>
KOKKOS_FUNCTION constexpr auto consttake (HeadDVect const &head, TailDVects const &... tail)
 Returns a reference towards the DiscreteVector that contains the QueryTag.
 
template<class Tag >
KOKKOS_FUNCTION constexpr bool operator< (DiscreteVector< Tag > const &lhs, DiscreteVector< Tag > const &rhs)
 
template<class Tag , class IntegralType >
KOKKOS_FUNCTION constexpr bool operator< (DiscreteVector< Tag > const &lhs, IntegralType const &rhs)
 
std::ostream & operator<< (std::ostream &out, DiscreteVector<> const &)
 
template<class Head , class... Tags>
std::ostream & operator<< (std::ostream &out, DiscreteVector< Head, Tags... > const &arr)
 
template<class... DDims, class Functor >
void for_each (DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
 iterates over a nD domain in serial
 
template<typename DDimFx , typename DDimX >
DDimFx::template Impl< DDimFx, Kokkos::HostSpace > init_fourier_space (ddc::DiscreteDomain< DDimX > x_mesh)
 Initialize a Fourier discrete dimension.
 
template<typename... DDimFx, typename... DDimX>
ddc::DiscreteDomain< DDimFx... > FourierMesh (ddc::DiscreteDomain< DDimX... > x_mesh, bool C2C)
 Get the Fourier mesh.
 
template<typename Tin , typename Tout , typename... DDimFx, typename... DDimX, typename ExecSpace , typename MemorySpace , typename LayoutIn , typename LayoutOut >
void fft (ExecSpace const &exec_space, ddc::ChunkSpan< Tout, ddc::DiscreteDomain< DDimFx... >, LayoutOut, MemorySpace > out, ddc::ChunkSpan< Tin, ddc::DiscreteDomain< DDimX... >, LayoutIn, MemorySpace > in, ddc::kwArgs_fft kwargs={ddc::FFT_Normalization::OFF})
 Perform a direct Fast Fourier Transform.
 
template<typename Tin , typename Tout , typename... DDimX, typename... DDimFx, typename ExecSpace , typename MemorySpace , typename LayoutIn , typename LayoutOut >
void ifft (ExecSpace const &exec_space, ddc::ChunkSpan< Tout, ddc::DiscreteDomain< DDimX... >, LayoutOut, MemorySpace > out, ddc::ChunkSpan< Tin, ddc::DiscreteDomain< DDimFx... >, LayoutIn, MemorySpace > in, ddc::kwArgs_fft kwargs={ddc::FFT_Normalization::OFF})
 Perform an inverse Fast Fourier Transform.
 
constexpr int n_boundary_equations (ddc::BoundCond const bc, std::size_t const degree)
 Return the number of equations needed to describe a given boundary condition.
 
template<class ElementType , std::size_t N>
Span1D< ElementTypeas_span (std::array< ElementType, N > &arr) noexcept
 
template<class ElementType , std::size_t N>
Span1D< const ElementTypeas_span (std::array< ElementType, N > const &arr) noexcept
 
template<class ElementType , class Extents , class Layout , class Accessor >
std::ostream & operator<< (std::ostream &os, std::experimental::mdspan< ElementType, Extents, Layout, Accessor > const &s)
 Convenient function to dump a mdspan, it recursively prints all dimensions.
 
template<class T , class MST , class U , class MSU >
constexpr bool operator== (KokkosAllocator< T, MST > const &, KokkosAllocator< U, MSU > const &) noexcept
 
template<class T , class MST , class U , class MSU >
constexpr bool operator!= (KokkosAllocator< T, MST > const &, KokkosAllocator< U, MSU > const &) noexcept
 
template<class DDimImpl , std::enable_if_t< is_non_uniform_point_sampling_v< typename DDimImpl::discrete_dimension_type >, int > = 0>
std::ostream & operator<< (std::ostream &out, DDimImpl const &mesh)
 
template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > coordinate (DiscreteElement< DDim > const &c)
 
template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > distance_at_left (DiscreteElement< DDim > i)
 
template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > distance_at_right (DiscreteElement< DDim > i)
 
template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > rmin (DiscreteDomain< DDim > const &d)
 
template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > rmax (DiscreteDomain< DDim > const &d)
 
template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > rlength (DiscreteDomain< DDim > const &d)
 
template<class ChunkDst , class ChunkSrc >
auto parallel_deepcopy (ChunkDst &&dst, ChunkSrc &&src)
 Copy the content of a borrowed chunk into another.
 
template<class ExecSpace , class ChunkDst , class ChunkSrc >
auto parallel_deepcopy (ExecSpace const &execution_space, ChunkDst &&dst, ChunkSrc &&src)
 Copy the content of a borrowed chunk into another.
 
template<class ChunkDst , class T >
auto parallel_fill (ChunkDst &&dst, T const &value)
 Fill a borrowed chunk with a given value.
 
template<class ExecSpace , class ChunkDst , class T >
auto parallel_fill (ExecSpace const &execution_space, ChunkDst &&dst, T const &value)
 Fill a borrowed chunk with a given value.
 
template<class ExecSpace , class... DDims, class Functor >
void parallel_for_each (std::string const &label, ExecSpace const &execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
 iterates over a nD domain using a given Kokkos execution space
 
template<class ExecSpace , class... DDims, class Functor >
std::enable_if_t< Kokkos::is_execution_space_v< ExecSpace > > parallel_for_each (ExecSpace const &execution_space, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
 iterates over a nD domain using a given Kokkos execution space
 
template<class... DDims, class Functor >
void parallel_for_each (std::string const &label, DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
 iterates over a nD domain using the Kokkos default execution space
 
template<class... DDims, class Functor >
void parallel_for_each (DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
 iterates over a nD domain using the Kokkos default execution space
 
template<class ExecSpace , class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
parallel_transform_reduce (std::string const &label, ExecSpace const &execution_space, DiscreteDomain< DDims... > const &domain, T neutral, BinaryReductionOp &&reduce, UnaryTransformOp &&transform) noexcept
 A reduction over a nD domain using a given Kokkos execution space.
 
template<class ExecSpace , class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
std::enable_if_t< Kokkos::is_execution_space_v< ExecSpace >, T > parallel_transform_reduce (ExecSpace const &execution_space, DiscreteDomain< DDims... > const &domain, T neutral, BinaryReductionOp &&reduce, UnaryTransformOp &&transform) noexcept
 A reduction over a nD domain using a given Kokkos execution space.
 
template<class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
parallel_transform_reduce (std::string const &label, DiscreteDomain< DDims... > const &domain, T neutral, BinaryReductionOp &&reduce, UnaryTransformOp &&transform) noexcept
 A reduction over a nD domain using the Kokkos default execution space.
 
template<class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
parallel_transform_reduce (DiscreteDomain< DDims... > const &domain, T neutral, BinaryReductionOp &&reduce, UnaryTransformOp &&transform) noexcept
 A reduction over a nD domain using the Kokkos default execution space.
 
template<PDI_inout_t access, class DataType >
void expose_to_pdi (std::string const &name, DataType &&data)
 
template<class DataType >
void expose_to_pdi (std::string const &name, DataType &&data)
 
template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_periodic_sampling_v< DDim >, Coordinate< typename DDim::continuous_dimension_type > > origin () noexcept
 Lower bound index of the mesh.
 
template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_periodic_sampling_v< DDim >, DiscreteElement< DDim > > front () noexcept
 Lower bound index of the mesh.
 
template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_periodic_sampling_v< DDim >, Realstep () noexcept
 Spacing step of the mesh.
 
template<class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
transform_reduce (DiscreteDomain< DDims... > const &domain, T neutral, BinaryReductionOp &&reduce, UnaryTransformOp &&transform) noexcept
 A reduction over a nD domain in serial.
 
template<class DDim , std::enable_if_t< is_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION constexpr Coordinate< typename DDim::continuous_dimension_type > coordinate (DiscreteElement< DDim > const &c)
 
template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_uniform_point_sampling_v< DDim >, Coordinate< typename DDim::continuous_dimension_type > > origin () noexcept
 Lower bound index of the mesh.
 
template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_uniform_point_sampling_v< DDim >, DiscreteElement< DDim > > front () noexcept
 Lower bound index of the mesh.
 
template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_uniform_point_sampling_v< DDim >, Realstep () noexcept
 Spacing step of the mesh.
 

Variables

template<class ElementType , class SupportType , class Allocator >
constexpr bool enable_chunk< Chunk< ElementType, SupportType, Allocator > > = true
 
template<class ElementType , class SupportType , class LayoutStridedPolicy , class MemorySpace >
constexpr bool enable_chunk< ChunkSpan< ElementType, SupportType, LayoutStridedPolicy, MemorySpace > > = true
 
template<class ElementType , class SupportType , class LayoutStridedPolicy , class MemorySpace >
constexpr bool enable_borrowed_chunk< ChunkSpan< ElementType, SupportType, LayoutStridedPolicy, MemorySpace > > = true
 
template<class T >
constexpr bool enable_borrowed_chunk = false
 
template<class T >
constexpr bool enable_chunk = false
 
template<class T >
constexpr bool is_chunk_v = enable_chunk<std::remove_const_t<std::remove_reference_t<T>>>
 
template<class T >
constexpr bool is_borrowed_chunk_v
 
template<class T >
constexpr bool is_writable_chunk_v = !std::is_const_v<std::remove_pointer_t<chunk_pointer_t<T>>>
 
template<class T >
constexpr bool is_discrete_domain_v = is_discrete_domain<T>::value
 
template<class T >
constexpr bool is_discrete_element_v = is_discrete_element<T>::value
 
template<class T >
constexpr bool is_discrete_vector_v = is_discrete_vector<T>::value
 
template<class DDim >
constexpr bool is_non_uniform_bsplines_v = is_non_uniform_bsplines<DDim>::value
 Indicates if a tag corresponds to non-uniform B-splines or not.
 
template<class DDim >
constexpr bool is_uniform_bsplines_v = is_uniform_bsplines<DDim>::value
 Indicates if a tag corresponds to uniform B-splines or not.
 
template<class DDim >
constexpr bool is_non_uniform_point_sampling_v = is_non_uniform_point_sampling<DDim>::value
 
template<class DDim >
constexpr bool is_periodic_sampling_v = is_periodic_sampling<DDim>::value
 
template<class DDim >
constexpr bool is_uniform_point_sampling_v = is_uniform_point_sampling<DDim>::value
 

Detailed Description

The top-level namespace of DDC.

All DDC symbols are defined either in this namespace or in a nested namespace.


Class Documentation

◆ ddc::cartesian_prod

struct ddc::cartesian_prod
template<typename... DDom>
struct ddc::cartesian_prod< DDom >

◆ ddc::cartesian_prod< ddc::DiscreteDomain< DDim1... >, ddc::DiscreteDomain< DDim2... > >

struct ddc::cartesian_prod< ddc::DiscreteDomain< DDim1... >, ddc::DiscreteDomain< DDim2... > >
template<typename... DDim1, typename... DDim2>
struct ddc::cartesian_prod< ddc::DiscreteDomain< DDim1... >, ddc::DiscreteDomain< DDim2... > >
Class Members
typedef DiscreteDomain< DDim1..., DDim2... > type

◆ ddc::cartesian_prod< DDom >

struct ddc::cartesian_prod< DDom >
template<typename DDom>
struct ddc::cartesian_prod< DDom >
Class Members
typedef DDom type

◆ ddc::cartesian_prod< DDom1, DDom2, Tail... >

struct ddc::cartesian_prod< DDom1, DDom2, Tail... >
template<typename DDom1, typename DDom2, typename... Tail>
struct ddc::cartesian_prod< DDom1, DDom2, Tail... >
Class Members
typedef typename type, Tail... >::type type

◆ ddc::Chunk

class ddc::Chunk
template<class ElementType, class, class Allocator = HostAllocator<ElementType>>
class ddc::Chunk< ElementType, class, Allocator >

◆ ddc::chunk_traits

struct ddc::chunk_traits
template<class T>
struct ddc::chunk_traits< T >
Class Members
typedef remove_cv_t< remove_pointer_t< decltype(declval< T >().data_handle())> > value_type
typedef decltype(declval< T >().data_handle()) pointer_type
typedef decltype(*declval< T >().data_handle()) reference_type

◆ ddc::ChunkCommon

class ddc::ChunkCommon
template<class ElementType, class SupportType, class LayoutStridedPolicy>
class ddc::ChunkCommon< ElementType, SupportType, LayoutStridedPolicy >

◆ ddc::ChunkSpan

class ddc::ChunkSpan
template<class ElementType, class SupportType, class LayoutStridedPolicy = std::experimental::layout_right, class MemorySpace = Kokkos::DefaultHostExecutionSpace::memory_space>
class ddc::ChunkSpan< ElementType, SupportType, LayoutStridedPolicy, MemorySpace >

◆ ddc::ConstantExtrapolationRule

struct ddc::ConstantExtrapolationRule
template<class DimI, class... Dim>
struct ddc::ConstantExtrapolationRule< DimI, Dim >

◆ ddc::coordinate_of

struct ddc::coordinate_of
template<class T>
struct ddc::coordinate_of< T >
Class Members
typedef decltype(coordinate(declval< T >())) type

◆ ddc::Deriv

struct ddc::Deriv
template<class CDim>
struct ddc::Deriv< CDim >

A templated struct representing a discrete dimension storing the derivatives of a function along a continuous dimension CDim.

◆ ddc::Fourier

struct ddc::Fourier
template<typename Dim>
struct ddc::Fourier< Dim >

A templated tag representing a continuous dimension in the Fourier space associated to the original continuous dimension.

Template Parameters
Thetag representing the original dimension.

◆ ddc::KnotDiscreteDimension

struct ddc::KnotDiscreteDimension
template<class DDim>
struct ddc::KnotDiscreteDimension< DDim >

If the type DDim is a B-spline, defines type to the discrete dimension of the associated knots.

Class Members
typedef conditional_t< is_uniform_bsplines_v< DDim >, UniformBsplinesKnots< DDim >, NonUniformBsplinesKnots< DDim > > type The type representing the discrete dimension of the knots.

◆ ddc::kwArgs_fft

struct ddc::kwArgs_fft

A structure embedding the configuration of the exposed FFT function with the type of normalization.

See also
fft, ifft
Class Members
FFT_Normalization normalization Enum member to identify the type of normalization performed.

Typedef Documentation

◆ ChunkView

◆ chunk_value_t

template<class T >
using ddc::chunk_value_t = typedef typename chunk_traits<T>::value_type

◆ chunk_pointer_t

template<class T >
using ddc::chunk_pointer_t = typedef typename chunk_traits<T>::pointer_type

◆ chunk_reference_t

template<class T >
using ddc::chunk_reference_t = typedef typename chunk_traits<T>::reference_type

◆ CoordinateElement

A CoordinateElement the type of the scalar used to represent elements of coordinates in the continuous space.

◆ Coordinate

template<class... CDims>
using ddc::Coordinate = typedef detail::TaggedVector<CoordinateElement, CDims...>

A Coordinate represents a coordinate in the continuous space.

It is tagged by its dimensions.

◆ coordinate_of_t

◆ cartesian_prod_t

template<typename... DDom>
using ddc::cartesian_prod_t = typedef typename cartesian_prod<DDom...>::type

◆ remove_dims_of_t

template<typename DDom , typename... DDims>
using ddc::remove_dims_of_t = typedef decltype(remove_dims_of<DDims...>(std::declval<DDom>()))

◆ replace_dim_of_t

◆ DiscreteElementType

A DiscreteCoordElement is a scalar that identifies an element of the discrete dimension.

◆ DiscreteVectorElement

A DiscreteVectorElement is a scalar that represents the difference between two coordinates.

◆ knot_discrete_dimension_t

Helper type to easily access KnotDiscreteDimension<DDim>::type

◆ SpanND

template<std::size_t N, class ElementType >
using ddc::SpanND = typedef std::experimental::mdspan<ElementType, std::experimental::dextents<std::size_t, N> >

◆ ViewND

template<std::size_t N, class ElementType >
using ddc::ViewND = typedef SpanND<N, ElementType const>

◆ Span1D

◆ Span2D

◆ View1D

◆ View2D

◆ DSpan1D

◆ DSpan2D

◆ CDSpan1D

◆ CDSpan2D

◆ DView1D

◆ DView2D

◆ DeviceAllocator

template<class T >
using ddc::DeviceAllocator = typedef KokkosAllocator<T, Kokkos::DefaultExecutionSpace::memory_space>

◆ HostAllocator

template<class T >
using ddc::HostAllocator = typedef KokkosAllocator<T, Kokkos::HostSpace>

◆ Real

Enumeration Type Documentation

◆ FFT_Direction

A named argument to choose the direction of the FFT.

See also
kwArgs_impl, kwArgs_fft
Enumerator
FORWARD 

Forward, corresponds to direct FFT up to normalization.

BACKWARD 

Backward, corresponds to inverse FFT up to normalization.

◆ FFT_Normalization

A named argument to choose the type of normalization of the FFT.

See also
kwArgs_impl, kwArgs_fft
Enumerator
OFF 

No normalization. Un-normalized FFT is sum_j f(x_j)*e^-ikx_j.

FORWARD 

Multiply by 1/N for forward FFT, no normalization for backward FFT.

BACKWARD 

No normalization for forward FFT, multiply by 1/N for backward FFT.

ORTHO 

Multiply by 1/sqrt(N)

FULL 

Multiply by dx/sqrt(2*pi) for forward FFT and dk/sqrt(2*pi) for backward FFT.

It is aligned with the usual definition of the (continuous) Fourier transform 1/sqrt(2*pi)*int f(x)*e^-ikx*dx, and thus may be relevant for spectral analysis applications.

◆ BoundCond

An enum representing a spline boundary condition.

Please refer to Emily Bourne's thesis (https://www.theses.fr/2022AIXM0412.pdf)

Enumerator
PERIODIC 

Periodic boundary condition u(1)=u(n)

HERMITE 

Hermite boundary condition.

GREVILLE 

Use Greville points instead of conditions on derivative for B-Spline interpolation.

◆ SplineSolver

An enum determining the backend solver of a SplineBuilder or SplineBuilder2d.

An enum determining the backend solver of a SplineBuilder or SplineBuilder2d.

Enumerator
GINKGO 

Enum member to identify the Ginkgo-based solver (iterative method)

LAPACK 

Enum member to identify the LAPACK-based solver (direct method)

Function Documentation

◆ operator==() [1/3]

template<class T , std::size_t NT, class U , std::size_t NU>
constexpr bool ddc::operator== ( AlignedAllocator< T, NT > const ,
AlignedAllocator< U, NU > const  
)
constexprnoexcept

◆ operator!=() [1/3]

template<class T , std::size_t NT, class U , std::size_t NU>
constexpr bool ddc::operator!= ( AlignedAllocator< T, NT > const ,
AlignedAllocator< U, NU > const  
)
constexprnoexcept

◆ Chunk() [1/2]

template<class... DDims, class Allocator >
ddc::Chunk ( std::string const ,
DiscreteDomain< DDims... > const ,
Allocator   
) -> Chunk< typename Allocator::value_type, DiscreteDomain< DDims... >, Allocator >

◆ Chunk() [2/2]

template<class... DDims, class Allocator >
ddc::Chunk ( DiscreteDomain< DDims... > const ,
Allocator   
) -> Chunk< typename Allocator::value_type, DiscreteDomain< DDims... >, Allocator >

◆ get_domain()

template<class... QueryDDims, class ChunkType >
KOKKOS_FUNCTION auto ddc::get_domain ( ChunkType const chunk)
noexcept

Access the domain (or subdomain) of a view.

Parameters
[in]chunkthe view whose domain to access
Returns
the domain of view in the queried dimensions

◆ ChunkSpan()

template<class KokkosView , class... DDims, class = std::enable_if_t<Kokkos::is_view<KokkosView>::value>>
ddc::ChunkSpan ( KokkosView const view,
DiscreteDomain< DDims... >  domain 
) -> ChunkSpan< detail::kokkos_to_mdspan_element_t< typename KokkosView::data_type >, DiscreteDomain< DDims... >, detail::kokkos_to_mdspan_layout_t< typename KokkosView::array_layout >, typename KokkosView::memory_space >

◆ coordinate() [1/3]

template<class... DDim, std::enable_if_t<(sizeof...(DDim) > 1), int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type... > ddc::coordinate ( DiscreteElement< DDim... > const c)

◆ create_mirror() [1/2]

auto ddc::create_mirror ( Space const space,
ChunkSpan< ElementType, Support, Layout, MemorySpace > const src 
)
Parameters
[in]spaceA Kokkos memory space or execution space.
[in]srcA layout right ChunkSpan.
Returns
a Chunk with the same support and layout as src allocated on the Space::memory_space memory space.

◆ create_mirror() [2/2]

Equivalent to create_mirror(Kokkos::HostSpace(), src).

Parameters
[in]srcA layout right ChunkSpan.
Returns
a Chunk with the same support and layout as src allocated on the Kokkos::HostSpace memory space.

◆ create_mirror_and_copy() [1/2]

auto ddc::create_mirror_and_copy ( Space const space,
ChunkSpan< ElementType, Support, Layout, MemorySpace > const src 
)
Parameters
[in]spaceA Kokkos memory space or execution space.
[in]srcA layout right ChunkSpan.
Returns
a Chunk with the same support and layout as src allocated on the Space::memory_space memory space and operates a deep copy between the two.

◆ create_mirror_and_copy() [2/2]

auto ddc::create_mirror_and_copy ( ChunkSpan< ElementType, Support, Layout, MemorySpace > const src)

Equivalent to create_mirror_and_copy(Kokkos::HostSpace(), src).

Parameters
[in]srcA layout right ChunkSpan.
Returns
a Chunk with the same support and layout as src allocated on the Kokkos::HostSpace memory space and operates a deep copy between the two.

◆ create_mirror_view() [1/2]

auto ddc::create_mirror_view ( Space const space,
ChunkSpan< ElementType, Support, Layout, MemorySpace > const src 
)
Parameters
[in]spaceA Kokkos memory space or execution space.
[in]srcA non-const, layout right ChunkSpan.
Returns
If MemorySpace is accessible from Space then returns a copy of src, otherwise returns a Chunk with the same support and layout as src allocated on the Space::memory_space memory space.

◆ create_mirror_view() [2/2]

auto ddc::create_mirror_view ( ChunkSpan< ElementType, Support, Layout, MemorySpace > const src)

Equivalent to create_mirror_view(Kokkos::HostSpace(), src).

Parameters
[in]srcA non-const, layout right ChunkSpan.
Returns
If Kokkos::HostSpace is accessible from Space then returns a copy of src, otherwise returns a Chunk with the same support and layout as src allocated on the Kokkos::HostSpace memory space.

◆ create_mirror_view_and_copy() [1/2]

auto ddc::create_mirror_view_and_copy ( Space const space,
ChunkSpan< ElementType, Support, Layout, MemorySpace > const src 
)
Parameters
[in]spaceA Kokkos memory space or execution space.
[in]srcA layout right ChunkSpan.
Returns
If MemorySpace is accessible from Space then returns a copy of src, otherwise returns a Chunk with the same support and layout as src allocated on the Space::memory_space memory space and operates a deep copy between the two.

◆ create_mirror_view_and_copy() [2/2]

auto ddc::create_mirror_view_and_copy ( ChunkSpan< ElementType, Support, Layout, MemorySpace > const src)

Equivalent to create_mirror_view_and_copy(Kokkos::HostSpace(), src).

Parameters
[in]srcA layout right ChunkSpan.
Returns
If Kokkos::HostSpace is accessible from Space then returns a copy of src, otherwise returns a Chunk with the same support and layout as src allocated on the Kokkos::HostSpace memory space and operates a deep copy between the two.

◆ select() [1/5]

template<class... QueryDDims, class... DDims>
KOKKOS_FUNCTION constexpr DiscreteDomain< QueryDDims... > ddc::select ( DiscreteDomain< DDims... > const domain)
constexpr

◆ remove_dims_of() [1/2]

template<class... DDimsA, class... DDimsB>
KOKKOS_FUNCTION constexpr auto ddc::remove_dims_of ( DiscreteDomain< DDimsA... > const DDom_a,
DiscreteDomain< DDimsB... > const DDom_b 
)
constexprnoexcept

◆ remove_dims_of() [2/2]

template<class... DDimsB, class DDomA >
KOKKOS_FUNCTION constexpr auto ddc::remove_dims_of ( DDomA const DDom_a)
constexprnoexcept

Remove the dimensions DDimsB from DDom_a.

Parameters
[in]DDom_aThe discrete domain on which to remove dimensions
Returns
The discrete domain without DDimsB dimensions

◆ replace_dim_of()

template<typename DDim1 , typename DDim2 , typename... DDimsA, typename... DDimsB>
KOKKOS_FUNCTION constexpr auto ddc::replace_dim_of ( DiscreteDomain< DDimsA... > const DDom_a,
DiscreteDomain< DDimsB... > const DDom_b 
)
constexprnoexcept

◆ extents()

template<class... QueryDDims, class... DDims>
KOKKOS_FUNCTION constexpr DiscreteVector< QueryDDims... > ddc::extents ( DiscreteDomain< DDims... > const domain)
constexprnoexcept

◆ front() [1/3]

template<class... QueryDDims, class... DDims>
KOKKOS_FUNCTION constexpr DiscreteElement< QueryDDims... > ddc::front ( DiscreteDomain< DDims... > const domain)
constexprnoexcept

◆ back()

template<class... QueryDDims, class... DDims>
KOKKOS_FUNCTION constexpr DiscreteElement< QueryDDims... > ddc::back ( DiscreteDomain< DDims... > const domain)
constexprnoexcept

◆ select_by_type_seq()

template<class QueryDDimSeq , class... DDims>
KOKKOS_FUNCTION constexpr auto ddc::select_by_type_seq ( DiscreteDomain< DDims... > const domain)
constexpr

◆ uid() [1/4]

template<class Tag >
KOKKOS_FUNCTION constexpr DiscreteElementType const & ddc::uid ( DiscreteElement< Tag > const tuple)
constexprnoexcept

◆ uid() [2/4]

template<class Tag >
KOKKOS_FUNCTION constexpr DiscreteElementType & ddc::uid ( DiscreteElement< Tag > &  tuple)
constexprnoexcept

◆ uid() [3/4]

template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElementType const & ddc::uid ( DiscreteElement< Tags... > const tuple)
constexprnoexcept

◆ uid() [4/4]

template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElementType & ddc::uid ( DiscreteElement< Tags... > &  tuple)
constexprnoexcept

◆ uid_or()

template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElementType const & ddc::uid_or ( DiscreteElement< Tags... > const tuple,
DiscreteElementType const default_value 
)
constexprnoexcept

◆ select() [2/5]

template<class... QueryTags, class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElement< QueryTags... > ddc::select ( DiscreteElement< Tags... > const arr)
constexprnoexcept

◆ select() [3/5]

template<class... QueryTags, class... Tags>
KOKKOS_FUNCTION constexpr DiscreteElement< QueryTags... > ddc::select ( DiscreteElement< Tags... > &&  arr)
constexprnoexcept

◆ take() [1/2]

template<class QueryTag , class HeadDElem , class... TailDElems, std::enable_if_t< is_discrete_element_v< HeadDElem > &&(is_discrete_element_v< TailDElems > &&...), int > = 1>
KOKKOS_FUNCTION constexpr auto const & ddc::take ( HeadDElem const head,
TailDElems const &...  tail 
)
constexpr

Returns a reference towards the DiscreteElement that contains the QueryTag.

◆ operator<<() [1/6]

std::ostream & ddc::operator<< ( std::ostream &  out,
DiscreteElement<> const  
)
inline

◆ operator<<() [2/6]

template<class Head , class... Tags>
std::ostream & ddc::operator<< ( std::ostream &  out,
DiscreteElement< Head, Tags... > const arr 
)

◆ operator==() [2/3]

template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr bool ddc::operator== ( DiscreteElement< Tags... > const lhs,
DiscreteElement< OTags... > const rhs 
)
constexprnoexcept

◆ operator!=() [2/3]

template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr bool ddc::operator!= ( DiscreteElement< Tags... > const lhs,
DiscreteElement< OTags... > const rhs 
)
constexprnoexcept

◆ operator<() [1/3]

template<class Tag >
KOKKOS_FUNCTION constexpr bool ddc::operator< ( DiscreteElement< Tag > const lhs,
DiscreteElement< Tag > const rhs 
)
constexpr

◆ operator<=()

template<class Tag >
KOKKOS_FUNCTION constexpr bool ddc::operator<= ( DiscreteElement< Tag > const lhs,
DiscreteElement< Tag > const rhs 
)
constexpr

◆ operator>()

template<class Tag >
KOKKOS_FUNCTION constexpr bool ddc::operator> ( DiscreteElement< Tag > const lhs,
DiscreteElement< Tag > const rhs 
)
constexpr

◆ operator>=()

template<class Tag >
KOKKOS_FUNCTION constexpr bool ddc::operator>= ( DiscreteElement< Tag > const lhs,
DiscreteElement< Tag > const rhs 
)
constexpr

◆ operator+() [1/6]

template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr DiscreteElement< Tags... > ddc::operator+ ( DiscreteElement< Tags... > const lhs,
DiscreteVector< OTags... > const rhs 
)
constexpr

right external binary operators: +, -

◆ operator+() [2/6]

template<class Tag , class IntegralType , class = std::enable_if_t<std::is_integral_v<IntegralType>>, class = std::enable_if_t<!is_discrete_vector_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteElement< Tag > ddc::operator+ ( DiscreteElement< Tag > const lhs,
IntegralType const rhs 
)
constexpr

◆ operator-() [1/7]

template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr DiscreteElement< Tags... > ddc::operator- ( DiscreteElement< Tags... > const lhs,
DiscreteVector< OTags... > const rhs 
)
constexpr

◆ operator-() [2/7]

template<class Tag , class IntegralType , class = std::enable_if_t<std::is_integral_v<IntegralType>>, class = std::enable_if_t<!is_discrete_vector_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteElement< Tag > ddc::operator- ( DiscreteElement< Tag > const lhs,
IntegralType const rhs 
)
constexpr

◆ operator-() [3/7]

template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr DiscreteVector< Tags... > ddc::operator- ( DiscreteElement< Tags... > const lhs,
DiscreteElement< OTags... > const rhs 
)
constexpr

binary operator: -

◆ init_discrete_space() [1/3]

template<class DDim , class... Args>
void ddc::init_discrete_space ( Args &&...  args)

Initialize (emplace) a global singleton discrete space.

Parameters
argsthe constructor arguments

◆ init_discrete_space() [2/3]

template<class DDim , class DDimImpl , class Arg0 >
Arg0 ddc::init_discrete_space ( std::tuple< DDimImpl, Arg0 > &&  a)

Move construct a global singleton discrete space and pass through the other argument.

Parameters
a- the discrete space to move at index 0
  • the arguments to pass through at index 1

◆ init_discrete_space() [3/3]

template<class DDim , class DDimImpl , class Arg0 , class Arg1 , class... Args>
std::tuple< Arg0, Arg1, Args... > ddc::init_discrete_space ( std::tuple< DDimImpl, Arg0, Arg1, Args... > &&  a)

Move construct a global singleton discrete space and pass through remaining arguments.

Parameters
a- the discrete space to move at index 0
  • the (2+) arguments to pass through in other indices

◆ discrete_space()

template<class DDim , class MemorySpace = DDC_CURRENT_KOKKOS_SPACE>
KOKKOS_FUNCTION detail::ddim_impl_t< DDim, MemorySpace > const & ddc::discrete_space ( )
Template Parameters
DDima discrete dimension
Returns
the discrete space instance associated with DDim. This function must be called from a KOKKOS_FUNCTION. Call ddc::host_discrete_space for a host-only function instead.

◆ is_discrete_space_initialized()

template<class DDim >
bool ddc::is_discrete_space_initialized ( )
noexcept

◆ host_discrete_space()

template<class DDim >
detail::ddim_impl_t< DDim, Kokkos::HostSpace > const & ddc::host_discrete_space ( )

◆ get() [1/2]

template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVectorElement const & ddc::get ( DiscreteVector< Tags... > const tuple)
constexprnoexcept

◆ get() [2/2]

template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVectorElement & ddc::get ( DiscreteVector< Tags... > &  tuple)
constexprnoexcept

◆ get_or()

template<class QueryTag , class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVectorElement const & ddc::get_or ( DiscreteVector< Tags... > const tuple,
DiscreteVectorElement const default_value 
)
constexprnoexcept

◆ operator+() [3/6]

template<class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVector< Tags... > ddc::operator+ ( DiscreteVector< Tags... > const x)
constexpr

Unary operators: +, -.

◆ operator-() [4/7]

template<class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVector< Tags... > ddc::operator- ( DiscreteVector< Tags... > const x)
constexpr

◆ operator+() [4/6]

template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr auto ddc::operator+ ( DiscreteVector< Tags... > const lhs,
DiscreteVector< OTags... > const rhs 
)
constexpr

Internal binary operators: +, -.

◆ operator-() [5/7]

template<class... Tags, class... OTags>
KOKKOS_FUNCTION constexpr auto ddc::operator- ( DiscreteVector< Tags... > const lhs,
DiscreteVector< OTags... > const rhs 
)
constexpr

◆ operator+() [5/6]

template<class Tag , class IntegralType , class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteVector< Tag > ddc::operator+ ( DiscreteVector< Tag > const lhs,
IntegralType const rhs 
)
constexpr

◆ operator+() [6/6]

template<class IntegralType , class Tag , class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteVector< Tag > ddc::operator+ ( IntegralType const lhs,
DiscreteVector< Tag > const rhs 
)
constexpr

◆ operator-() [6/7]

template<class Tag , class IntegralType , class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteVector< Tag > ddc::operator- ( DiscreteVector< Tag > const lhs,
IntegralType const rhs 
)
constexpr

◆ operator-() [7/7]

template<class IntegralType , class Tag , class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr DiscreteVector< Tag > ddc::operator- ( IntegralType const lhs,
DiscreteVector< Tag > const rhs 
)
constexpr

◆ operator*()

template<class IntegralType , class... Tags, class = std::enable_if_t<std::is_integral_v<IntegralType>>>
KOKKOS_FUNCTION constexpr auto ddc::operator* ( IntegralType const lhs,
DiscreteVector< Tags... > const rhs 
)
constexpr

external left binary operator: *

◆ select() [4/5]

template<class... QueryTags, class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVector< QueryTags... > ddc::select ( DiscreteVector< Tags... > const arr)
constexprnoexcept

◆ select() [5/5]

template<class... QueryTags, class... Tags>
KOKKOS_FUNCTION constexpr DiscreteVector< QueryTags... > ddc::select ( DiscreteVector< Tags... > &&  arr)
constexprnoexcept

◆ take() [2/2]

template<class QueryTag , class HeadDVect , class... TailDVects, std::enable_if_t< is_discrete_vector_v< HeadDVect > &&(is_discrete_vector_v< TailDVects > &&...), int > = 1>
KOKKOS_FUNCTION constexpr auto const & ddc::take ( HeadDVect const head,
TailDVects const &...  tail 
)
constexpr

Returns a reference towards the DiscreteVector that contains the QueryTag.

◆ operator<() [2/3]

template<class Tag >
KOKKOS_FUNCTION constexpr bool ddc::operator< ( DiscreteVector< Tag > const lhs,
DiscreteVector< Tag > const rhs 
)
constexpr

◆ operator<() [3/3]

◆ operator<<() [3/6]

std::ostream & ddc::operator<< ( std::ostream &  out,
DiscreteVector<> const  
)
inline

◆ operator<<() [4/6]

template<class Head , class... Tags>
std::ostream & ddc::operator<< ( std::ostream &  out,
DiscreteVector< Head, Tags... > const arr 
)

◆ for_each()

template<class... DDims, class Functor >
void ddc::for_each ( DiscreteDomain< DDims... > const domain,
Functor &&  f 
)
noexcept

iterates over a nD domain in serial

Parameters
[in]domainthe domain over which to iterate
[in]fa functor taking an index as parameter

◆ init_fourier_space()

template<typename DDimFx , typename DDimX >
DDimFx::template Impl< DDimFx, Kokkos::HostSpace > ddc::init_fourier_space ( ddc::DiscreteDomain< DDimX x_mesh)

Initialize a Fourier discrete dimension.

Initialize the (1D) discrete space representing the Fourier discrete dimension associated to the (1D) mesh passed as argument. It is a N-periodic PeriodicSampling with a periodic window of width 2*pi/dx.

This value comes from the Nyquist-Shannon theorem: the period of the spectral domain is N*dk = 2*pi/dx. Adding to this the relations dx = (xmax-xmin)/(N-1), and dk = (kmax-kmin)/(N-1), we get kmax-kmin = 2*pi*(N-1)^2/N/(xmax-xmin), which is used in the implementation (xmax, xmin, kmin and kmax are the centers of lower and upper cells inside a single period of the meshes).

Template Parameters
DDimFxA PeriodicSampling representing the Fourier discrete dimension.
DDimXThe type of the original discrete dimension.
Parameters
x_meshThe DiscreteDomain representing the (1D) original mesh.
Returns
The initialized Impl representing the discrete Fourier space.
See also
PeriodicSampling

◆ FourierMesh()

template<typename... DDimFx, typename... DDimX>
ddc::DiscreteDomain< DDimFx... > ddc::FourierMesh ( ddc::DiscreteDomain< DDimX... >  x_mesh,
bool  C2C 
)

Get the Fourier mesh.

Compute the Fourier (or spectral) mesh on which the Discrete Fourier Transform of a discrete function is defined.

Parameters
x_meshThe DiscreteDomain representing the original mesh.
C2CA flag indicating if a complex-to-complex DFT is going to be performed. Indeed, in this case the two meshes have same number of points, whereas for real-to-complex or complex-to-real DFT, each complex value of the Fourier-transformed function contains twice more information, and thus only half (actually Nx*Ny*(Nz/2+1) for 3D R2C FFT to take in account mode 0) values are needed (cf. DFT conjugate symmetry property for more information about this).
Returns
The domain representing the Fourier mesh.

◆ fft()

template<typename Tin , typename Tout , typename... DDimFx, typename... DDimX, typename ExecSpace , typename MemorySpace , typename LayoutIn , typename LayoutOut >
void ddc::fft ( ExecSpace const exec_space,
ddc::ChunkSpan< Tout, ddc::DiscreteDomain< DDimFx... >, LayoutOut, MemorySpace out,
ddc::ChunkSpan< Tin, ddc::DiscreteDomain< DDimX... >, LayoutIn, MemorySpace in,
ddc::kwArgs_fft  kwargs = {ddc::FFT_Normalization::OFF} 
)

Perform a direct Fast Fourier Transform.

Compute the discrete Fourier transform of a function using the specialized implementation for the Kokkos::ExecutionSpace of the FFT algorithm.

Template Parameters
TinThe type of the input elements (float, Kokkos::complex<float>, double or Kokkos::complex<double>).
ToutThe type of the output elements (Kokkos::complex<float> or Kokkos::complex<double>).
DDimFx...The parameter pack of the Fourier discrete dimensions.
DDimX...The parameter pack of the original discrete dimensions.
ExecSpaceThe type of the Kokkos::ExecutionSpace on which the FFT is performed. It determines which specialized backend is used (ie. fftw, cuFFT...).
MemorySpaceThe type of the Kokkos::MemorySpace on which are stored the input and output discrete functions.
LayoutInThe layout of the Chunkspan representing the input discrete function.
LayoutOutThe layout of the Chunkspan representing the output discrete function.
Parameters
exec_spaceThe Kokkos::ExecutionSpace on which the FFT is performed.
outThe output discrete function, represented as a ChunkSpan storing values on a spectral mesh.
inThe input discrete function, represented as a ChunkSpan storing values on a mesh.
kwargsThe kwArgs_fft configuring the FFT.

◆ ifft()

template<typename Tin , typename Tout , typename... DDimX, typename... DDimFx, typename ExecSpace , typename MemorySpace , typename LayoutIn , typename LayoutOut >
void ddc::ifft ( ExecSpace const exec_space,
ddc::ChunkSpan< Tout, ddc::DiscreteDomain< DDimX... >, LayoutOut, MemorySpace out,
ddc::ChunkSpan< Tin, ddc::DiscreteDomain< DDimFx... >, LayoutIn, MemorySpace in,
ddc::kwArgs_fft  kwargs = {ddc::FFT_Normalization::OFF} 
)

Perform an inverse Fast Fourier Transform.

Compute the inverse discrete Fourier transform of a spectral function using the specialized implementation for the Kokkos::ExecutionSpace of the iFFT algorithm.

/!\ C2R iFFT does NOT preserve input !

Template Parameters
TinThe type of the input elements (Kokkos::complex<float> or Kokkos::complex<double>).
ToutThe type of the output elements (float, Kokkos::complex<float>, double or Kokkos::complex<double>).
DDimX...The parameter pack of the original discrete dimensions.
DDimFx...The parameter pack of the Fourier discrete dimensions.
ExecSpaceThe type of the Kokkos::ExecutionSpace on which the iFFT is performed. It determines which specialized backend is used (ie. fftw, cuFFT...).
MemorySpaceThe type of the Kokkos::MemorySpace on which are stored the input and output discrete functions.
LayoutInThe layout of the Chunkspan representing the input discrete function.
LayoutOutThe layout of the Chunkspan representing the output discrete function.
Parameters
exec_spaceThe Kokkos::ExecutionSpace on which the iFFT is performed.
outThe output discrete function, represented as a ChunkSpan storing values on a mesh.
inThe input discrete function, represented as a ChunkSpan storing values on a spectral mesh.
kwargsThe kwArgs_fft configuring the iFFT.

◆ n_boundary_equations()

constexpr int ddc::n_boundary_equations ( ddc::BoundCond const  bc,
std::size_t const  degree 
)
constexpr

Return the number of equations needed to describe a given boundary condition.

Parameters
bcThe boundary condition.
degreeThe degree of the spline.
Returns
The number of equations.

◆ as_span() [1/2]

template<class ElementType , std::size_t N>
Span1D< ElementType > ddc::as_span ( std::array< ElementType, N > &  arr)
noexcept

◆ as_span() [2/2]

template<class ElementType , std::size_t N>
Span1D< const ElementType > ddc::as_span ( std::array< ElementType, N > const arr)
noexcept

◆ operator<<() [5/6]

std::ostream & ddc::operator<< ( std::ostream &  os,
std::experimental::mdspan< ElementType, Extents, Layout, Accessor > const s 
)

Convenient function to dump a mdspan, it recursively prints all dimensions.

Disclaimer: use with caution for large arrays

◆ operator==() [3/3]

template<class T , class MST , class U , class MSU >
constexpr bool ddc::operator== ( KokkosAllocator< T, MST > const ,
KokkosAllocator< U, MSU > const  
)
constexprnoexcept

◆ operator!=() [3/3]

template<class T , class MST , class U , class MSU >
constexpr bool ddc::operator!= ( KokkosAllocator< T, MST > const ,
KokkosAllocator< U, MSU > const  
)
constexprnoexcept

◆ operator<<() [6/6]

template<class DDimImpl , std::enable_if_t< is_non_uniform_point_sampling_v< typename DDimImpl::discrete_dimension_type >, int > = 0>
std::ostream & ddc::operator<< ( std::ostream &  out,
DDimImpl const mesh 
)

◆ coordinate() [2/3]

template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > ddc::coordinate ( DiscreteElement< DDim > const c)

◆ distance_at_left()

template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > ddc::distance_at_left ( DiscreteElement< DDim i)

◆ distance_at_right()

template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > ddc::distance_at_right ( DiscreteElement< DDim i)

◆ rmin()

template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > ddc::rmin ( DiscreteDomain< DDim > const d)

◆ rmax()

template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > ddc::rmax ( DiscreteDomain< DDim > const d)

◆ rlength()

template<class DDim , std::enable_if_t< is_non_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > ddc::rlength ( DiscreteDomain< DDim > const d)

◆ parallel_deepcopy() [1/2]

template<class ChunkDst , class ChunkSrc >
auto ddc::parallel_deepcopy ( ChunkDst &&  dst,
ChunkSrc &&  src 
)

Copy the content of a borrowed chunk into another.

Parameters
[out]dstthe borrowed chunk in which to copy
[in]srcthe borrowed chunk from which to copy
Returns
dst as a ChunkSpan

◆ parallel_deepcopy() [2/2]

auto ddc::parallel_deepcopy ( ExecSpace const execution_space,
ChunkDst &&  dst,
ChunkSrc &&  src 
)

Copy the content of a borrowed chunk into another.

Parameters
[in]execution_spacea Kokkos execution space where the loop will be executed on
[out]dstthe borrowed chunk in which to copy
[in]srcthe borrowed chunk from which to copy
Returns
dst as a ChunkSpan

◆ parallel_fill() [1/2]

template<class ChunkDst , class T >
auto ddc::parallel_fill ( ChunkDst &&  dst,
T const value 
)

Fill a borrowed chunk with a given value.

Parameters
[out]dstthe borrowed chunk in which to copy
[in]valuethe value to fill dst
Returns
dst as a ChunkSpan

◆ parallel_fill() [2/2]

template<class ExecSpace , class ChunkDst , class T >
auto ddc::parallel_fill ( ExecSpace const execution_space,
ChunkDst &&  dst,
T const value 
)

Fill a borrowed chunk with a given value.

Parameters
[in]execution_spacea Kokkos execution space where the loop will be executed on
[out]dstthe borrowed chunk in which to copy
[in]valuethe value to fill dst
Returns
dst as a ChunkSpan

◆ parallel_for_each() [1/4]

template<class ExecSpace , class... DDims, class Functor >
void ddc::parallel_for_each ( std::string const label,
ExecSpace const execution_space,
DiscreteDomain< DDims... > const domain,
Functor &&  f 
)
noexcept

iterates over a nD domain using a given Kokkos execution space

Parameters
[in]labelname for easy identification of the parallel_for_each algorithm
[in]execution_spacea Kokkos execution space where the loop will be executed on
[in]domainthe domain over which to iterate
[in]fa functor taking an index as parameter

◆ parallel_for_each() [2/4]

template<class ExecSpace , class... DDims, class Functor >
std::enable_if_t< Kokkos::is_execution_space_v< ExecSpace > > ddc::parallel_for_each ( ExecSpace const execution_space,
DiscreteDomain< DDims... > const domain,
Functor &&  f 
)
noexcept

iterates over a nD domain using a given Kokkos execution space

Parameters
[in]execution_spacea Kokkos execution space where the loop will be executed on
[in]domainthe domain over which to iterate
[in]fa functor taking an index as parameter

◆ parallel_for_each() [3/4]

template<class... DDims, class Functor >
void ddc::parallel_for_each ( std::string const label,
DiscreteDomain< DDims... > const domain,
Functor &&  f 
)
noexcept

iterates over a nD domain using the Kokkos default execution space

Parameters
[in]labelname for easy identification of the parallel_for_each algorithm
[in]domainthe domain over which to iterate
[in]fa functor taking an index as parameter

◆ parallel_for_each() [4/4]

template<class... DDims, class Functor >
void ddc::parallel_for_each ( DiscreteDomain< DDims... > const domain,
Functor &&  f 
)
noexcept

iterates over a nD domain using the Kokkos default execution space

Parameters
[in]domainthe domain over which to iterate
[in]fa functor taking an index as parameter

◆ parallel_transform_reduce() [1/4]

template<class ExecSpace , class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
T ddc::parallel_transform_reduce ( std::string const label,
ExecSpace const execution_space,
DiscreteDomain< DDims... > const domain,
neutral,
BinaryReductionOp &&  reduce,
UnaryTransformOp &&  transform 
)
noexcept

A reduction over a nD domain using a given Kokkos execution space.

Parameters
[in]labelname for easy identification of the parallel_for_each algorithm
[in]execution_spacea Kokkos execution space where the loop will be executed on
[in]domainthe range over which to apply the algorithm
[in]neutralthe neutral element of the reduction operation
[in]reducea binary FunctionObject that will be applied in unspecified order to the results of transform, the results of other reduce and neutral.
[in]transforma unary FunctionObject that will be applied to each element of the input range. The return type must be acceptable as input to reduce

◆ parallel_transform_reduce() [2/4]

template<class ExecSpace , class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
std::enable_if_t< Kokkos::is_execution_space_v< ExecSpace >, T > ddc::parallel_transform_reduce ( ExecSpace const execution_space,
DiscreteDomain< DDims... > const domain,
neutral,
BinaryReductionOp &&  reduce,
UnaryTransformOp &&  transform 
)
noexcept

A reduction over a nD domain using a given Kokkos execution space.

Parameters
[in]execution_spacea Kokkos execution space where the loop will be executed on
[in]domainthe range over which to apply the algorithm
[in]neutralthe neutral element of the reduction operation
[in]reducea binary FunctionObject that will be applied in unspecified order to the results of transform, the results of other reduce and neutral.
[in]transforma unary FunctionObject that will be applied to each element of the input range. The return type must be acceptable as input to reduce

◆ parallel_transform_reduce() [3/4]

template<class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
T ddc::parallel_transform_reduce ( std::string const label,
DiscreteDomain< DDims... > const domain,
neutral,
BinaryReductionOp &&  reduce,
UnaryTransformOp &&  transform 
)
noexcept

A reduction over a nD domain using the Kokkos default execution space.

Parameters
[in]labelname for easy identification of the parallel_for_each algorithm
[in]domainthe range over which to apply the algorithm
[in]neutralthe neutral element of the reduction operation
[in]reducea binary FunctionObject that will be applied in unspecified order to the results of transform, the results of other reduce and neutral.
[in]transforma unary FunctionObject that will be applied to each element of the input range. The return type must be acceptable as input to reduce

◆ parallel_transform_reduce() [4/4]

template<class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
T ddc::parallel_transform_reduce ( DiscreteDomain< DDims... > const domain,
neutral,
BinaryReductionOp &&  reduce,
UnaryTransformOp &&  transform 
)
noexcept

A reduction over a nD domain using the Kokkos default execution space.

Parameters
[in]domainthe range over which to apply the algorithm
[in]neutralthe neutral element of the reduction operation
[in]reducea binary FunctionObject that will be applied in unspecified order to the results of transform, the results of other reduce and neutral.
[in]transforma unary FunctionObject that will be applied to each element of the input range. The return type must be acceptable as input to reduce

◆ expose_to_pdi() [1/2]

template<PDI_inout_t access, class DataType >
void ddc::expose_to_pdi ( std::string const name,
DataType &&  data 
)

◆ expose_to_pdi() [2/2]

template<class DataType >
void ddc::expose_to_pdi ( std::string const name,
DataType &&  data 
)

◆ origin() [1/2]

template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_periodic_sampling_v< DDim >, Coordinate< typename DDim::continuous_dimension_type > > ddc::origin ( )
noexcept

Lower bound index of the mesh.

◆ front() [2/3]

template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_periodic_sampling_v< DDim >, DiscreteElement< DDim > > ddc::front ( )
noexcept

Lower bound index of the mesh.

◆ step() [1/2]

template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_periodic_sampling_v< DDim >, Real > ddc::step ( )
noexcept

Spacing step of the mesh.

◆ transform_reduce()

template<class... DDims, class T , class BinaryReductionOp , class UnaryTransformOp >
T ddc::transform_reduce ( DiscreteDomain< DDims... > const domain,
neutral,
BinaryReductionOp &&  reduce,
UnaryTransformOp &&  transform 
)
noexcept

A reduction over a nD domain in serial.

Parameters
[in]domainthe range over which to apply the algorithm
[in]neutralthe neutral element of the reduction operation
[in]reducea binary FunctionObject that will be applied in unspecified order to the results of transform, the results of other reduce and neutral.
[in]transforma unary FunctionObject that will be applied to each element of the input range. The return type must be acceptable as input to reduce

◆ coordinate() [3/3]

template<class DDim , std::enable_if_t< is_uniform_point_sampling_v< DDim >, int > = 0>
KOKKOS_FUNCTION constexpr Coordinate< typename DDim::continuous_dimension_type > ddc::coordinate ( DiscreteElement< DDim > const c)
constexpr

◆ origin() [2/2]

template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_uniform_point_sampling_v< DDim >, Coordinate< typename DDim::continuous_dimension_type > > ddc::origin ( )
noexcept

Lower bound index of the mesh.

◆ front() [3/3]

template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_uniform_point_sampling_v< DDim >, DiscreteElement< DDim > > ddc::front ( )
noexcept

Lower bound index of the mesh.

◆ step() [2/2]

template<class DDim >
KOKKOS_FUNCTION std::enable_if_t< is_uniform_point_sampling_v< DDim >, Real > ddc::step ( )
noexcept

Spacing step of the mesh.

Variable Documentation

◆ enable_chunk< Chunk< ElementType, SupportType, Allocator > >

◆ enable_chunk< ChunkSpan< ElementType, SupportType, LayoutStridedPolicy, MemorySpace > >

◆ enable_borrowed_chunk< ChunkSpan< ElementType, SupportType, LayoutStridedPolicy, MemorySpace > >

◆ enable_borrowed_chunk

template<class T >
constexpr bool ddc::enable_borrowed_chunk = false
inlineconstexpr

◆ enable_chunk

template<class T >
constexpr bool ddc::enable_chunk = false
inlineconstexpr

◆ is_chunk_v

template<class T >
constexpr bool ddc::is_chunk_v = enable_chunk<std::remove_const_t<std::remove_reference_t<T>>>
inlineconstexpr

◆ is_borrowed_chunk_v

template<class T >
constexpr bool ddc::is_borrowed_chunk_v
inlineconstexpr
Initial value:
T> && (std::is_lvalue_reference_v<T> || enable_borrowed_chunk<std::remove_cv_t<std::remove_reference_t<T>>>)
constexpr bool is_chunk_v
Definition chunk_traits.hpp:19

◆ is_writable_chunk_v

template<class T >
constexpr bool ddc::is_writable_chunk_v = !std::is_const_v<std::remove_pointer_t<chunk_pointer_t<T>>>
inlineconstexpr

◆ is_discrete_domain_v

template<class T >
constexpr bool ddc::is_discrete_domain_v = is_discrete_domain<T>::value
inlineconstexpr

◆ is_discrete_element_v

template<class T >
constexpr bool ddc::is_discrete_element_v = is_discrete_element<T>::value
inlineconstexpr

◆ is_discrete_vector_v

template<class T >
constexpr bool ddc::is_discrete_vector_v = is_discrete_vector<T>::value
inlineconstexpr

◆ is_non_uniform_bsplines_v

template<class DDim >
constexpr bool ddc::is_non_uniform_bsplines_v = is_non_uniform_bsplines<DDim>::value
constexpr

Indicates if a tag corresponds to non-uniform B-splines or not.

Template Parameters
Thepresumed non-uniform B-splines.

◆ is_uniform_bsplines_v

template<class DDim >
constexpr bool ddc::is_uniform_bsplines_v = is_uniform_bsplines<DDim>::value
constexpr

Indicates if a tag corresponds to uniform B-splines or not.

Template Parameters
Thepresumed uniform B-splines.

◆ is_non_uniform_point_sampling_v

template<class DDim >
constexpr bool ddc::is_non_uniform_point_sampling_v = is_non_uniform_point_sampling<DDim>::value
constexpr

◆ is_periodic_sampling_v

template<class DDim >
constexpr bool ddc::is_periodic_sampling_v = is_periodic_sampling<DDim>::value
constexpr

◆ is_uniform_point_sampling_v

template<class DDim >
constexpr bool ddc::is_uniform_point_sampling_v = is_uniform_point_sampling<DDim>::value
constexpr