CExA-project / ddc

DDC is a discrete domain computation library.
https://ddc.mdls.fr
Other
32 stars 4 forks source link

BSplines::discrete_dimension_type is ambiguous #654

Closed blegouix closed 5 days ago

blegouix commented 5 days ago

The convention there:

https://github.com/CExA-project/ddc/blob/f0f78143168fafbac55d1ad8fe1e8e12c16858b2/include/ddc/kernels/splines/bsplines_uniform.hpp#L104

/// @brief The type of the discrete dimension representing the B-splines.
using discrete_dimension_type = UniformBSplines;

Is not aligned with the one here:

https://github.com/CExA-project/ddc/blob/f0f78143168fafbac55d1ad8fe1e8e12c16858b2/include/ddc/kernels/splines/spline_builder.hpp#L81

/// @brief The type of the interpolation discrete dimension (discrete dimension of interest) used by this class.
using interpolation_discrete_dimension_type = InterpolationDDim;

/// @brief The discrete dimension representing the B-splines.
using bsplines_type = BSplines;

It may be better to have something like (in bsplines_uniform.hpp):

/// @brief The discrete dimension on which the support of the B-splines are defined.
using interpolation_discrete_dimension_type = DDim;

/// @brief The discrete dimension representing the B-splines.
using bsplines_type = UniformBSplines;
tpadioleau commented 5 days ago

Hi @blegouix, I don't feel there is an ambiguity. The type alias discrete_dimension_type in DDC is a convention to retrieve the type of dimension in template code for example, it is also defined in PointSampling.

About interpolation_discrete_dimension_type in the B-Splines classes, I don't think there is a notion of interpolation in these classes. The value you give, DDim, does not seem to be correct either, in this context DDim refers to the name of the B-Splines.

Maybe I did not get the intent. If so can you give a more concrete example, without generic code/templates.

blegouix commented 5 days ago

Sorry I was completly out of point by assuming DDim was the spatial discrete dimension, not the one identifying the BSplines (as I have myself written in the doc months ago ^^')