DDC 0.1.0
Loading...
Searching...
No Matches
ddc::PeriodicSampling< CDim > Class Template Reference

PeriodicSampling models a periodic discretization of the provided continuous dimension. More...

#include <periodic_sampling.hpp>

Inheritance diagram for ddc::PeriodicSampling< CDim >:
Inheritance graph
Collaboration diagram for ddc::PeriodicSampling< CDim >:
Collaboration graph

Classes

class  Impl
 

Public Types

using continuous_dimension_type = CDim
 
using continuous_element_type = Coordinate< CDim >
 
using discrete_dimension_type = PeriodicSampling
 

Public Member Functions

template<class DDim >
std::tuple< Impl< DDim, Kokkos::HostSpace >, DiscreteDomain< DDim >, DiscreteDomain< DDim >, DiscreteDomain< DDim >, DiscreteDomain< DDim > > init_ghosted (continuous_element_type a, continuous_element_type b, DiscreteVector< DDim > n, DiscreteVector< DDim > n_period, DiscreteVector< DDim > n_ghosts_before, DiscreteVector< DDim > n_ghosts_after)
 Construct a periodic DiscreteDomain from a segment \([a, b] \subset [a, +\infty[\) and a number of points n.
 
template<class DDim >
std::tuple< Impl< DDim, Kokkos::HostSpace >, DiscreteDomain< DDim >, DiscreteDomain< DDim >, DiscreteDomain< DDim >, DiscreteDomain< DDim > > init_ghosted (continuous_element_type a, continuous_element_type b, DiscreteVector< DDim > n, DiscreteVector< DDim > n_period, DiscreteVector< DDim > n_ghosts)
 Construct a periodic DiscreteDomain from a segment \([a, b] \subset [a, +\infty[\) and a number of points n.
 

Static Public Member Functions

template<class DDim >
static std::tuple< typename DDim::template Impl< DDim, Kokkos::HostSpace >, DiscreteDomain< DDim > > init (Coordinate< CDim > a, Coordinate< CDim > b, DiscreteVector< DDim > n, DiscreteVector< DDim > n_period)
 Construct a Impl<Kokkos::HostSpace> and associated discrete_domain_type from a segment \([a, b] \subset [a, +\infty[\) and a number of points n.
 

Detailed Description

template<class CDim>
class ddc::PeriodicSampling< CDim >

PeriodicSampling models a periodic discretization of the provided continuous dimension.

Definition at line 36 of file periodic_sampling.hpp.

Member Typedef Documentation

◆ continuous_dimension_type

template<class CDim >
using ddc::PeriodicSampling< CDim >::continuous_dimension_type = CDim

Definition at line 39 of file periodic_sampling.hpp.

◆ continuous_element_type

template<class CDim >
using ddc::PeriodicSampling< CDim >::continuous_element_type = Coordinate<CDim>

Definition at line 41 of file periodic_sampling.hpp.

◆ discrete_dimension_type

template<class CDim >
using ddc::PeriodicSampling< CDim >::discrete_dimension_type = PeriodicSampling

Definition at line 44 of file periodic_sampling.hpp.

Member Function Documentation

◆ init()

template<class CDim >
template<class DDim >
static std::tuple< typename DDim::template Impl< DDim, Kokkos::HostSpace >, DiscreteDomain< DDim > > ddc::PeriodicSampling< CDim >::init ( Coordinate< CDim a,
Coordinate< CDim b,
DiscreteVector< DDim n,
DiscreteVector< DDim n_period 
)
inlinestatic

Construct a Impl<Kokkos::HostSpace> and associated discrete_domain_type from a segment \([a, b] \subset [a, +\infty[\) and a number of points n.

Note that there is no guarantee that either the boundaries a or b will be exactly represented in the sampling. One should expect usual floating point rounding errors.

Parameters
acoordinate of the first point of the domain
bcoordinate of the last point of the domain
nnumber of points to map on the segment \([a, b]\) including a & b
n_periodthe number of steps in a period

Definition at line 152 of file periodic_sampling.hpp.

◆ init_ghosted() [1/2]

template<class CDim >
template<class DDim >
std::tuple< Impl< DDim, Kokkos::HostSpace >, DiscreteDomain< DDim >, DiscreteDomain< DDim >, DiscreteDomain< DDim >, DiscreteDomain< DDim > > ddc::PeriodicSampling< CDim >::init_ghosted ( continuous_element_type  a,
continuous_element_type  b,
DiscreteVector< DDim n,
DiscreteVector< DDim n_period,
DiscreteVector< DDim n_ghosts_before,
DiscreteVector< DDim n_ghosts_after 
)
inline

Construct a periodic DiscreteDomain from a segment \([a, b] \subset [a, +\infty[\) and a number of points n.

Note that there is no guarantee that either the boundaries a or b will be exactly represented in the sampling. One should expect usual floating point rounding errors.

Parameters
acoordinate of the first point of the domain
bcoordinate of the last point of the domain
nthe number of points to map the segment \([a, b]\) including a & b
n_periodthe number of steps in a period
n_ghosts_beforenumber of additional "ghost" points before the segment
n_ghosts_afternumber of additional "ghost" points after the segment

Definition at line 185 of file periodic_sampling.hpp.

◆ init_ghosted() [2/2]

template<class CDim >
template<class DDim >
std::tuple< Impl< DDim, Kokkos::HostSpace >, DiscreteDomain< DDim >, DiscreteDomain< DDim >, DiscreteDomain< DDim >, DiscreteDomain< DDim > > ddc::PeriodicSampling< CDim >::init_ghosted ( continuous_element_type  a,
continuous_element_type  b,
DiscreteVector< DDim n,
DiscreteVector< DDim n_period,
DiscreteVector< DDim n_ghosts 
)
inline

Construct a periodic DiscreteDomain from a segment \([a, b] \subset [a, +\infty[\) and a number of points n.

Note that there is no guarantee that either the boundaries a or b will be exactly represented in the sampling. One should expect usual floating point rounding errors.

Parameters
acoordinate of the first point of the domain
bcoordinate of the last point of the domain
nthe number of points to map the segment \([a, b]\) including a & b
n_periodthe number of steps in a period
n_ghostsnumber of additional "ghost" points before and after the segment

Definition at line 236 of file periodic_sampling.hpp.


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