-
Notifications
You must be signed in to change notification settings - Fork 251
[WIP] Improve free surface accuracy #6284
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
base: main
Are you sure you want to change the base?
[WIP] Improve free surface accuracy #6284
Conversation
Hi Gassmoeller, I would like to report an error I encountered while running ASPECT 3.1.0-pre with deal.II 9.7.0-pre in a 3D MPI parallel environment (64 processes), in debug mode. The error occurs when resuming from a snapshot, during the solution transfer step ( (data_range.size() % bytes_per_entry == 0) violated This triggers an abort with a detailed stack trace pointing to Additional remarks:
Would you have any suggestions or insights on whether this is a known problem, or how to proceed with debugging or workaround? Thank you very much for your help and time! |
Thanks for the report. I dont have an obvious candidate for what is going wrong, but will think a bit about it. Just to make sure: This checkpoint you are resuming from was already written with the new version of ASPECT and deal.II, correct? Old checkpoints will not be compatible with this version of ASPECT and deal.II (because the field in which we store the mesh displacements is different between this version and the current development version on the main branch). |
Thank you for your message. Yes, the checkpoint I am resuming from was created with the latest branch of ASPECT and deal.II. I have also just tried running the simulation completely from scratch with this version, but I encountered the same error. Please let me know if you need any further information or logs to help diagnose the issue. |
I took a quick look through the code, but didnt see anything obvious that would break with this PR. Could you try to simplify your model setup as much as possible, and then post a simple .prm file that creates the error for you? Then I could try to reproduce the problem. |
Thank you very much for taking the time to review the code! I appreciate your suggestion to simplify the model setup. I have prepared a pr-6284.prm.txt file that reproduces the issue I encountered. This parameter file uses ASPECT version 3.1.0-pre (pr-6284, commit 0e7ecaf) together with deal.II 9.7.0-pre (pr-18396, commit 6e3761e52d). Please let me know if you need any further information or assistance in reproducing the problem. I look forward to your feedback! |
Thanks for posting the input file 👍. I will take a look during the next days when time permits. I also found another issue with this PR, which is that models with particles do not work correctly with the changes. Both issues will have to be fixed or at least understood before we can move forward with this PR. |
Dear @gassmoeller, Thank you very much for your attention and time regarding the issues. I would like to share that I have added a new function in my dealii branch set_mapping_particle_handler to address the particle handler mapping update: template <int dim, int spacedim>
void ParticleHandler<dim, spacedim>::set_mapping(const Mapping<dim, spacedim> *new_mapping)
{
mapping = new_mapping;
} I have not submitted a pull request yet because I have not fully reviewed the dealii contribution guidelines and coding style requirements. In ASPECT, after the line sim.mapping.reset(new MappingQEulerian<dim, LinearAlgebra::Vector>...); I call this new function for each particle manager as follows: for (auto &pm : sim.particle_managers)
pm.set_mapping(sim.mapping.get()); Although I am not entirely sure if this is the most appropriate or clean solution, my tests so far indicate that it works correctly without obvious problems. I sincerely appreciate your ongoing efforts on this, and I look forward to any suggestions or guidance you might have. |
Ah, you have thought this through further than I did. Your solution would probably work, but adding new deal.II functions will complicate the transition a bit, because ASPECT needs to stay backward compatible to earlier deal.II for a while. Could you try if using the function |
ad2e075
to
ee7942d
Compare
@tiannh7 I uploaded a new version of this PR that seems to restart successfully with the .prm file you provided. Could you give this new version a try? Keep in mind I have not tested this for accuracy or stability, I only made sure it runs. So benchmarking is advised before relying on the results of this changed version. |
I appreciate your work and will share feedback once testing is complete. |
Hi @gassmoeller, Thank you very much for the updated version of the PR. I have completed the testing and can confirm that the initialization and model restart are working perfectly with the provided prm file. However, I have not yet performed any accuracy or stability tests. Also, if I may mention, regarding the visco-elastic problems, I recall from browsing the Use correct stresses in visco-elasto-plastic rheology PR that there seem to be some discrepancies between the particle method and the field method results. This might be something worth keeping in mind during further validation. Thanks again for your work on this! |
We will need to modify aspect/source/mesh_deformation/interface.cc Lines 963 to 966 in ee7942d
to pick the correct degree. I am happy to do the change. |
Hi Timo, Thank you very much for your reply and for following up on this. My preliminary tests have shown that both AMG and GMG exhibit divergence or lack of convergence issues in some non-Cartesian problems. It seems that the entire AMG and GMG workflow might need a thorough review, or this could be related to the EV or SUPG stabilization schemes. I’ll keep you updated if I make any further progress in my testing. |
This PR is for @tiannh7 to test free surface accuracy.
Do not review yet, this needs some testing and cleanup.
This is based on #4379.