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. | |
template<class BatchedInterpolationDDom , class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>> | |
using | batched_evaluation_domain_type = BatchedInterpolationDDom |
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. | |
template<class BatchedInterpolationDDom , class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>> | |
using | batch_domain_type = ddc::remove_dims_of_t< BatchedInterpolationDDom, evaluation_discrete_dimension_type > |
The type of the batch domain (obtained by removing the dimension of interest from the whole domain). | |
template<class BatchedInterpolationDDom , class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>> | |
using | batched_spline_domain_type = ddc::replace_dim_of_t< BatchedInterpolationDDom, 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. |
Definition at line 40 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::exec_space = ExecSpace |
The type of the Kokkos execution space used by this class.
Definition at line 59 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::memory_space = MemorySpace |
The type of the Kokkos memory space used by this class.
Definition at line 62 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::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 65 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::evaluation_discrete_dimension_type = EvaluationDDim |
The type of the evaluation discrete dimension (discrete dimension of interest) used by this class.
Definition at line 68 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::bsplines_type = BSplines |
The discrete dimension representing the B-splines.
Definition at line 71 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::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 74 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::batched_evaluation_domain_type = BatchedInterpolationDDom |
The type of the whole domain representing evaluation points.
The | batched discrete domain on which the interpolation points are defined. |
Definition at line 84 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::spline_domain_type = ddc::DiscreteDomain<bsplines_type> |
The type of the 1D spline domain corresponding to the dimension of interest.
Definition at line 87 of file spline_evaluator.hpp.
The type of the batch domain (obtained by removing the dimension of interest from the whole domain).
The | batched discrete domain on which the interpolation points are defined. |
Definition at line 98 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::batched_spline_domain_type = ddc::replace_dim_of_t< BatchedInterpolationDDom, 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.
The | batched discrete domain on which the interpolation points are defined. |
Definition at line 110 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::lower_extrapolation_rule_type = LowerExtrapolationRule |
The type of the extrapolation rule at the lower boundary.
Definition at line 116 of file spline_evaluator.hpp.
using ddc::SplineEvaluator< ExecSpace, MemorySpace, BSplines, EvaluationDDim, LowerExtrapolationRule, UpperExtrapolationRule >::upper_extrapolation_rule_type = UpperExtrapolationRule |
The type of the extrapolation rule at the upper boundary.
Definition at line 119 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 168 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 218 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 232 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 250 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 284 of file spline_evaluator.hpp.
|
inline |
Evaluate a 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 spline_eval 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 coordinates of the mesh. |
[in] | spline_coef | A ChunkSpan storing the spline coefficients. |
Definition at line 336 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 377 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 409 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 is not a multidimensional evaluation. This is a batched 1D evaluation. This means that for each slice of spline_eval the evaluation 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 coordinates. |
[in] | spline_coef | A ChunkSpan storing the spline coefficients. |
Definition at line 458 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 502 of file spline_evaluator.hpp.