From 57d8ff01cf929a0f712e789e77b826e2be2d046d Mon Sep 17 00:00:00 2001 From: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:54:07 -0800 Subject: [PATCH] Apply suggestions from code review Weiquns suggestions Co-authored-by: Weiqun Zhang --- Source/Utils/WarpXTagging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Utils/WarpXTagging.cpp b/Source/Utils/WarpXTagging.cpp index 807c92b2f0b..ed9daeb5480 100644 --- a/Source/Utils/WarpXTagging.cpp +++ b/Source/Utils/WarpXTagging.cpp @@ -47,7 +47,7 @@ WarpX::ErrorEst (int lev, TagBoxArray& tags, Real /*time*/, int /*ngrow*/) const RealVect pos {AMREX_D_DECL((i+0.5_rt)*dx[0]+problo[0], (j+0.5_rt)*dx[1]+problo[1], (k+0.5_rt)*dx[2]+problo[2])}; - bool tag_val = 0; + bool tag_val = false; if (ref_parser) { #if defined (WARPX_DIM_3D) tag_val = (ref_parser(pos[0], pos[1], pos[2]) == 1); @@ -61,7 +61,7 @@ WarpX::ErrorEst (int lev, TagBoxArray& tags, Real /*time*/, int /*ngrow*/) } else { tag_val = (pos > ftlo && pos < fthi); } - if ( tag_val == 1) { + if (tag_val) { fab(i,j,k) = TagBox::SET; } });