From 55d3800c67481aeff8c05b35f3c102b17733720a Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Fri, 26 Apr 2024 19:43:15 -0400 Subject: [PATCH] fix again --- Source/driver/Castro.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index 6a03660c42..28691bded4 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -591,7 +591,12 @@ Castro::read_params () if (ppr.countval("max_level") > 0) { int max_level; ppr.get("max_level", max_level); + BL_ASSERT(max_level <= MAX_LEV); info.SetMaxLevel(max_level); + } else { + // the default max_level of AMRErrorTagInfo is 1000, but make sure + // that it is reasonable for Castro + info.SetMaxLevel(MAX_LEV); } if (ppr.countval("volume_weighting") > 0) { int volume_weighting; @@ -604,10 +609,6 @@ Castro::read_params () info.SetDerefine(derefine); } - // the default max_level of AMRErrorTagInfo is 1000, but make sure - // that it is reasonable for Castro - BL_ASSERT(info.m_max_level < MAX_LEV); - if (ppr.countval("value_greater")) { Vector value; ppr.getarr("value_greater", value, 0, ppr.countval("value_greater"));