Skip to content

Commit

Permalink
CarpetX: calculate min_level start from patchdata.leveldata.size
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Aug 27, 2024
1 parent c412a38 commit fe614f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CarpetX/src/schedule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1621,15 +1621,15 @@ int Evolve(tFleshConfig *config) {

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

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

const int old_numlevels = patchdata.amrcore->finestLevel() + 1;
patchdata.amrcore->level_modified.clear();
Expand Down

0 comments on commit fe614f8

Please sign in to comment.