A class to evaluate, differentiate or integrate a spline function. More...
#include <spline_evaluator.hpp>
Public Types | |
using | exec_space = ExecSpace |
The type of the Kokkos execution space used by this class. | |
using | memory_space = MemorySpace |
The type of the Kokkos memory space used by this class. | |
using | continuous_dimension_type = typename BSplines::continuous_dimension_type |
The type of the evaluation continuous dimension (continuous dimension of interest) used by this class. | |
using | evaluation_discrete_dimension_type = EvaluationDDim |
The type of the evaluation discrete dimension (discrete dimension of interest) used by this class. | |
using | bsplines_type = BSplines |
The discrete dimension representing the B-splines. | |
using | evaluation_domain_type = ddc::DiscreteDomain< evaluation_discrete_dimension_type > |
The type of the domain for the 1D evaluation mesh used by this class. | |
using | batched_evaluation_domain_type = ddc::DiscreteDomain< IDimX... > |
The type of the whole domain representing evaluation points. | |
using | spline_domain_type = ddc::DiscreteDomain< bsplines_type > |
The type of the 1D spline domain corresponding to the dimension of interest. | |
using | batch_domain_type = ddc::remove_dims_of_t< batched_evaluation_domain_type, evaluation_discrete_dimension_type > |
The type of the batch domain (obtained by removing the dimension of interest from the whole domain). | |
using | batched_spline_domain_type = ddc::replace_dim_of_t< batched_evaluation_domain_type, evaluation_discrete_dimension_type, bsplines_type > |
The type of the whole spline domain (cartesian product of 1D spline domain and batch domain) preserving the order of dimensions. | |
using | lower_extrapolation_rule_type = LowerExtrapolationRule |
The type of the extrapolation rule at the lower boundary. | |
using | upper_extrapolation_rule_type = UpperExtrapolationRule |
The type of the extrapolation rule at the upper boundary. | |
A class to evaluate, differentiate or integrate a spline function.
A class which contains an operator () which can be used to evaluate, differentiate or integrate a spline function.
ExecSpace | The Kokkos execution space on which the spline evaluation is performed. |
MemorySpace | The Kokkos memory space on which the data (spline coefficients and evaluation) is stored. |
BSplines | The discrete dimension representing the B-splines. |
EvaluationDDim | The discrete dimension on which evaluation points are defined. |
LowerExtrapolationRule | The lower extrapolation rule type. |
UpperExtrapolationRule | The upper extrapolation rule type. |
IDimX | A variadic template of all the discrete dimensions forming the full space (EvaluationDDim + batched dimensions). |
Definition at line 42 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::exec_space = ExecSpace |
The type of the Kokkos execution space used by this class.
Definition at line 61 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::memory_space = MemorySpace |
The type of the Kokkos memory space used by this class.
Definition at line 64 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::continuous_dimension_type = typename BSplines::continuous_dimension_type |
The type of the evaluation continuous dimension (continuous dimension of interest) used by this class.
Definition at line 67 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::evaluation_discrete_dimension_type = EvaluationDDim |
The type of the evaluation discrete dimension (discrete dimension of interest) used by this class.
Definition at line 70 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::bsplines_type = BSplines |
The discrete dimension representing the B-splines.
Definition at line 73 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::evaluation_domain_type = ddc::DiscreteDomain<evaluation_discrete_dimension_type> |
The type of the domain for the 1D evaluation mesh used by this class.
Definition at line 76 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::batched_evaluation_domain_type = ddc::DiscreteDomain<IDimX...> |
The type of the whole domain representing evaluation points.
Definition at line 79 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::spline_domain_type = ddc::DiscreteDomain<bsplines_type> |
The type of the 1D spline domain corresponding to the dimension of interest.
Definition at line 82 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::batch_domain_type = ddc:: remove_dims_of_t<batched_evaluation_domain_type, evaluation_discrete_dimension_type> |
The type of the batch domain (obtained by removing the dimension of interest from the whole domain).
Definition at line 88 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::batched_spline_domain_type = ddc::replace_dim_of_t< batched_evaluation_domain_type, evaluation_discrete_dimension_type, bsplines_type> |
The type of the whole spline domain (cartesian product of 1D spline domain and batch domain) preserving the order of dimensions.
Definition at line 95 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::lower_extrapolation_rule_type = LowerExtrapolationRule |
The type of the extrapolation rule at the lower boundary.
Definition at line 101 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule, IDimX >::upper_extrapolation_rule_type = UpperExtrapolationRule |
The type of the extrapolation rule at the upper boundary.
Definition at line 104 of file spline_evaluator.hpp.
|
inlineexplicit |
Build a SplineEvaluator acting on batched_spline_domain.
lower_extrap_rule | The extrapolation rule at the lower boundary. |
upper_extrap_rule | The extrapolation rule at the upper boundary. |
Definition at line 153 of file spline_evaluator.hpp.
|
default |
Copy-constructs.
x | A reference to another SplineEvaluator. |
|
default |
Move-constructs.
x | An rvalue to another SplineEvaluator. |
|
default |
Destructs.
Copy-assigns.
x | A reference to another SplineEvaluator. |
|
default |
|
inline |
Get the lower extrapolation rule.
Extrapolation rules are functors used to define the behavior of the SplineEvaluator out of the domain where the break points of the B-splines are defined.
Definition at line 203 of file spline_evaluator.hpp.
|
inline |
Get the upper extrapolation rule.
Extrapolation rules are functors used to define the behavior of the SplineEvaluator out of the domain where the break points of the B-splines are defined.
Definition at line 217 of file spline_evaluator.hpp.
|
inline |
Evaluate 1D spline function (described by its spline coefficients) at a given coordinate.
The spline coefficients represent a 1D spline function defined on a B-splines (basis splines). They can be obtained via various methods, such as using a SplineBuilder.
Remark: calling SplineBuilder then SplineEvaluator corresponds to a spline interpolation.
coord_eval | The coordinate where the spline is evaluated. Note that only the component along the dimension of interest is used. |
spline_coef | A ChunkSpan storing the 1D spline coefficients. |
Definition at line 235 of file spline_evaluator.hpp.
|
inline |
Evaluate spline function (described by its spline coefficients) on a mesh.
The spline coefficients represent a spline function defined on a cartesian product of batch_domain and B-splines (basis splines). They can be obtained via various methods, such as using a SplineBuilder.
This is not a multidimensional evaluation. This is a batched 1D evaluation. This means that for each slice of coordinates identified by a batch_domain_type::discrete_element_type, the evaluation is performed with the 1D set of spline coefficients identified by the same batch_domain_type::discrete_element_type.
Remark: calling SplineBuilder then SplineEvaluator corresponds to a spline interpolation.
[out] | spline_eval | The values of the spline function at the desired coordinates. For practical reasons those are stored in a ChunkSpan defined on a batched_evaluation_domain_type. |
[in] | coords_eval | The coordinates where the spline is evaluated. Those are stored in a ChunkSpan defined on a batched_evaluation_domain_type. Note that the coordinates of the points represented by this domain are unused and irrelevant (but the points themselves (DiscreteElement) are used to select the set of 1D spline coefficients retained to perform the evaluation). |
[in] | spline_coef | A ChunkSpan storing the spline coefficients. |
Definition at line 264 of file spline_evaluator.hpp.
|
inline |
Differentiate 1D spline function (described by its spline coefficients) at a given coordinate.
The spline coefficients represent a 1D spline function defined on a B-splines (basis splines). They can be obtained via various methods, such as using a SplineBuilder.
coord_eval | The coordinate where the spline is differentiated. Note that only the component along the dimension of interest is used. |
spline_coef | A ChunkSpan storing the 1D spline coefficients. |
Definition at line 304 of file spline_evaluator.hpp.
|
inline |
Differentiate spline function (described by its spline coefficients) on a mesh.
The spline coefficients represent a spline function defined on a cartesian product of batch_domain and B-splines (basis splines). They can be obtained via various methods, such as using a SplineBuilder.
The derivation is not performed in a multidimensional way (in any sense). This is a batched 1D derivation. This means that for each slice of coordinates identified by a batch_domain_type::discrete_element_type, the derivation is performed with the 1D set of spline coefficients identified by the same batch_domain_type::discrete_element_type.
[out] | spline_eval | The derivatives of the spline function at the desired coordinates. For practical reasons those are stored in a ChunkSpan defined on a batched_evaluation_domain_type. |
[in] | coords_eval | The coordinates where the spline is differentiated. Those are stored in a ChunkSpan defined on a batched_evaluation_domain_type. Note that the coordinates of the points represented by this domain are unused and irrelevant (but the points themselves (DiscreteElement) are used to select the set of 1D spline coefficients retained to perform the evaluation). |
[in] | spline_coef | A ChunkSpan storing the spline coefficients. |
Definition at line 331 of file spline_evaluator.hpp.
|
inline |
Perform batched 1D integrations of a spline function (described by its spline coefficients) along the dimension of interest and store results on a subdomain of batch_domain.
The spline coefficients represent a spline function defined on a B-splines (basis splines). They can be obtained via the SplineBuilder.
The integration is not performed in a multidimensional way (in any sense). This is a batched 1D integration. This means that for each element of integrals, the integration is performed with the 1D set of spline coefficients identified by the same DiscreteElement.
[out] | integrals | The integrals of the spline function on the subdomain of batch_domain. For practical reasons those are stored in a ChunkSpan defined on a batch_domain_type. Note that the coordinates of the points represented by this domain are unused and irrelevant. |
[in] | spline_coef | A ChunkSpan storing the spline coefficients. |
Definition at line 374 of file spline_evaluator.hpp.