A class for creating a 2D spline approximation of a function. More...
#include <spline_builder_2d.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 | builder_type1 = ddc::SplineBuilder< ExecSpace, MemorySpace, BSpline1, DDimI1, BcLower1, BcUpper1, Solver > |
The type of the SplineBuilder used by this class to spline-approximate along first dimension. | |
using | builder_type2 = ddc::SplineBuilder< ExecSpace, MemorySpace, BSpline2, DDimI2, BcLower2, BcUpper2, Solver > |
The type of the SplineBuilder used by this class to spline-approximate along second dimension. | |
using | builder_deriv_type1 = ddc::SplineBuilder< ExecSpace, MemorySpace, BSpline1, DDimI1, BcLower1, BcUpper1, Solver > |
The type of the SplineBuilder used by this class to spline-approximate the second-dimension-derivatives along first dimension. | |
using | continuous_dimension_type1 = typename builder_type1::continuous_dimension_type |
The type of the first interpolation continuous dimension. | |
using | continuous_dimension_type2 = typename builder_type2::continuous_dimension_type |
The type of the second interpolation continuous dimension. | |
using | interpolation_discrete_dimension_type1 = typename builder_type1::interpolation_discrete_dimension_type |
The type of the first interpolation discrete dimension. | |
using | interpolation_discrete_dimension_type2 = typename builder_type2::interpolation_discrete_dimension_type |
The type of the second interpolation discrete dimension. | |
using | bsplines_type1 = typename builder_type1::bsplines_type |
The type of the B-splines in the first dimension. | |
using | bsplines_type2 = typename builder_type2::bsplines_type |
The type of the B-splines in the second dimension. | |
using | deriv_type1 = typename builder_type1::deriv_type |
The type of the Deriv domain on boundaries in the first dimension. | |
using | deriv_type2 = typename builder_type2::deriv_type |
The type of the Deriv domain on boundaries in the second dimension. | |
using | interpolation_domain_type1 = typename builder_type1::interpolation_discrete_dimension_type |
The type of the domain for the interpolation mesh in the first dimension. | |
using | interpolation_domain_type2 = typename builder_type2::interpolation_discrete_dimension_type |
The type of the domain for the interpolation mesh in the second dimension. | |
using | interpolation_domain_type = ddc::DiscreteDomain< interpolation_discrete_dimension_type1, interpolation_discrete_dimension_type2 > |
The type of the domain for the interpolation mesh in the 2D dimension. | |
template<class BatchedInterpolationDDom , class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>> | |
using | batched_interpolation_domain_type = BatchedInterpolationDDom |
The type of the whole domain representing interpolation points. | |
template<class BatchedInterpolationDDom , class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>> | |
using | batch_domain_type = ddc::remove_dims_of_t< BatchedInterpolationDDom, interpolation_discrete_dimension_type1, interpolation_discrete_dimension_type2 > |
The type of the batch domain (obtained by removing the dimensions 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::detail::convert_type_seq_to_discrete_domain_t< ddc::type_seq_replace_t< ddc::to_type_seq_t< BatchedInterpolationDDom >, ddc::detail::TypeSeq< interpolation_discrete_dimension_type1, interpolation_discrete_dimension_type2 >, ddc::detail::TypeSeq< bsplines_type1, bsplines_type2 > > > |
The type of the whole spline domain (cartesian product of 2D spline domain and batch domain) preserving the order of dimensions. | |
template<class BatchedInterpolationDDom , class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>> | |
using | batched_derivs_domain_type1 = typename builder_type1::template batched_derivs_domain_type< BatchedInterpolationDDom > |
The type of the whole Derivs domain (cartesian product of the 1D Deriv domain and the associated batch domain) in the first dimension, preserving the order of dimensions. | |
template<class BatchedInterpolationDDom , class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>> | |
using | batched_derivs_domain_type2 = ddc::replace_dim_of_t< BatchedInterpolationDDom, interpolation_discrete_dimension_type2, deriv_type2 > |
The type of the whole Derivs domain (cartesian product of the 1D Deriv domain and the associated batch domain) in the second dimension, preserving the order of dimensions. | |
template<class BatchedInterpolationDDom , class = std::enable_if_t<ddc::is_discrete_domain_v<BatchedInterpolationDDom>>> | |
using | batched_derivs_domain_type = ddc::detail::convert_type_seq_to_discrete_domain_t< ddc::type_seq_replace_t< ddc::to_type_seq_t< BatchedInterpolationDDom >, ddc::detail::TypeSeq< interpolation_discrete_dimension_type1, interpolation_discrete_dimension_type2 >, ddc::detail::TypeSeq< deriv_type1, deriv_type2 > > > |
The type of the whole Derivs domain (cartesian product of the 2D Deriv domain and the batch domain) in the second dimension, preserving the order of dimensions. | |
A class for creating a 2D spline approximation of a function.
A class which contains an operator () which can be used to build a 2D spline approximation of a function. A 2D spline approximation uses a cross-product between two 1D SplineBuilder.
Definition at line 38 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::exec_space = ExecSpace |
The type of the Kokkos execution space used by this class.
Definition at line 42 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::memory_space = MemorySpace |
The type of the Kokkos memory space used by this class.
Definition at line 45 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::builder_type1 = ddc:: SplineBuilder<ExecSpace, MemorySpace, BSpline1, DDimI1, BcLower1, BcUpper1, Solver> |
The type of the SplineBuilder used by this class to spline-approximate along first dimension.
Definition at line 48 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::builder_type2 = ddc:: SplineBuilder<ExecSpace, MemorySpace, BSpline2, DDimI2, BcLower2, BcUpper2, Solver> |
The type of the SplineBuilder used by this class to spline-approximate along second dimension.
Definition at line 52 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::builder_deriv_type1 = ddc:: SplineBuilder<ExecSpace, MemorySpace, BSpline1, DDimI1, BcLower1, BcUpper1, Solver> |
The type of the SplineBuilder used by this class to spline-approximate the second-dimension-derivatives along first dimension.
Definition at line 56 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::continuous_dimension_type1 = typename builder_type1::continuous_dimension_type |
The type of the first interpolation continuous dimension.
Definition at line 60 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::continuous_dimension_type2 = typename builder_type2::continuous_dimension_type |
The type of the second interpolation continuous dimension.
Definition at line 63 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::interpolation_discrete_dimension_type1 = typename builder_type1::interpolation_discrete_dimension_type |
The type of the first interpolation discrete dimension.
Definition at line 66 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::interpolation_discrete_dimension_type2 = typename builder_type2::interpolation_discrete_dimension_type |
The type of the second interpolation discrete dimension.
Definition at line 70 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::bsplines_type1 = typename builder_type1::bsplines_type |
The type of the B-splines in the first dimension.
Definition at line 74 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::bsplines_type2 = typename builder_type2::bsplines_type |
The type of the B-splines in the second dimension.
Definition at line 77 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::deriv_type1 = typename builder_type1::deriv_type |
The type of the Deriv domain on boundaries in the first dimension.
Definition at line 80 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::deriv_type2 = typename builder_type2::deriv_type |
The type of the Deriv domain on boundaries in the second dimension.
Definition at line 83 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::interpolation_domain_type1 = typename builder_type1::interpolation_discrete_dimension_type |
The type of the domain for the interpolation mesh in the first dimension.
Definition at line 86 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::interpolation_domain_type2 = typename builder_type2::interpolation_discrete_dimension_type |
The type of the domain for the interpolation mesh in the second dimension.
Definition at line 90 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::interpolation_domain_type = ddc::DiscreteDomain< interpolation_discrete_dimension_type1, interpolation_discrete_dimension_type2> |
The type of the domain for the interpolation mesh in the 2D dimension.
Definition at line 94 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::batched_interpolation_domain_type = BatchedInterpolationDDom |
The type of the whole domain representing interpolation points.
The | batched discrete domain on which the interpolation points are defined. |
Definition at line 106 of file spline_builder_2d.hpp.
The type of the batch domain (obtained by removing the dimensions of interest from the whole domain).
The | batched discrete domain on which the interpolation points are defined. |
Example: For batched_interpolation_domain_type = DiscreteDomain<X,Y,Z> and dimensions of interest X and Y, this is DiscreteDomain<Z>.
Definition at line 120 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::batched_spline_domain_type = ddc::detail::convert_type_seq_to_discrete_domain_t<ddc::type_seq_replace_t< ddc::to_type_seq_t<BatchedInterpolationDDom>, ddc::detail::TypeSeq< interpolation_discrete_dimension_type1, interpolation_discrete_dimension_type2>, ddc::detail::TypeSeq<bsplines_type1, bsplines_type2> >> |
The type of the whole spline domain (cartesian product of 2D spline domain and batch domain) preserving the order of dimensions.
The | batched discrete domain on which the interpolation points are defined. |
Example: For batched_interpolation_domain_type = DiscreteDomain<X,Y,Z> and dimensions of interest X and Y (associated to B-splines tags BSplinesX and BSplinesY), this is DiscreteDomain<BSplinesX, BSplinesY, Z>
Definition at line 137 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::batched_derivs_domain_type1 = typename builder_type1::template batched_derivs_domain_type<BatchedInterpolationDDom> |
The type of the whole Derivs domain (cartesian product of the 1D Deriv domain and the associated batch domain) in the first dimension, preserving the order of dimensions.
The | batched discrete domain on which the interpolation points are defined. |
Example: For batched_interpolation_domain_type = DiscreteDomain<X,Y,Z> and dimensions of interest X and Y, this is DiscreteDomain<Deriv<X>, Y, Z>.
Definition at line 157 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::batched_derivs_domain_type2 = ddc::replace_dim_of_t< BatchedInterpolationDDom, interpolation_discrete_dimension_type2, deriv_type2> |
The type of the whole Derivs domain (cartesian product of the 1D Deriv domain and the associated batch domain) in the second dimension, preserving the order of dimensions.
The | batched discrete domain on which the interpolation points are defined. |
Example: For batched_interpolation_domain_type = DiscreteDomain<X,Y,Z> and dimensions of interest X and Y, this is DiscreteDomain<X, Deriv<Y>, Z>.
Definition at line 172 of file spline_builder_2d.hpp.
using ddc::SplineBuilder2D< ExecSpace, MemorySpace, BSpline1, BSpline2, DDimI1, DDimI2, BcLower1, BcUpper1, BcLower2, BcUpper2, Solver >::batched_derivs_domain_type = ddc::detail::convert_type_seq_to_discrete_domain_t<ddc::type_seq_replace_t< ddc::to_type_seq_t<BatchedInterpolationDDom>, ddc::detail::TypeSeq< interpolation_discrete_dimension_type1, interpolation_discrete_dimension_type2>, ddc::detail::TypeSeq<deriv_type1, deriv_type2> >> |
The type of the whole Derivs domain (cartesian product of the 2D Deriv domain and the batch domain) in the second dimension, preserving the order of dimensions.
The | batched discrete domain on which the interpolation points are defined. |
Example: For batched_interpolation_domain_type = DiscreteDomain<X,Y,Z> and dimensions of interest X and Y, this is DiscreteDomain<Deriv<X>, Deriv<Y>, Z>.
Definition at line 189 of file spline_builder_2d.hpp.
|
inlineexplicit |
Build a SplineBuilder2D acting on interpolation_domain.
interpolation_domain | The domain on which the interpolation points are defined, without the batch dimensions. |
cols_per_chunk | A parameter used by the slicer (internal to the solver) to define the size of a chunk of right-hand-sides of the linear problem to be computed in parallel (chunks are treated by the linear solver one-after-the-other). This value is optional. If no value is provided then the default value is chosen by the requested solver. |
preconditioner_max_block_size | A parameter used by the slicer (internal to the solver) to define the size of a block used by the Block-Jacobi preconditioner. This value is optional. If no value is provided then the default value is chosen by the requested solver. |
Definition at line 219 of file spline_builder_2d.hpp.
|
inlineexplicit |
Build a SplineBuilder2D acting on the interpolation domain contained in batched_interpolation_domain.
batched_interpolation_domain | The domain on which the interpolation points are defined. |
cols_per_chunk | A parameter used by the slicer (internal to the solver) to define the size of a chunk of right-hand-sides of the linear problem to be computed in parallel (chunks are treated by the linear solver one-after-the-other). This value is optional. If no value is provided then the default value is chosen by the requested solver. |
preconditioner_max_block_size | A parameter used by the slicer (internal to the solver) to define the size of a block used by the Block-Jacobi preconditioner. This value is optional. If no value is provided then the default value is chosen by the requested solver. |
Definition at line 248 of file spline_builder_2d.hpp.
|
delete |
Copy-constructor is deleted.
|
default |
Move-constructs.
x | An rvalue to another SplineBuilder2D. |
|
default |
Destructs.
|
delete |
Copy-assignment is deleted.
|
default |
|
inlinenoexcept |
Get the domain for the 2D interpolation mesh used by this class.
This is 2D because it is defined along the dimensions of interest.
Definition at line 289 of file spline_builder_2d.hpp.
|
inlinenoexcept |
Get the whole domain representing interpolation points.
Values of the function must be provided on this domain in order to build a spline representation of the function (cartesian product of 2D interpolation_domain and batch_domain).
batched_interpolation_domain | The whole domain on which the interpolation points are defined. |
Definition at line 309 of file spline_builder_2d.hpp.
|
inlinenoexcept |
Get the batch domain.
Obtained by removing the dimensions of interest from the whole interpolation domain.
batched_interpolation_domain | The whole domain on which the interpolation points are defined. |
Definition at line 328 of file spline_builder_2d.hpp.
|
inlinenoexcept |
Get the 2D domain on which spline coefficients are defined.
The 2D spline domain corresponding to the dimensions of interest.
Definition at line 342 of file spline_builder_2d.hpp.
|
inlinenoexcept |
Get the whole domain on which spline coefficients are defined.
Spline approximations (spline-transformed functions) are computed on this domain.
batched_interpolation_domain | The whole domain on which the interpolation points are defined. |
Definition at line 361 of file spline_builder_2d.hpp.
Compute a 2D spline approximation of a function.
Use the values of a function (defined on SplineBuilder2D::batched_interpolation_domain) and the derivatives of the function at the boundaries (in the case of BoundCond::HERMITE only) to calculate a 2D spline approximation of this function.
The spline approximation is stored as a ChunkSpan of coefficients associated with B-splines.
[out] | spline | The coefficients of the spline computed by this SplineBuilder. |
[in] | vals | The values of the function at the interpolation mesh. |
[in] | derivs_min1 | The values of the derivatives at the lower boundary in the first dimension. |
[in] | derivs_max1 | The values of the derivatives at the upper boundary in the first dimension. |
[in] | derivs_min2 | The values of the derivatives at the lower boundary in the second dimension. |
[in] | derivs_max2 | The values of the derivatives at the upper boundary in the second dimension. |
[in] | mixed_derivs_min1_min2 | The values of the the cross-derivatives at the lower boundary in the first dimension and the lower boundary in the second dimension. |
[in] | mixed_derivs_max1_min2 | The values of the the cross-derivatives at the upper boundary in the first dimension and the lower boundary in the second dimension. |
[in] | mixed_derivs_min1_max2 | The values of the the cross-derivatives at the lower boundary in the first dimension and the upper boundary in the second dimension. |
[in] | mixed_derivs_max1_max2 | The values of the the cross-derivatives at the upper boundary in the first dimension and the upper boundary in the second dimension. |
Definition at line 491 of file spline_builder_2d.hpp.