Skip to content

Commit

Permalink
Fix scope of f_lev
Browse files Browse the repository at this point in the history
  • Loading branch information
maximumcats committed Apr 7, 2024
1 parent f002df3 commit fc74e27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Src/Amr/AMReX_AmrLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ AmrLevel::writePlotFile (const std::string& dir,
// if the State_Type is ::Interval, this will get t^{n+1/2} instead of t^n
Real cur_time = state[0].curTime();

int f_lev = std::min(parent->plotMaxLevel(), parent->finestLevel());

if (level == 0 && ParallelDescriptor::IOProcessor())
{
//
Expand Down Expand Up @@ -218,7 +220,6 @@ AmrLevel::writePlotFile (const std::string& dir,

os << AMREX_SPACEDIM << '\n';
os << parent->cumTime() << '\n';
int f_lev = std::min(parent->plotMaxLevel(), parent->finestLevel());
os << f_lev << '\n';
for (i = 0; i < AMREX_SPACEDIM; i++) {
os << Geom().ProbLo(i) << ' ';
Expand Down Expand Up @@ -290,7 +291,7 @@ AmrLevel::writePlotFile (const std::string& dir,
RealBox gridloc = RealBox(grids[i],geom.CellSize(),geom.ProbLo());
for (n = 0; n < AMREX_SPACEDIM; n++) {
os << gridloc.lo(n) << ' ' << gridloc.hi(n) << '\n';
}
}
}
//
// The full relative pathname of the MultiFabs at this level.
Expand Down

0 comments on commit fc74e27

Please sign in to comment.