-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add functions to check if the provided interpolation points are valid #686
Conversation
auto current_cell_end_idx = ddc::discrete_space<BSplines>().break_point_domain().front() + 1; | ||
ddc::for_each(interpolation_domain(), [&](auto idx) { | ||
ddc::Coordinate<continuous_dimension_type> point = ddc::coordinate(idx); | ||
if (point == ddc::coordinate(current_cell_end_idx)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we relax this condition with a tolerance to avoid numerical instabilities ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I don't think so. The less than and greater than cases are both covered. Equal to only needs treating separately because it is in 2 cells. If we are at knot+eps then there is no ambiguity so no special treatment is necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so if I understand correctly, in this case you assign the point to one cell ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes exactly. I can add a comment to explain this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments added : 3e3d35c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry but I don't get the logic of the check. Are we checking the number of points in each cell ? If so shouldn't current_cell_end_idx
increment in the loop as soon as point > ddc::coordinate(current_cell_end_idx)
is true ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I agree. Either I missed something while copy/pasting or the error output isn't correct in Gysela either. I don't see where current_cell_idx
is updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 26840d5
@tpadioleau Any idea what is wrong with the docs? There is nothing in the CI. If I try locally I get an error on a file that I didn't touch so maybe I have a different doxygen version |
I will have a look. Sorry i thought i had already made the CI print the doxygen.log file. I had this issue not so long ago. |
I think the |
I think you are correct, I am trying something |
KOKKOS_INLINE_FUNCTION discrete_element_type eval_basis( | ||
DSpan1D values, | ||
ddc::Coordinate<CDim> const& x, | ||
[[maybe_unused]] std::size_t degree) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect it comes from the [[maybe_unused]]
here but first I would like to see if the CI can display the error.
It worked, see https://github.com/CExA-project/ddc/actions/runs/12067535482/job/33650784704. In the end it is the same issue as the |
Shall we call the function in the constructor ? |
6e1e38a
to
240dbf1
Compare
I am trying to implement tests that would trigger one of the exceptions using the SplineBuilder constructor. I first tried with a too short I don't have yet an idea to workaround this. |
|
We can, the linter will complain but I can disable it. |
268938c
to
fdc6c0b
Compare
b0ef58f
to
012fbb4
Compare
@EmilyBourne can you review the test ? |
012fbb4
to
0452340
Compare
Closes #659