If the grid has changed, rebuild the full multigrid tree
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n_coarsen | |||
| integer, | intent(in) | :: | n_refine |
subroutine mg_update_refinement(n_coarsen, n_refine) use mod_global_parameters integer, intent(in) :: n_coarsen integer, intent(in) :: n_refine ! Don't build multigrid tree while doing initial refinement if (.not. time_advance) return if (.not. mg%is_allocated) then call mg_tree_from_amrvac(mg) else if (n_coarsen + n_refine > 0) then call mg_deallocate_storage(mg) call mg_tree_from_amrvac(mg) end if end subroutine mg_update_refinement