13#include <Kokkos_Core.hpp>
22
23
24
25
26
27
28
29
30
31
32
33
34
35
42 using continuous_dimension_type = BSplines::continuous_dimension_type;
46
47
48
49
50 template <
typename Sampling,
typename U = BSplines>
53 if constexpr (
ddc::is_uniform_point_sampling_v<Sampling>) {
54 return std::get<0>(Sampling::
55 init(
ddc::discrete_space<BSplines>().rmin(),
56 ddc::discrete_space<BSplines>().rmax(),
58 ddc::discrete_space<BSplines>().ncells() + 1)));
60 using SamplingImpl = Sampling::
template Impl<Sampling, Kokkos::HostSpace>;
62 ddc::discrete_space<BSplines>().break_point_domain().remove_last(
65 std::vector<
double> break_points(break_point_domain.size());
68 [&](
ddc::DiscreteElement<knot_discrete_dimension_t<BSplines>> ik) {
69 break_points[ik - break_point_domain.front()] =
ddc::coordinate(ik);
71 return SamplingImpl(break_points);
76 using interpolation_discrete_dimension_type = std::conditional_t<
77 is_uniform_bsplines_v<BSplines>,
82
83
84
85
86 template <
typename Sampling>
89 int const npoints =
ddc::discrete_space<BSplines>().ncells() + !BSplines::is_periodic();
91 ddc::DiscreteElement<Sampling>(0),
friend class DiscreteDomain
KOKKOS_FUNCTION constexpr bool operator!=(DiscreteVector< OTags... > const &rhs) const noexcept
A class which provides helper functions to initialise the Greville points from a B-Spline definition.
static ddc::DiscreteDomain< Sampling > get_domain()
Get the domain which gives us access to all of the Greville points.
Helper class for the initialisation of the mesh of interpolation points.
static auto get_sampling()
Get the sampling of interpolation points.
static ddc::DiscreteDomain< Sampling > get_domain()
Get the domain which can be used to access the interpolation points in the sampling.
The top-level namespace of DDC.
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.
constexpr bool is_uniform_bsplines_v
Indicates if a tag corresponds to uniform B-splines or not.
BoundCond
An enum representing a spline boundary condition.
@ HOMOGENEOUS_HERMITE
Homogeneous Hermite boundary condition (derivatives are 0)
@ GREVILLE
Use Greville points instead of conditions on derivative for B-Spline interpolation.
@ HERMITE
Hermite boundary condition.
@ PERIODIC
Periodic boundary condition u(1)=u(n)
ddc::ChunkSpan< double, ddc::DiscreteDomain< DDim >, Layout, MemorySpace > integrals(ExecSpace const &execution_space, ddc::ChunkSpan< double, ddc::DiscreteDomain< DDim >, Layout, MemorySpace > int_vals)
Compute the integrals of the B-splines.
constexpr bool is_non_uniform_bsplines_v
Indicates if a tag corresponds to non-uniform B-splines or not.
A templated struct representing a discrete dimension storing the derivatives of a function along a co...
If the type DDim is a B-spline, defines type to the discrete dimension of the associated knots.