From a01130ddc47e130b67dba97b0aa112da6a5ddfd8 Mon Sep 17 00:00:00 2001 From: GitHub CI Documentation builder Date: Wed, 21 Feb 2024 12:43:39 +0000 Subject: [PATCH] Update docs --- neumann__spline__quadrature_8hpp_source.html | 107 +++++++++---------- 1 file changed, 53 insertions(+), 54 deletions(-) diff --git a/neumann__spline__quadrature_8hpp_source.html b/neumann__spline__quadrature_8hpp_source.html index 0696c98ae..4e7cfe5bc 100644 --- a/neumann__spline__quadrature_8hpp_source.html +++ b/neumann__spline__quadrature_8hpp_source.html @@ -147,61 +147,60 @@
65 
66  using bsplines_type = typename SplineBuilder::bsplines_type;
67 
-
68  int const length = ddc::discrete_space<bsplines_type>().nbasis() - nbe_xmin - nbe_xmax;
-
69  assert(domain.size() == length);
-
70 
-
71  // Vector of integrals of B-splines
-
72  ddc::Chunk<double, ddc::DiscreteDomain<bsplines_type>> integral_bsplines(
-
73  builder.bsplines_domain());
-
74  ddc::discrete_space<bsplines_type>().integrals(integral_bsplines.span_view());
-
75 
-
76  // Solve matrix equation
-
77  builder.get_interpolation_matrix().solve_transpose_inplace(
-
78  integral_bsplines.allocation_mdspan());
-
79 
-
80  ddc::Chunk<double, ddc::DiscreteDomain<IDim>> coefficients(domain);
-
81 
-
82  // Coefficients of quadrature in integral_bsplines (values which would always be multiplied
-
83  // by f'(x)=0 are removed
-
84  ddc::DiscreteDomain<bsplines_type> slice
-
85  = builder.bsplines_domain()
-
86  .remove(ddc::DiscreteVector<bsplines_type> {nbe_xmin},
-
87  ddc::DiscreteVector<bsplines_type> {nbe_xmax});
-
88 
-
89  Kokkos::deep_copy(
-
90  coefficients.allocation_kokkos_view(),
-
91  integral_bsplines[slice].allocation_kokkos_view());
-
92 
-
93  return coefficients;
-
94 }
+
68  assert(domain.size() == ddc::discrete_space<bsplines_type>().nbasis() - nbe_xmin - nbe_xmax);
+
69 
+
70  // Vector of integrals of B-splines
+
71  ddc::Chunk<double, ddc::DiscreteDomain<bsplines_type>> integral_bsplines(
+
72  builder.bsplines_domain());
+
73  ddc::discrete_space<bsplines_type>().integrals(integral_bsplines.span_view());
+
74 
+
75  // Solve matrix equation
+
76  builder.get_interpolation_matrix().solve_transpose_inplace(
+
77  integral_bsplines.allocation_mdspan());
+
78 
+
79  ddc::Chunk<double, ddc::DiscreteDomain<IDim>> coefficients(domain);
+
80 
+
81  // Coefficients of quadrature in integral_bsplines (values which would always be multiplied
+
82  // by f'(x)=0 are removed
+
83  ddc::DiscreteDomain<bsplines_type> slice
+
84  = builder.bsplines_domain()
+
85  .remove(ddc::DiscreteVector<bsplines_type> {nbe_xmin},
+
86  ddc::DiscreteVector<bsplines_type> {nbe_xmax});
+
87 
+
88  Kokkos::deep_copy(
+
89  coefficients.allocation_kokkos_view(),
+
90  integral_bsplines[slice].allocation_kokkos_view());
+
91 
+
92  return coefficients;
+
93 }
+
94 
95 
96 
-
97 
-
112 template <class... DDims, class... SplineBuilders>
-
113 ddc::Chunk<double, ddc::DiscreteDomain<DDims...>> neumann_spline_quadrature_coefficients(
-
114  ddc::DiscreteDomain<DDims...> const& domain,
-
115  SplineBuilders const&... builders)
-
116 {
-
117  assert((std::is_same_v<
-
118  typename DDims::continuous_dimension_type,
-
119  typename SplineBuilders::bsplines_type::tag_type> and ...));
-
120 
-
121  // Get coefficients for each dimension
-
122  std::tuple<CoefficientChunk1D<DDims>...> current_dim_coeffs(
-
123  neumann_spline_quadrature_coefficients_1d(ddc::select<DDims>(domain), builders)...);
-
124 
-
125  // Allocate ND coefficients
-
126  ddc::Chunk<double, ddc::DiscreteDomain<DDims...>> coefficients(domain);
-
127 
-
128  ddc::for_each(domain, [&](ddc::DiscreteElement<DDims...> const idim) {
-
129  // multiply the 1D coefficients by one another
-
130  coefficients(idim)
-
131  = (std::get<CoefficientChunk1D<DDims>>(current_dim_coeffs)(ddc::select<DDims>(idim))
-
132  * ... * 1);
-
133  });
-
134 
-
135  return coefficients;
-
136 }
+
111 template <class... DDims, class... SplineBuilders>
+
112 ddc::Chunk<double, ddc::DiscreteDomain<DDims...>> neumann_spline_quadrature_coefficients(
+
113  ddc::DiscreteDomain<DDims...> const& domain,
+
114  SplineBuilders const&... builders)
+
115 {
+
116  assert((std::is_same_v<
+
117  typename DDims::continuous_dimension_type,
+
118  typename SplineBuilders::bsplines_type::tag_type> and ...));
+
119 
+
120  // Get coefficients for each dimension
+
121  std::tuple<CoefficientChunk1D<DDims>...> current_dim_coeffs(
+
122  neumann_spline_quadrature_coefficients_1d(ddc::select<DDims>(domain), builders)...);
+
123 
+
124  // Allocate ND coefficients
+
125  ddc::Chunk<double, ddc::DiscreteDomain<DDims...>> coefficients(domain);
+
126 
+
127  ddc::for_each(domain, [&](ddc::DiscreteElement<DDims...> const idim) {
+
128  // multiply the 1D coefficients by one another
+
129  coefficients(idim)
+
130  = (std::get<CoefficientChunk1D<DDims>>(current_dim_coeffs)(ddc::select<DDims>(idim))
+
131  * ... * 1);
+
132  });
+
133 
+
134  return coefficients;
+
135 }
A class for creating a spline approximation of a function.
Definition: spline_builder.hpp:42
static constexpr BoundCond s_bc_xmin
The boundary condition implemented at the lower bound.
Definition: spline_builder.hpp:106
static constexpr int s_nbe_xmin
The number of equations which define the boundary conditions at the lower bound.
Definition: spline_builder.hpp:78
@@ -209,7 +208,7 @@
const Matrix & get_interpolation_matrix() const noexcept
Get the interpolation matrix.
Definition: spline_builder.hpp:213
static constexpr int s_nbe_xmax
The number of equations which define the boundary conditions at the upper bound.
Definition: spline_builder.hpp:83
static constexpr BoundCond s_bc_xmax
The boundary condition implemented at the upper bound.
Definition: spline_builder.hpp:110
-
ddc::Chunk< double, ddc::DiscreteDomain< DDims... > > neumann_spline_quadrature_coefficients(ddc::DiscreteDomain< DDims... > const &domain, SplineBuilders const &... builders)
Get the spline quadrature coefficients in ND from N 1D quadrature coefficient.
Definition: neumann_spline_quadrature.hpp:113
+
ddc::Chunk< double, ddc::DiscreteDomain< DDims... > > neumann_spline_quadrature_coefficients(ddc::DiscreteDomain< DDims... > const &domain, SplineBuilders const &... builders)
Get the spline quadrature coefficients in ND from N 1D quadrature coefficient.
Definition: neumann_spline_quadrature.hpp:112
ddc::Chunk< double, ddc::DiscreteDomain< IDim > > neumann_spline_quadrature_coefficients_1d(ddc::DiscreteDomain< IDim > const &domain, SplineBuilder const &builder)
Get the spline quadrature coefficients in 1D.
Definition: neumann_spline_quadrature.hpp:43