Skip to content

Commit

Permalink
CarpetX: calculate min_level from high to low
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Aug 22, 2024
1 parent 257a893 commit 7f72aa5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CarpetX/src/schedule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1621,10 +1621,13 @@ int Evolve(tFleshConfig *config) {

for (const auto &patchdata : ghext->patchdata) {

int min_active_level = 0;
for (int min_level = 0; min_level < ghext->num_levels(); ++min_level)
int min_active_level =
ghext->num_levels(); // start with regrid no levels
for (int min_level = ghext->num_levels() - 1; min_level >= 0;
--min_level)
if (patchdata.leveldata.at(min_level).iteration == iteration) {
min_active_level = min_level;
} else {
break;
}

Expand Down

0 comments on commit 7f72aa5

Please sign in to comment.