DDC 0.0.0

a discrete domain computation library

ddc::SplineEvaluator2D< ExecSpace, MemorySpace, BSplinesType1, BSplinesType2, interpolation_mesh_type1, interpolation_mesh_type2, LeftExtrapolationRule1, RightExtrapolationRule1, LeftExtrapolationRule2, RightExtrapolationRule2, IDimX > Class Template Reference

Define an evaluator 2D on B-splines. More...

Public Types

using exec_space = ExecSpace
 
using memory_space = MemorySpace
 
using bsplines_type1 = BSplinesType1
 
using bsplines_type2 = BSplinesType2
 
using left_extrapolation_rule_1_type = LeftExtrapolationRule1
 
using right_extrapolation_rule_1_type = RightExtrapolationRule1
 
using left_extrapolation_rule_2_type = LeftExtrapolationRule2
 
using right_extrapolation_rule_2_type = RightExtrapolationRule2
 
using interpolation_domain_type1 = ddc::DiscreteDomain<interpolation_mesh_type1>
 
using interpolation_domain_type2 = ddc::DiscreteDomain<interpolation_mesh_type2>
 
using interpolation_domain_type = ddc::DiscreteDomain<interpolation_mesh_type1, interpolation_mesh_type2>
 
using batched_interpolation_domain_type = ddc::DiscreteDomain<IDimX...>
 
using spline_domain_type1 = ddc::DiscreteDomain<bsplines_type1>
 
using spline_domain_type2 = ddc::DiscreteDomain<bsplines_type2>
 
using spline_domain_type = ddc::DiscreteDomain<bsplines_type1, bsplines_type2>
 
using batch_domain_type
 
using batched_spline_domain_type
 

Public Member Functions

 SplineEvaluator2D (LeftExtrapolationRule1 const &left_extrap_rule1, RightExtrapolationRule1 const &right_extrap_rule1, LeftExtrapolationRule2 const &left_extrap_rule2, RightExtrapolationRule2 const &right_extrap_rule2)
 Instantiate an evaluator operator.
 
 SplineEvaluator2D (SplineEvaluator2D const &x)=default
 Instantiate a SplineEvaluator2D from another SplineEvaluator2D (lvalue).
 
 SplineEvaluator2D (SplineEvaluator2D &&x)=default
 Instantiate a SplineEvaluator2D from another temporary SplineEvaluator2D (rvalue).
 
 ~SplineEvaluator2D ()=default
 
SplineEvaluator2Doperator= (SplineEvaluator2D const &x)=default
 Assign a SplineEvaluator2D from another SplineEvaluator2D (lvalue).
 
SplineEvaluator2Doperator= (SplineEvaluator2D &&x)=default
 Assign a SplineEvaluator2D from another temporary SplineEvaluator2D (rvalue).
 
left_extrapolation_rule_1_type left_extrapolation_rule_dim_1 () const
 
right_extrapolation_rule_1_type right_extrapolation_rule_dim_1 () const
 
left_extrapolation_rule_2_type left_extrapolation_rule_dim_2 () const
 
right_extrapolation_rule_2_type right_extrapolation_rule_dim_2 () const
 
template<class Layout , class... CoordsDims>
KOKKOS_FUNCTION double operator() (ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
 Get the value of the function on B-splines at the coordinate given.
 
template<class Layout1 , class Layout2 , class Layout3 , class... CoordsDims>
void operator() (ddc::ChunkSpan< double, batched_interpolation_domain_type, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, batched_interpolation_domain_type, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout3, memory_space > const spline_coef) const
 
template<class Layout , class... CoordsDims>
KOKKOS_FUNCTION double deriv_dim_1 (ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
 Get the value of the derivative of the first dimension of the function on B-splines at the coordinate given.
 
template<class Layout , class... CoordsDims>
KOKKOS_FUNCTION double deriv_dim_2 (ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
 Get the value of the derivative of the second dimension of the function on B-splines at the coordinate given.
 
template<class Layout , class... CoordsDims>
KOKKOS_FUNCTION double deriv_1_and_2 (ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
 Get the value of the cross derivative of the function on B-splines at the coordinate given.
 
template<class InterestDim , class Layout , class... CoordsDims>
KOKKOS_FUNCTION double deriv (ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
 
template<class InterestDim1 , class InterestDim2 , class Layout , class... CoordsDims>
KOKKOS_FUNCTION double deriv2 (ddc::Coordinate< CoordsDims... > const &coord_eval, ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef) const
 
template<class Layout1 , class Layout2 , class Layout3 , class... CoordsDims>
void deriv_dim_1 (ddc::ChunkSpan< double, batched_interpolation_domain_type, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, batched_interpolation_domain_type, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout3, memory_space > const spline_coef) const
 Get the values of the derivative of the first dimension of the function on B-splines at the coordinates given.
 
template<class Layout1 , class Layout2 , class Layout3 , class... CoordsDims>
void deriv_dim_2 (ddc::ChunkSpan< double, batched_interpolation_domain_type, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, batched_interpolation_domain_type, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout3, memory_space > const spline_coef) const
 Get the values of the derivative of the second dimension of the function on B-splines at the coordinates given.
 
template<class Layout1 , class Layout2 , class Layout3 , class... CoordsDims>
void deriv_1_and_2 (ddc::ChunkSpan< double, batched_interpolation_domain_type, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, batched_interpolation_domain_type, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout3, memory_space > const spline_coef) const
 Get the values of the cross derivative of the function on B-splines at the coordinates given.
 
template<class InterestDim , class Layout1 , class Layout2 , class Layout3 , class... CoordsDims>
void deriv (ddc::ChunkSpan< double, batched_interpolation_domain_type, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, batched_interpolation_domain_type, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout3, memory_space > const spline_coef) const
 
template<class InterestDim1 , class InterestDim2 , class Layout1 , class Layout2 , class Layout3 , class... CoordsDims>
void deriv2 (ddc::ChunkSpan< double, batched_interpolation_domain_type, Layout1, memory_space > const spline_eval, ddc::ChunkSpan< ddc::Coordinate< CoordsDims... > const, batched_interpolation_domain_type, Layout2, memory_space > const coords_eval, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout3, memory_space > const spline_coef) const
 
template<class Layout1 , class Layout2 >
void integrate (ddc::ChunkSpan< double, batch_domain_type, Layout1, memory_space > const integrals, ddc::ChunkSpan< double const, batched_spline_domain_type, Layout2, memory_space > const spline_coef) const
 Get the the integral of the function on B-splines on the domain.
 

Detailed Description

template<class ExecSpace, class MemorySpace, class BSplinesType1, class BSplinesType2, class interpolation_mesh_type1, class interpolation_mesh_type2, class LeftExtrapolationRule1, class RightExtrapolationRule1, class LeftExtrapolationRule2, class RightExtrapolationRule2, class... IDimX>
class ddc::SplineEvaluator2D< ExecSpace, MemorySpace, BSplinesType1, BSplinesType2, interpolation_mesh_type1, interpolation_mesh_type2, LeftExtrapolationRule1, RightExtrapolationRule1, LeftExtrapolationRule2, RightExtrapolationRule2, IDimX >

Define an evaluator 2D on B-splines.

Member Typedef Documentation

◆ exec_space

◆ memory_space

◆ bsplines_type1

◆ bsplines_type2

◆ left_extrapolation_rule_1_type

◆ right_extrapolation_rule_1_type

◆ left_extrapolation_rule_2_type

◆ right_extrapolation_rule_2_type

◆ interpolation_domain_type1

◆ interpolation_domain_type2

◆ interpolation_domain_type

using ddc::SplineEvaluator2D< ExecSpace, MemorySpace, BSplinesType1, BSplinesType2, interpolation_mesh_type1, interpolation_mesh_type2, LeftExtrapolationRule1, RightExtrapolationRule1, LeftExtrapolationRule2, RightExtrapolationRule2, IDimX >::interpolation_domain_type = ddc::DiscreteDomain<interpolation_mesh_type1, interpolation_mesh_type2>

◆ batched_interpolation_domain_type

◆ spline_domain_type1

◆ spline_domain_type2

◆ spline_domain_type

◆ batch_domain_type

Initial value:
typename ddc::detail::convert_type_seq_to_discrete_domain<ddc::type_seq_remove_t<
ddc::detail::TypeSeq<IDimX...>,
ddc::detail::TypeSeq<interpolation_mesh_type1, interpolation_mesh_type2>>>
constexpr bool enable_chunk
Definition chunk_traits.hpp:16

◆ batched_spline_domain_type

Initial value:
typename ddc::detail::convert_type_seq_to_discrete_domain<ddc::type_seq_replace_t<
ddc::detail::TypeSeq<IDimX...>,
ddc::detail::TypeSeq<interpolation_mesh_type1, interpolation_mesh_type2>,
ddc::detail::TypeSeq<bsplines_type1, bsplines_type2>>>

Constructor & Destructor Documentation

◆ SplineEvaluator2D() [1/3]

ddc::SplineEvaluator2D< ExecSpace, MemorySpace, BSplinesType1, BSplinesType2, interpolation_mesh_type1, interpolation_mesh_type2, LeftExtrapolationRule1, RightExtrapolationRule1, LeftExtrapolationRule2, RightExtrapolationRule2, IDimX >::SplineEvaluator2D ( LeftExtrapolationRule1 const & left_extrap_rule1,
RightExtrapolationRule1 const & right_extrap_rule1,
LeftExtrapolationRule2 const & left_extrap_rule2,
RightExtrapolationRule2 const & right_extrap_rule2 )
inlineexplicit

Instantiate an evaluator operator.

Parameters
[in]left_extrap_rule1A SplineBoundaryValue2D object giving the value on the "left side" of the domain in the first dimension.
[in]right_extrap_rule1A SplineBoundaryValue2D object giving the value on the "right side" of the domain in the first dimension.
[in]left_extrap_rule2A SplineBoundaryValue2D object giving the value on the "left side" of the domain in the second dimension.
[in]right_extrap_rule2A SplineBoundaryValue2D object giving the value on the "right side" of the domain in the second dimension.
See also
SplineBoundaryValue2D

◆ SplineEvaluator2D() [2/3]

Instantiate a SplineEvaluator2D from another SplineEvaluator2D (lvalue).

Parameters
[in]xSplineEvaluator2D evaluator used to instantiate the new one.

◆ SplineEvaluator2D() [3/3]

Instantiate a SplineEvaluator2D from another temporary SplineEvaluator2D (rvalue).

Parameters
[in]xSplineEvaluator2D evaluator used to instantiate the new one.

◆ ~SplineEvaluator2D()

Member Function Documentation

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ left_extrapolation_rule_dim_1()

◆ right_extrapolation_rule_dim_1()

◆ left_extrapolation_rule_dim_2()

◆ right_extrapolation_rule_dim_2()

◆ operator()() [1/2]

Get the value of the function on B-splines at the coordinate given.

Parameters
[in]coord_evalThe 2D coordinate where we want to evaluate the function.
[in]spline_coefThe B-splines coefficients of the function we want to evaluate.
Returns
A double containing the value of the function at the coordinate given.

◆ operator()() [2/2]

◆ deriv_dim_1() [1/2]

template<class Layout , class... CoordsDims>
KOKKOS_FUNCTION double ddc::SplineEvaluator2D< ExecSpace, MemorySpace, BSplinesType1, BSplinesType2, interpolation_mesh_type1, interpolation_mesh_type2, LeftExtrapolationRule1, RightExtrapolationRule1, LeftExtrapolationRule2, RightExtrapolationRule2, IDimX >::deriv_dim_1 ( ddc::Coordinate< CoordsDims... > const & coord_eval,
ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef ) const
inline

Get the value of the derivative of the first dimension of the function on B-splines at the coordinate given.

Parameters
[in]coord_evalThe 2D coordinate where we want to evaluate the derivative of the first dimension of the function.
[in]spline_coefThe B-splines coefficients of the function we want to evaluate.
Returns
A double containing the value of the derivative of the first dimension of the function at the coordinate given.

◆ deriv_dim_2() [1/2]

template<class Layout , class... CoordsDims>
KOKKOS_FUNCTION double ddc::SplineEvaluator2D< ExecSpace, MemorySpace, BSplinesType1, BSplinesType2, interpolation_mesh_type1, interpolation_mesh_type2, LeftExtrapolationRule1, RightExtrapolationRule1, LeftExtrapolationRule2, RightExtrapolationRule2, IDimX >::deriv_dim_2 ( ddc::Coordinate< CoordsDims... > const & coord_eval,
ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef ) const
inline

Get the value of the derivative of the second dimension of the function on B-splines at the coordinate given.

Parameters
[in]coord_evalThe 2D coordinate where we want to evaluate the derivative of the second dimension of the function.
[in]spline_coefThe B-splines coefficients of the function we want to evaluate.
Returns
A double containing the value of the derivative of the second dimension of the function at the coordinate given.

◆ deriv_1_and_2() [1/2]

template<class Layout , class... CoordsDims>
KOKKOS_FUNCTION double ddc::SplineEvaluator2D< ExecSpace, MemorySpace, BSplinesType1, BSplinesType2, interpolation_mesh_type1, interpolation_mesh_type2, LeftExtrapolationRule1, RightExtrapolationRule1, LeftExtrapolationRule2, RightExtrapolationRule2, IDimX >::deriv_1_and_2 ( ddc::Coordinate< CoordsDims... > const & coord_eval,
ddc::ChunkSpan< double const, spline_domain_type, Layout, memory_space > const spline_coef ) const
inline

Get the value of the cross derivative of the function on B-splines at the coordinate given.

Parameters
[in]coord_evalThe 2D coordinate where we want to evaluate the cross derivative of the function.
[in]spline_coefThe B-splines coefficients of the function we want to evaluate.
Returns
A double containing the value of the cross derivative of the function at the coordinate given.

◆ deriv() [1/2]

◆ deriv2() [1/2]

◆ deriv_dim_1() [2/2]

Get the values of the derivative of the first dimension of the function on B-splines at the coordinates given.

Parameters
[out]spline_evalA ChunkSpan with the values of the derivative of the first dimension of the function at the coordinates given.
[in]coords_evalA ChunkSpan with the 2D coordinates where we want to evaluate the derivative of the first dimension of the function.
[in]spline_coefThe B-splines coefficients of the function we want to evaluate.

◆ deriv_dim_2() [2/2]

Get the values of the derivative of the second dimension of the function on B-splines at the coordinates given.

Parameters
[out]spline_evalA ChunkSpan with the values of the derivative of the second dimension of the function at the coordinates given.
[in]coords_evalA ChunkSpan with the 2D coordinates where we want to evaluate the derivative of the second dimension of the function.
[in]spline_coefThe B-splines coefficients of the function we want to evaluate.

◆ deriv_1_and_2() [2/2]

Get the values of the cross derivative of the function on B-splines at the coordinates given.

Parameters
[out]spline_evalA ChunkSpan with the values of the cross derivative of the function at the coordinates given.
[in]coords_evalA ChunkSpan with the 2D coordinates where we want to evaluate the cross derivative of the function.
[in]spline_coefThe B-splines coefficients of the function we want to evaluate.

◆ deriv() [2/2]

◆ deriv2() [2/2]

◆ integrate()

Get the the integral of the function on B-splines on the domain.

Parameters
[out]integralsThe integrals of the function
[in]spline_coefThe B-splines coefficients of the function we want to integrate.

The documentation for this class was generated from the following file: