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
Save and load user_data for p4est #1915
base: main
Are you sure you want to change the base?
Conversation
this fixes restating when using AMR
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1915 +/- ##
=======================================
Coverage 96.30% 96.30%
=======================================
Files 450 450
Lines 36182 36182
=======================================
Hits 34843 34843
Misses 1339 1339
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Can we have a CI test for 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.
Looks more or less good to me, I only have one small suggestion.
I also second @ranocha's request for a test (if possible).
end | ||
|
||
# Load `p4est` from file | ||
# 2D | ||
function load_p4est(file, ::Val{2}) | ||
conn_vec = Vector{Ptr{p4est_connectivity_t}}(undef, 1) | ||
comm = P4est.uses_mpi() ? mpi_comm() : C_NULL # Use Trixi.jl's MPI communicator if p4est supports MPI | ||
p4est_load_ext(file, comm, 0, 0, 1, 0, C_NULL, pointer(conn_vec)) | ||
p4est_load_ext(file, comm, 2 * sizeof(Int), 1, 1, 0, C_NULL, pointer(conn_vec)) |
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 know there wasn't a comment here before, but maybe you can add one that explains what this line does?
I am still unhappy with this fix. While I also do not know if there was a good reason for not saving user data in the first place. |
This fixes restating when using AMR.
Resolves #1914