-
Notifications
You must be signed in to change notification settings - Fork 11
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
CarpetX: Add interpolator self-checks #326
base: main
Are you sure you want to change the base?
Conversation
This mostly improves error messages (when built with |
CCTK_VINFO("patch %d level %d component %d old_nparticles: %zu", | ||
patch, lev, component, particles.size()); | ||
// CCTK_VINFO("patch %d level %d component %d old_nparticles: %zu", | ||
// patch, lev, component, particles.size()); |
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'd remove or move behind a #ifdef DEBUG this code.
CCTK_VINFO("patch %d level %d component %d new_nparticles: %zu", | ||
patch, lev, component, particles.size()); | ||
// CCTK_VINFO("patch %d level %d component %d new_nparticles: %zu", | ||
// patch, lev, component, particles.size()); |
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'd remove or move behind a #ifdef DEBUG this code.
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.
(also similar in line 611ff below)
@@ -850,6 +889,7 @@ extern "C" void CarpetX_Interpolate(const CCTK_POINTER_TO_CONST cctkGH_, | |||
// Set result | |||
CCTK_REAL *const restrict *const restrict resultptrs = | |||
static_cast<CCTK_REAL *const *>(resultptrs_); | |||
assert(int(recvbuf.size()) == (nvars + 1) * npoints); |
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.
assert
is too late the code in CCTK_DEBUG
in line 876 alreay touches all points.
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.
This assert
can trigger if there are points outside of the domain, can't it?
In that case this assert
does not adhere to the API set out in the ReferenceManual for CCTK InterpGridArrays
which documents CCTK ERROR INTERP POINT OUTSIDE
as a possible return value and does not indicate that the code would abort.
No description provided.