CExA-project / ddc

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

User-defined spline interpolation points #659

Open EmilyBourne opened 1 month ago

EmilyBourne commented 1 month ago

When using splines DDC provides 2 options for defining interpolation points:

Sometimes it is useful to be able to use user-defined points (as long as the provided points are compatible with the definition). For example if the points come from real world data or we want to test a new way of defining points.

tpadioleau commented 1 month ago

I understand these 2 options as helpers. The SplineBuilder class should be able to take any sampling, the constructor allows it, see https://github.com/CExA-project/ddc/blob/88375b9a824408877f9bfc9de6dc4d732b65ef1b/include/ddc/kernels/splines/spline_builder.hpp#L195-L198

As of now it is the responsibility of the user to be sure the mesh is admissible. There is no check on the DDC side.

EmilyBourne commented 1 month ago

I agree that these are helpers. The new class would also be a helper. It would allow the same commands to be used no matter how the points are chosen and would check if the points are valid for the spline in question.

See https://gitlab.maisondelasimulation.fr/gysela-developpers/gyselalibxx/-/blob/c2fddc0b282f29ce4b4303ab7f64556019f7f402/src/utils/non_uniform_interpolation_points.hpp

tpadioleau commented 1 month ago

What do you think of transferring these checks in the constructor ? Do you know if the checks ensure the invertibility of the matrix ? Do you know if Greville points and Knots as interpolation points pass these tests ?

EmilyBourne commented 1 month ago

I think that would make sense. These checks should ensure the invertibility of the matrix. Certainly if they are not satisfied then the matrix will not be invertible.

Greville points and Knots as interpolation points satisfy these conditions