DDC 0.1.0
Loading...
Searching...
No Matches
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... >
 
struct  cartesian_prod<>
 
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 = Kokkos::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 = Kokkos::mdspan< ElementType, Kokkos::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_v<KokkosView>>>
 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 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... > fourier_mesh (ddc::DiscreteDomain< DDimX... > x_mesh, bool C2C)
 Get the Fourier mesh.
 
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.
 
template<class ExecSpace , class DDim , class Layout , class MemorySpace >
ddc::ChunkSpan< double, ddc::DiscreteDomain< DDim >, Layout, MemorySpaceintegrals (ExecSpace const &execution_space, ddc::ChunkSpan< double, ddc::DiscreteDomain< DDim >, Layout, MemorySpace > int_vals)
 Compute the integrals of the B-splines.
 
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 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 >

Definition at line 397 of file discrete_domain.hpp.

Collaboration diagram for ddc::cartesian_prod< DDom >:
Collaboration graph

◆ 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... > >

Definition at line 400 of file discrete_domain.hpp.

Collaboration diagram for ddc::cartesian_prod< ddc::DiscreteDomain< DDim1... >, ddc::DiscreteDomain< DDim2... > >:
Collaboration graph
Class Members
typedef DiscreteDomain< DDim1..., DDim2... > type

◆ ddc::cartesian_prod< DDom >

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

Definition at line 406 of file discrete_domain.hpp.

Collaboration diagram for ddc::cartesian_prod< DDom >:
Collaboration graph
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... >

Definition at line 418 of file discrete_domain.hpp.

Collaboration diagram for ddc::cartesian_prod< DDom1, DDom2, Tail... >:
Collaboration graph
Class Members
typedef typename type, Tail... >::type type

◆ ddc::cartesian_prod<>

struct ddc::cartesian_prod<>

Definition at line 412 of file discrete_domain.hpp.

Collaboration diagram for ddc::cartesian_prod<>:
Collaboration graph
Class Members
typedef DiscreteDomain<> type

◆ ddc::Chunk

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

Definition at line 22 of file chunk.hpp.

Collaboration diagram for ddc::Chunk< ElementType, class, Allocator >:
Collaboration graph

◆ ddc::chunk_traits

struct ddc::chunk_traits
template<class T>
struct ddc::chunk_traits< T >

Definition at line 28 of file chunk_traits.hpp.

Collaboration diagram for ddc::chunk_traits< T >:
Collaboration graph
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 >

Definition at line 33 of file chunk_common.hpp.

Collaboration diagram for ddc::ChunkCommon< ElementType, SupportType, LayoutStridedPolicy >:
Collaboration graph

◆ ddc::ChunkSpan

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

Definition at line 30 of file chunk_span.hpp.

Collaboration diagram for ddc::ChunkSpan< ElementType, SupportType, LayoutStridedPolicy, MemorySpace >:
Collaboration graph

◆ ddc::ConstantExtrapolationRule

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

Definition at line 18 of file constant_extrapolation_rule.hpp.

Collaboration diagram for ddc::ConstantExtrapolationRule< DimI, Dim >:
Collaboration graph

◆ ddc::coordinate_of

struct ddc::coordinate_of
template<class T>
struct ddc::coordinate_of< T >

Definition at line 42 of file coordinate.hpp.

Collaboration diagram for ddc::coordinate_of< T >:
Collaboration graph
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.

Definition at line 14 of file deriv.hpp.

Collaboration diagram for ddc::Deriv< CDim >:
Collaboration graph

◆ 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.

Definition at line 24 of file fft.hpp.

Collaboration diagram for ddc::Fourier< Dim >:
Collaboration graph

◆ 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.

Definition at line 16 of file knot_discrete_dimension_type.hpp.

Collaboration diagram for ddc::KnotDiscreteDimension< DDim >:
Collaboration graph
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

Definition at line 394 of file fft.hpp.

Collaboration diagram for ddc::kwArgs_fft:
Collaboration graph
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

Definition at line 38 of file chunk_traits.hpp.

◆ chunk_pointer_t

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

Definition at line 41 of file chunk_traits.hpp.

◆ chunk_reference_t

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

Definition at line 44 of file chunk_traits.hpp.

◆ CoordinateElement

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

Definition at line 21 of file coordinate.hpp.

◆ 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.

Definition at line 29 of file coordinate.hpp.

◆ coordinate_of_t

Helper type of ddc::coordinate_of.

Definition at line 50 of file coordinate.hpp.

◆ cartesian_prod_t

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

Definition at line 425 of file discrete_domain.hpp.

◆ remove_dims_of_t

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

Definition at line 455 of file discrete_domain.hpp.

◆ replace_dim_of_t

Definition at line 500 of file discrete_domain.hpp.

◆ DiscreteElementType

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

Definition at line 50 of file discrete_element.hpp.

◆ DiscreteVectorElement

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

Definition at line 49 of file discrete_vector.hpp.

◆ knot_discrete_dimension_t

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

Definition at line 29 of file knot_discrete_dimension_type.hpp.

◆ SpanND

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

Definition at line 83 of file view.hpp.

◆ ViewND

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

Definition at line 86 of file view.hpp.

◆ Span1D

Definition at line 89 of file view.hpp.

◆ Span2D

Definition at line 92 of file view.hpp.

◆ View1D

Definition at line 95 of file view.hpp.

◆ View2D

Definition at line 98 of file view.hpp.

◆ DSpan1D

Definition at line 100 of file view.hpp.

◆ DSpan2D

Definition at line 102 of file view.hpp.

◆ CDSpan1D

Definition at line 104 of file view.hpp.

◆ CDSpan2D

Definition at line 106 of file view.hpp.

◆ DView1D

Definition at line 108 of file view.hpp.

◆ DView2D

Definition at line 110 of file view.hpp.

◆ DeviceAllocator

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

Definition at line 83 of file kokkos_allocator.hpp.

◆ HostAllocator

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

Definition at line 86 of file kokkos_allocator.hpp.

◆ Real

Definition at line 15 of file real_type.hpp.

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.

Definition at line 31 of file fft.hpp.

◆ 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.

Definition at line 41 of file fft.hpp.

◆ 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.

Definition at line 16 of file spline_boundary_conditions.hpp.

◆ 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)

Definition at line 32 of file spline_builder.hpp.

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

Definition at line 59 of file aligned_allocator.hpp.

◆ 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

Definition at line 67 of file aligned_allocator.hpp.

◆ 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

Definition at line 26 of file chunk_common.hpp.

◆ ChunkSpan()

template<class KokkosView , class... DDims, class = std::enable_if_t<Kokkos::is_view_v<KokkosView>>>
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)

Definition at line 32 of file coordinate.hpp.

◆ 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.

Definition at line 20 of file create_mirror.hpp.

◆ 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.

Definition at line 39 of file create_mirror.hpp.

◆ 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.

Definition at line 48 of file create_mirror.hpp.

◆ 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.

Definition at line 67 of file create_mirror.hpp.

◆ 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.

Definition at line 76 of file create_mirror.hpp.

◆ 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.

Definition at line 100 of file create_mirror.hpp.

◆ 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.

Definition at line 109 of file create_mirror.hpp.

◆ 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.

Definition at line 130 of file create_mirror.hpp.

◆ select() [1/5]

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

Definition at line 370 of file discrete_domain.hpp.

◆ 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

Definition at line 429 of file discrete_domain.hpp.

◆ 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

Definition at line 444 of file discrete_domain.hpp.

◆ 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

Definition at line 480 of file discrete_domain.hpp.

◆ extents()

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

Definition at line 507 of file discrete_domain.hpp.

◆ front() [1/3]

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

Definition at line 514 of file discrete_domain.hpp.

◆ back()

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

Definition at line 521 of file discrete_domain.hpp.

◆ uid() [1/4]

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

Definition at line 53 of file discrete_element.hpp.

◆ uid() [2/4]

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

Definition at line 59 of file discrete_element.hpp.

◆ uid() [3/4]

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

Definition at line 65 of file discrete_element.hpp.

◆ uid() [4/4]

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

Definition at line 72 of file discrete_element.hpp.

◆ uid_or()

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

Definition at line 78 of file discrete_element.hpp.

◆ select() [2/5]

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

Definition at line 86 of file discrete_element.hpp.

◆ select() [3/5]

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

Definition at line 93 of file discrete_element.hpp.

◆ 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.

Definition at line 108 of file discrete_element.hpp.

◆ operator<<() [1/5]

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

Definition at line 305 of file discrete_element.hpp.

◆ operator<<() [2/5]

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

Definition at line 312 of file discrete_element.hpp.

◆ operator==() [2/3]

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

Definition at line 323 of file discrete_element.hpp.

◆ operator!=() [2/3]

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

Definition at line 333 of file discrete_element.hpp.

◆ operator<() [1/3]

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

Definition at line 342 of file discrete_element.hpp.

◆ operator<=()

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

Definition at line 350 of file discrete_element.hpp.

◆ operator>()

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

Definition at line 358 of file discrete_element.hpp.

◆ operator>=()

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

Definition at line 366 of file discrete_element.hpp.

◆ 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: +, -

Definition at line 376 of file discrete_element.hpp.

◆ 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

Definition at line 392 of file discrete_element.hpp.

◆ operator-() [1/7]

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

Definition at line 400 of file discrete_element.hpp.

◆ 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

Definition at line 416 of file discrete_element.hpp.

◆ 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: -

Definition at line 426 of file discrete_element.hpp.

◆ 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

Definition at line 170 of file discrete_space.hpp.

◆ 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

Definition at line 201 of file discrete_space.hpp.

◆ 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

Definition at line 213 of file discrete_space.hpp.

◆ 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.

Definition at line 226 of file discrete_space.hpp.

◆ is_discrete_space_initialized()

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

Definition at line 246 of file discrete_space.hpp.

◆ host_discrete_space()

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

Definition at line 252 of file discrete_space.hpp.

◆ get() [1/2]

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

Definition at line 52 of file discrete_vector.hpp.

◆ get() [2/2]

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

Definition at line 59 of file discrete_vector.hpp.

◆ get_or()

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

Definition at line 65 of file discrete_vector.hpp.

◆ operator+() [3/6]

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

Unary operators: +, -.

Definition at line 75 of file discrete_vector.hpp.

◆ operator-() [4/7]

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

Definition at line 81 of file discrete_vector.hpp.

◆ 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: +, -.

Definition at line 89 of file discrete_vector.hpp.

◆ operator-() [5/7]

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

Definition at line 108 of file discrete_vector.hpp.

◆ 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

Definition at line 127 of file discrete_vector.hpp.

◆ 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

Definition at line 135 of file discrete_vector.hpp.

◆ 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

Definition at line 143 of file discrete_vector.hpp.

◆ 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

Definition at line 151 of file discrete_vector.hpp.

◆ 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: *

Definition at line 164 of file discrete_vector.hpp.

◆ select() [4/5]

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

Definition at line 172 of file discrete_vector.hpp.

◆ select() [5/5]

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

Definition at line 179 of file discrete_vector.hpp.

◆ 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.

Definition at line 194 of file discrete_vector.hpp.

◆ operator<() [2/3]

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

Definition at line 433 of file discrete_vector.hpp.

◆ operator<() [3/3]

Definition at line 441 of file discrete_vector.hpp.

◆ operator<<() [3/5]

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

Definition at line 446 of file discrete_vector.hpp.

◆ operator<<() [4/5]

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

Definition at line 453 of file discrete_vector.hpp.

◆ 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

Definition at line 43 of file for_each.hpp.

◆ 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

Definition at line 308 of file fft.hpp.

◆ fourier_mesh()

template<typename... DDimFx, typename... DDimX>
ddc::DiscreteDomain< DDimFx... > ddc::fourier_mesh ( 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.

Definition at line 347 of file fft.hpp.

◆ 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.

Deprecated:
Use fourier_mesh instead.
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.

Definition at line 382 of file fft.hpp.

◆ 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.

Definition at line 430 of file fft.hpp.

◆ 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.

Warning
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.

Definition at line 483 of file fft.hpp.

◆ integrals()

Compute the integrals of the B-splines.

The integral of each of the B-splines over their support within the domain on which this basis was defined.

Parameters
[in]execution_spacea Kokkos execution space where the loop will be executed on
[out]int_valsThe values of the integrals. It has to be a 1D Chunkspan of size (nbasis).
Returns
The values of the integrals.

Definition at line 163 of file integrals.hpp.

◆ 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.

Definition at line 55 of file spline_boundary_conditions.hpp.

◆ 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

Definition at line 68 of file kokkos_allocator.hpp.

◆ 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

Definition at line 76 of file kokkos_allocator.hpp.

◆ operator<<() [5/5]

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 
)

Definition at line 225 of file non_uniform_point_sampling.hpp.

◆ 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)

Definition at line 231 of file non_uniform_point_sampling.hpp.

◆ 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)

Definition at line 238 of file non_uniform_point_sampling.hpp.

◆ 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)

Definition at line 245 of file non_uniform_point_sampling.hpp.

◆ 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)

Definition at line 252 of file non_uniform_point_sampling.hpp.

◆ 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)

Definition at line 259 of file non_uniform_point_sampling.hpp.

◆ 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)

Definition at line 266 of file non_uniform_point_sampling.hpp.

◆ 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

Definition at line 22 of file parallel_deepcopy.hpp.

◆ 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

Definition at line 41 of file parallel_deepcopy.hpp.

◆ 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

Definition at line 21 of file parallel_fill.hpp.

◆ 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

Definition at line 36 of file parallel_fill.hpp.

◆ 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

Definition at line 83 of file parallel_for_each.hpp.

◆ 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

Definition at line 98 of file parallel_for_each.hpp.

◆ 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

Definition at line 116 of file parallel_for_each.hpp.

◆ 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

Definition at line 129 of file parallel_for_each.hpp.

◆ 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

Definition at line 184 of file parallel_transform_reduce.hpp.

◆ 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

Definition at line 211 of file parallel_transform_reduce.hpp.

◆ 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

Definition at line 237 of file parallel_transform_reduce.hpp.

◆ 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

Definition at line 262 of file parallel_transform_reduce.hpp.

◆ expose_to_pdi() [1/2]

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

Definition at line 145 of file pdi.hpp.

◆ expose_to_pdi() [2/2]

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

Definition at line 151 of file pdi.hpp.

◆ 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.

Definition at line 269 of file periodic_sampling.hpp.

◆ 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.

Definition at line 277 of file periodic_sampling.hpp.

◆ 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.

Definition at line 284 of file periodic_sampling.hpp.

◆ 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

Definition at line 66 of file transform_reduce.hpp.

◆ 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

Definition at line 237 of file uniform_point_sampling.hpp.

◆ 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.

Definition at line 248 of file uniform_point_sampling.hpp.

◆ 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.

Definition at line 256 of file uniform_point_sampling.hpp.

◆ 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.

Definition at line 263 of file uniform_point_sampling.hpp.

Variable Documentation

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

Definition at line 25 of file chunk.hpp.

◆ 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

Definition at line 13 of file chunk_traits.hpp.

◆ enable_chunk

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

Definition at line 16 of file chunk_traits.hpp.

◆ is_chunk_v

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

Definition at line 19 of file chunk_traits.hpp.

◆ is_borrowed_chunk_v

template<class T >
constexpr bool ddc::is_borrowed_chunk_v
inlineconstexpr
Initial value:
= is_chunk_v<T>
&& (std::is_lvalue_reference_v<T>
|| enable_borrowed_chunk<std::remove_cv_t<std::remove_reference_t<T>>>)

Definition at line 22 of file chunk_traits.hpp.

◆ 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

Definition at line 47 of file chunk_traits.hpp.

◆ is_discrete_domain_v

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

Definition at line 38 of file discrete_domain.hpp.

◆ is_discrete_element_v

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

Definition at line 35 of file discrete_element.hpp.

◆ is_discrete_vector_v

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

Definition at line 34 of file discrete_vector.hpp.

◆ 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.

Definition at line 414 of file bsplines_non_uniform.hpp.

◆ 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.

Definition at line 394 of file bsplines_uniform.hpp.

◆ 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

Definition at line 217 of file non_uniform_point_sampling.hpp.

◆ is_periodic_sampling_v

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

Definition at line 253 of file periodic_sampling.hpp.

◆ is_uniform_point_sampling_v

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

Definition at line 222 of file uniform_point_sampling.hpp.