13#include "spline_boundary_conditions.hpp"
24template <
class BSplines, ddc::BoundCond BcXmin, ddc::BoundCond BcXmax>
27 using tag_type =
typename BSplines::tag_type;
29 template <
class Sampling>
30 struct IntermediateUniformSampling
35 template <
class Sampling>
36 struct IntermediateNonUniformSampling
41 template <
class Sampling,
typename U = BSplines,
class = std::enable_if_t<U::is_uniform()>>
42 static auto uniform_greville_points()
46 double constexpr shift = (BSplines::degree() % 2 == 0) ? 0.5 : 0.0;
55 template <
class Sampling,
typename U = BSplines,
class = std::enable_if_t<!U::is_uniform()>>
56 static auto non_uniform_greville_points()
61 if constexpr (U::is_periodic()) {
73 for (std::size_t
i(0);
i < BSplines::degree(); ++
i) {
80 std::vector<double>
temp_knots(BSplines::degree());
82 if constexpr (U::is_periodic()) {
94 for (
int i = 0;
i < npoints; ++
i) {
110 static constexpr bool is_uniform_mesh_v
111 = U::is_uniform() && ((N_BE_MIN != 0 && N_BE_MAX != 0) || U::is_periodic());
148 if constexpr (U::is_uniform()) {
157 for (std::size_t
i(0);
i < BSplines::degree() / 2 + 1; ++
i) {
160 for (std::size_t
j(0);
j <
i; ++
j) {
163 BSplines::degree() -
j);
186 for (std::size_t
i(0);
i < BSplines::degree() / 2 + 1; ++
i) {
189 for (std::size_t
j(0);
j <
i; ++
j) {
202 + BSplines::degree() % 2));
207 if constexpr (N_BE_MIN == 0 && N_BE_MAX == 0) {
213 int constexpr n_start = N_BE_MIN;
248 template <
class Sampling>
Definition discrete_domain.hpp:51
KOKKOS_FUNCTION constexpr DiscreteDomain take_first(mlength_type n) const
Definition discrete_domain.hpp:164
KOKKOS_FUNCTION constexpr discrete_element_type front() const noexcept
Definition discrete_domain.hpp:154
KOKKOS_FUNCTION constexpr DiscreteDomain remove(mlength_type n1, mlength_type n2) const
Definition discrete_domain.hpp:184
KOKKOS_FUNCTION constexpr discrete_element_type back() const noexcept
Definition discrete_domain.hpp:159
A DiscreteElement identifies an element of the discrete dimension.
Definition discrete_element.hpp:146
A DiscreteVector is a vector in the discrete dimension.
Definition discrete_vector.hpp:254
A class which provides helper functions to initialise the Greville points from a B-Spline definition.
Definition greville_interpolation_points.hpp:26
static ddc::DiscreteDomain< Sampling > get_domain()
Get the domain which gives us access to all of the Greville points.
Definition greville_interpolation_points.hpp:249
std::conditional_t< is_uniform_mesh_v< BSplines >, ddc::UniformPointSampling< tag_type >, ddc::NonUniformPointSampling< tag_type > > interpolation_mesh_type
The type of the mesh.
Definition greville_interpolation_points.hpp:238
static auto get_sampling()
Get the UniformPointSampling defining the Greville points.
Definition greville_interpolation_points.hpp:129
The top-level namespace of DDC.
Definition aligned_allocator.hpp:11
constexpr int n_boundary_equations(ddc::BoundCond const bc, std::size_t const degree)
Definition spline_boundary_conditions.hpp:35
constexpr bool enable_chunk
Definition chunk_traits.hpp:16
void for_each(DiscreteDomain< DDims... > const &domain, Functor &&f) noexcept
iterates over a nD domain in serial
Definition for_each.hpp:48
KOKKOS_FUNCTION Coordinate< typename DDim::continuous_dimension_type > rmin(DiscreteDomain< DDim > const &d)
Definition non_uniform_point_sampling.hpp:175
detail::TaggedVector< CoordinateElement, CDims... > Coordinate
A Coordinate represents a coordinate in the continuous space.
Definition coordinate.hpp:26