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

Starting from a checkpoint with different adaptivity parameters #184

Open
david-montiel-t opened this issue Apr 20, 2022 · 1 comment
Open

Comments

@david-montiel-t
Copy link
Contributor

There may be issues when restarting a simulation with different adaptive criteria than the original simulation.

For example, consider a simulation with minimum and maximum refinement levels set to 5 and 7, respectively. The simulation is run starting from time t=0 for Ns time steps and it outputs a the last checkpoint at time step Nc. If we restart the simulation from checkpoint corresponding to Nc but for the new simulation modify the minimum and maximum refinement levels to 4 and 6, respectively, the mesh in the region of the system corresponding to level 7 will not unadapt and stop evolving.

@landinjm
Copy link
Contributor

This has to do with the refinement criterion logic & perhaps the order of loading restarts and calling for AMR in init.cc. Should be an easy fix.

//limit the maximal and minimal refinement depth of the mesh
unsigned int current_level = t_cell->level();
if ( (mark_refine && current_level < userInputs.max_refinement_level) ){
cell->set_refine_flag();
}
else if (!mark_refine && current_level > userInputs.min_refinement_level) {
cell->set_coarsen_flag();
}

Keep in mind that we should warn the user that this is happening.

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

No branches or pull requests

2 participants