Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodicity is not handled in the derivative evaluation of splines #646

Open
tpadioleau opened this issue Sep 13, 2024 · 2 comments
Open

Comments

@tpadioleau
Copy link
Member

tpadioleau commented Sep 13, 2024

reported by @Paulinemoi

@Paulinemoi
Copy link

In SplineEvaluator, the operator() replaces an outside coordinate inside of the domain if it is defined on a periodic dimension.
However the deriv() does not proceed the same. So if we want to get the derivative of a spline at an outside coordinate defined on a periodic dimension, it raises an error.

To replace the outside coordinate, the implementation is done in the private eval() method (https://github.com/CExA-project/ddc/blob/54979b6fe4d46f39468426a60783278789cf8f66/include/ddc/kernels/splines/spline_evaluator.hpp#L404C1-L422C10). In the derivative operators, the eval_no_bc() is directly called.

As we don't give any extrapolation rules for the derivatives, we can assume that we won't evaluate the derivative outside of the domain. But I don't know if the periodic case is supposed to be considered as outside of the domain.

The same question can be raised for SplineEvaluator2D and deriv_dim_1(), deriv_dim_2(), deriv_1_and_2(), deriv() and deriv2().

SplineEvaluator: https://github.com/CExA-project/ddc/blob/main/include/ddc/kernels/splines/spline_evaluator.hpp.
SplineEvaluator2D: https://github.com/CExA-project/ddc/blob/main/include/ddc/kernels/splines/spline_evaluator_2d.hpp

@tpadioleau
Copy link
Member Author

thank you for the detailed explanation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants