File providing quadrature coefficients via a spline quadrature. More...
#include <cassert>
#include <ddc/ddc.hpp>
#include <sll/matrix.hpp>
#include "ddc_aliases.hpp"
Go to the source code of this file.
Functions | |
template<class Grid1D , class SplineBuilder > | |
host_t< DFieldMem< IdxRange< Grid1D > > > | spline_quadrature_coefficients_1d (IdxRange< Grid1D > const &idx_range, SplineBuilder const &builder) |
Get the spline quadrature coefficients. | |
template<class ExecSpace , class... DDims, class... SplineBuilders> | |
DFieldMem< IdxRange< DDims... >, typename ExecSpace::memory_space > | spline_quadrature_coefficients (IdxRange< DDims... > const &idx_range, SplineBuilders const &... builders) |
Get the spline quadrature coefficients in ND from N 1D quadrature coefficient. | |
File providing quadrature coefficients via a spline quadrature.
host_t< DFieldMem< IdxRange< Grid1D > > > spline_quadrature_coefficients_1d | ( | IdxRange< Grid1D > const & | idx_range, |
SplineBuilder const & | builder | ||
) |
Get the spline quadrature coefficients.
To integrate a function with a spline quadrature, we use:
\( \int_a^b f(x)dx \simeq \sum_{i = 0}^{N_{\text{basis}} -1 } c_i \int_a^b b_{i,d}()x dx \),
which rewritten gives
\( \int_a^b f(x)dx \simeq \sum_{i = 0}^{N_{\text{basis}} - 1} q_i f_i \),
with
More details are given in Emily Bourne's thesis "Non-Uniform Numerical Schemes for the Modelling of Turbulence in the 5D GYSELA Code". December 2022.
[in] | idx_range | The index range where the functions we want to integrate are defined. |
[in] | builder | The spline builder describing the way in which splines would be constructed. |
DFieldMem< IdxRange< DDims... >, typename ExecSpace::memory_space > spline_quadrature_coefficients | ( | IdxRange< DDims... > const & | idx_range, |
SplineBuilders const &... | builders | ||
) |
Get the spline quadrature coefficients in ND from N 1D quadrature coefficient.
Calculate the quadrature coefficients for the spline quadrature method defined on the provided index range.
[in] | idx_range | The index range on which the coefficients will be defined. |
[in] | builders | The spline builder used for the quadrature coefficients in the different dimensions. |