forked from EinsteinToolkit/CarpetX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CarpetX: simplify calculating min_level for regriding
- Loading branch information
Showing
1 changed file
with
8 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
will crash if that patch does not contain this level.
Also I would not initialize min_active_level with a value value. Instead pick an invalid one (-1) and assert after the loop that it is no longer -1.
FInally I'd actually turn the loop around and go from finest to coarsest to explicitly document in code that all finer levels have the correct iteration.