A class to evaluate all the splines of all the patches at once. More...
Classes | |
struct | eval_deriv_type |
Tag to indicate that derivative of the spline should be evaluated. More... | |
struct | eval_type |
Tag to indicate that the value of the spline should be evaluated. More... | |
Public Types | |
template<class Patch > | |
using | continuous_dimension_type1 = typename BSpline1OnPatch< Patch >::continuous_dimension_type |
The type of the first evaluation continuous dimension used by this class. | |
template<class Patch > | |
using | continuous_dimension_type2 = typename BSpline2OnPatch< Patch >::continuous_dimension_type |
The type of the second evaluation continuous dimension used by this class. | |
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. | |
template<class Patch > | |
using | evaluation_discrete_dimension_type1 = Grid1OnPatch< Patch > |
The type of the first discrete dimension of interest used by this class. | |
template<class Patch > | |
using | evaluation_discrete_dimension_type2 = Grid2OnPatch< Patch > |
The type of the second discrete dimension of interest used by this class. | |
template<class Patch > | |
using | bsplines_type1 = BSpline1OnPatch< Patch > |
The discrete dimension representing the B-splines along first dimension. | |
template<class Patch > | |
using | bsplines_type2 = BSpline2OnPatch< Patch > |
The discrete dimension representing the B-splines along second dimension. | |
template<class Patch > | |
using | evaluation_idx_range_type1 = IdxRange< evaluation_discrete_dimension_type1< Patch > > |
The type of the domain for the 1D evaluation mesh along first dimension used by this class. | |
template<class Patch > | |
using | evaluation_idx_range_type2 = IdxRange< evaluation_discrete_dimension_type2< Patch > > |
The type of the domain for the 1D evaluation mesh along second dimension used by this class. | |
template<class Patch > | |
using | evaluation_idx_range_type = IdxRange< evaluation_discrete_dimension_type1< Patch >, evaluation_discrete_dimension_type2< Patch > > |
The type of the domain for the 2D evaluation mesh used by this class. | |
template<class Patch > | |
using | batched_evaluation_idx_range_type = typename ValuesOnPatch< Patch >::discrete_domain_type |
The type of the whole domain representing evaluation points. | |
template<class Patch > | |
using | spline_idx_range_type1 = IdxRange< bsplines_type1< Patch > > |
The type of the 1D spline domain corresponding to the first dimension of interest. | |
template<class Patch > | |
using | spline_idx_range_type2 = IdxRange< bsplines_type2< Patch > > |
The type of the 1D spline domain corresponding to the second dimension of interest. | |
template<class Patch > | |
using | spline_idx_range_type = IdxRange< bsplines_type1< Patch >, bsplines_type2< Patch > > |
The type of the 2D spline domain corresponding to the dimensions of interest. | |
template<class Patch > | |
using | SplineCoeffOnPatch = DConstField< spline_idx_range_type< Patch >, MemorySpace > |
Type for MultipatchType: A field of 2D spline coefficients for a non-batched spline defined on both of the Patch's logical dimensions. | |
Public Member Functions | |
MultipatchSplineEvaluator2D (PatchLocator const &patch_locator, ExtrapolationRule const &extrapolation_rule) | |
Instantiate a MultipatchSplineEvaluator2D. | |
template<class Coord > | |
KOKKOS_FUNCTION double | operator() (Coord const coord_eval, MultipatchSplineCoeff const &patches_splines) const |
Evaluate the 2D splines (described by their spline coefficients) at a given coordinate. | |
void | operator() (MultipatchValues const &patches_values, MultipatchCoordField const &patches_coords, MultipatchSplineCoeff const &patches_splines) const |
Evaluate 2D splines (described by their spline coefficients) on meshes. | |
template<class Coord > | |
KOKKOS_FUNCTION double | deriv_dim_1 (Coord const &coord_eval, MultipatchSplineCoeff const &patches_splines) const |
Differentiate 2D splines (described by their spline coefficients) at a given coordinate along first dimension of interest. | |
template<class Coord > | |
KOKKOS_FUNCTION double | deriv_dim_2 (Coord const &coord_eval, MultipatchSplineCoeff const &patches_splines) const |
Differentiate 2D splines (described by their spline coefficients) at a given coordinate along second dimension of interest. | |
template<class Coord > | |
KOKKOS_FUNCTION double | deriv_1_and_2 (Coord const &coord_eval, MultipatchSplineCoeff const &patches_splines) const |
Cross-differentiate 2D splines (described by their spline coefficients) at a given coordinate. | |
template<class InterestDim , class Dim1 , class Dim2 > | |
KOKKOS_FUNCTION double | deriv (Coord< Dim1, Dim2 > const &coord_eval, MultipatchSplineCoeff const &patches_splines) const |
Differentiate 2D splines (described by their spline coefficients) at a given coordinate along a specified dimension of interest. | |
void | deriv_dim_1 (MultipatchValues const &patches_deriv_1, MultipatchCoordField const &patches_coords, MultipatchSplineCoeff const &patches_splines) const |
Differentiate 2D splines (described by their spline coefficients) on a meshes along first dimension of interest. | |
void | deriv_dim_2 (MultipatchValues const &patches_deriv_2, MultipatchCoordField const &patches_coords, MultipatchSplineCoeff const &patches_splines) const |
Differentiate 2D splines (described by their spline coefficients) on a meshes along second dimension of interest. | |
void | deriv_1_and_2 (MultipatchValues const &patches_deriv_12, MultipatchCoordField const &patches_coords, MultipatchSplineCoeff const &patches_splines) const |
Cross-differentiate 2D splines (described by their spline coefficients) on a meshes. | |
void | integrate (DKokkosView_h< n_patches > const &integrals, MultipatchSplineCoeff const &patches_splines) const |
Integration of splines (described by their spline coefficients). | |
template<class EvalType1 , class EvalType2 , class StoringPatch > | |
void | apply_evaluator (ValuesOnPatch< StoringPatch > const &patch_values, CoordConstFieldOnPatch< StoringPatch > const &patch_coords, MultipatchSplineCoeff const patches_splines) const |
Compute the values or the derivatives of a given patch at the coordinates defined on the given patch. | |
template<class Patch > | |
void | apply_integrate (double &integral, SplineCoeffOnPatch< Patch > const &spline_coef) const |
Integrate the spline defined on the given patch. | |
Static Public Attributes | |
static constexpr std::size_t | n_patches = ddc::type_seq_size_v<PatchOrdering> |
The number of patches. | |
A class to evaluate all the splines of all the patches at once.
This class computes the evaluations of the splines defined on each pacth at given coordinates. The class does not need to instantiate in advance individual spline evaluators. The coordinates are stored in fields on each patch. On a given storing patch, we do not enforce that a coordinate is physically located on this storing patch. These fields of coordinates can be the result of characteristics equations solving.
This function is useful to avoid calling all the spline evaluators individually, especially in a multipatch geometry with several patches. It also manages to evaluate the right spline at a coordinate physically located on another patch than the storing patch.
Additionally, methods to compute the first derivatives and cross-derivatives are implemented.
ExecSpace | The space (CPU/GPU) where the calculations are carried out. |
MemorySpace | The space (CPU/GPU) where the coefficients and values are stored. |
BSpline1OnPatch | A type alias which provides the first BSpline type along which the splines are built template on the Patch. |
BSpline2OnPatch | A type alias which provides the second BSpline type along which the splines are built template on the Patch. |
Grid1OnPatch | A type alias which provides the first Grid type along which the interpolation points of the splines are found template on the Patch. |
Grid2OnPatch | A type alias which provides the second Grid type along which the interpolation points of the splines are found template on the Patch. |
ExtrapolationRule | The extrapolation rule type for outside of the global domain. |
ValuesOnPatch | A Field type storing the evaluated values of the splines. Template on the Patch. |
PatchLocator | A operator that finds the patch where a given coordinate is physically located. |
Pacthes | A variadic template of all the patches. |
struct MultipatchSplineEvaluator2D::eval_deriv_type |
Tag to indicate that derivative of the spline should be evaluated.
struct MultipatchSplineEvaluator2D::eval_type |
Tag to indicate that the value of the spline should be evaluated.
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::continuous_dimension_type1 = typename BSpline1OnPatch<Patch>::continuous_dimension_type |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::continuous_dimension_type2 = typename BSpline2OnPatch<Patch>::continuous_dimension_type |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::evaluation_discrete_dimension_type1 = Grid1OnPatch<Patch> |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::evaluation_discrete_dimension_type2 = Grid2OnPatch<Patch> |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::bsplines_type1 = BSpline1OnPatch<Patch> |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::bsplines_type2 = BSpline2OnPatch<Patch> |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::evaluation_idx_range_type1 = IdxRange<evaluation_discrete_dimension_type1<Patch> > |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::evaluation_idx_range_type2 = IdxRange<evaluation_discrete_dimension_type2<Patch> > |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::evaluation_idx_range_type = IdxRange< evaluation_discrete_dimension_type1<Patch>, evaluation_discrete_dimension_type2<Patch> > |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::batched_evaluation_idx_range_type = typename ValuesOnPatch<Patch>::discrete_domain_type |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::spline_idx_range_type1 = IdxRange<bsplines_type1<Patch> > |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::spline_idx_range_type2 = IdxRange<bsplines_type2<Patch> > |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::spline_idx_range_type = IdxRange<bsplines_type1<Patch>, bsplines_type2<Patch> > |
using MultipatchSplineEvaluator2D< ExecSpace, MemorySpace, BSpline1OnPatch, BSpline2OnPatch, Grid1OnPatch, Grid2OnPatch, ExtrapolationRule, ValuesOnPatch, PatchLocator, Patches >::SplineCoeffOnPatch = DConstField<spline_idx_range_type<Patch>, MemorySpace> |
Type for MultipatchType: A field of 2D spline coefficients for a non-batched spline defined on both of the Patch's logical dimensions.
Needed public for functions on GPU.
|
inline |
Instantiate a MultipatchSplineEvaluator2D.
patch_locator | An operator to locate a coordinate. The mapping stored in this class has to be invertible. |
extrapolation_rule | The extrapolation rules. |
|
inline |
Evaluate the 2D splines (described by their spline coefficients) at a given coordinate.
The spline coefficients represent a 2D spline function defined on a B-splines (basis splines). They can be obtained via various methods, such as using a SplineBuilder2D or MultipatchSplineBuilder2D. The coordinate is defined on one patch. But it can be physically located on another patch.
StoringPatch | Patch type where the given coordinate is stored. It does not mean that the coordinate is physically located on the patch. |
coord_eval | The coordinate where the spline is evaluated. |
patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Evaluate 2D splines (described by their spline coefficients) on meshes.
See MultipatchSplineEvaluatorOperator.
[out] | patches_values | A MultipatchType of DField to store the values of the splines at the given coordinates. |
[in] | patches_coords | A MultipatchType of Field of Coordinate storing the coordinates of the meshes. |
[in] | patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Differentiate 2D splines (described by their spline coefficients) at a given coordinate along first dimension of interest.
See MultipatchSplineEvaluatorOperator.
StoringPatch | Patch type where the given coordinate is stored. It does not mean that the coordinate is physically located on the patch. |
coord_eval | The coordinate where the spline is differentiated. |
patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Differentiate 2D splines (described by their spline coefficients) at a given coordinate along second dimension of interest.
See MultipatchSplineEvaluatorOperator.
StoringPatch | Patch type where the given coordinate is stored. It does not mean that the coordinate is physically located on the patch. |
coord_eval | The coordinate where the spline is differentiated. |
patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Cross-differentiate 2D splines (described by their spline coefficients) at a given coordinate.
See MultipatchSplineEvaluatorOperator.
StoringPatch | Patch type where the given coordinate is stored. It does not mean that the coordinate is physically located on the patch. |
coord_eval | The coordinate where the spline is differentiated. |
patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Differentiate 2D splines (described by their spline coefficients) at a given coordinate along a specified dimension of interest.
See MultipatchSplineEvaluatorOperator.
InterestDim | Dimension of StoringPatch along which differentiation is performed. |
StoringPatch | Patch type where the given coordinate is stored. It does not mean that the coordinate is physically located on the patch. |
coord_eval | The coordinate where the spline is differentiated. |
patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Differentiate 2D splines (described by their spline coefficients) on a meshes along first dimension of interest.
See MultipatchSplineEvaluatorOperator.
[out] | patches_deriv_1 | A MultipatchType of DField to store the derivatives of the splines at the given coordinates. |
[in] | patches_coords | A MultipatchType of Field of Coordinate storing the coordinates of the meshes. |
[in] | patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Differentiate 2D splines (described by their spline coefficients) on a meshes along second dimension of interest.
See MultipatchSplineEvaluatorOperator.
[out] | patches_deriv_2 | A MultipatchType of DField to store the derivatives of the splines at the given coordinates. |
[in] | patches_coords | A MultipatchType of Field of Coordinate storing the coordinates of the meshes. |
[in] | patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Cross-differentiate 2D splines (described by their spline coefficients) on a meshes.
See MultipatchSplineEvaluatorOperator.
[out] | patches_deriv_12 | A MultipatchType of DField to store the cross-derivatives of the splines at the given coordinates. |
[in] | patches_coords | A MultipatchType of Field of Coordinate storing the coordinates of the meshes. |
[in] | patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Integration of splines (described by their spline coefficients).
See MultipatchSplineEvaluatorOperator.
[out] | integrals | An Kokkos::View on host containing the integrals of each spline on each patch. |
[in] | patches_splines | A MultipatchType of DField storing the 2D spline coefficients. |
|
inline |
Compute the values or the derivatives of a given patch at the coordinates defined on the given patch.
Needed public for functions on GPU.
EvalType1 | Evaluation type: either eval_type or eval_deriv_type. |
EvalType2 | Evaluation type: either eval_type or eval_deriv_type. |
StoringPatch | Patch type where the given coordinates are stored. They are not especially physically located on this patch. |
[out] | patch_values | Field of values of the function or derivative. |
[in] | patch_coords | ConstField of coordinates defined on the StoringPatch and where we want to evaluate the function or derivative. |
[in] | patches_splines | MultipatchType of spline coefficients of the splines on every patches. |
|
inline |
Integrate the spline defined on the given patch.