From ef0899c92d5834b84244b972b601f18fdb850a20 Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Sat, 31 Aug 2024 09:52:52 -0700 Subject: [PATCH] make compiler happy --- src/prob/prob_bc.H | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/prob/prob_bc.H b/src/prob/prob_bc.H index 68d43b87..74c4878e 100644 --- a/src/prob/prob_bc.H +++ b/src/prob/prob_bc.H @@ -240,7 +240,7 @@ struct IncfloVelFill } #if (AMREX_SPACEDIM == 3) - if (1102 == probtype && j > domain_box.bigEnd(1)) + if (1102 == probtype) { int half_num_cells = domain_box.length(2) / 2; if (k <= half_num_cells) { @@ -248,23 +248,26 @@ struct IncfloVelFill } } #endif - else if ( (bc.hi(dir) == amrex::BCType::ext_dir) || - (bc.hi(dir) == amrex::BCType::direction_dependent && norm_vel <= 0.) ) + if (1102 != probtype) { - if (nc == dir) { - vel(i,j,k,dcomp+nc) = norm_vel; - } else if (nc == td1) { - vel(i,j,k,dcomp+nc) = tang_vel1; + if ( (bc.hi(dir) == amrex::BCType::ext_dir) || + (bc.hi(dir) == amrex::BCType::direction_dependent && norm_vel <= 0.) ) + { + if (nc == dir) { + vel(i,j,k,dcomp+nc) = norm_vel; + } else if (nc == td1) { + vel(i,j,k,dcomp+nc) = tang_vel1; #if (AMREX_SPACEDIM == 3) - } else if (nc == td2) { - vel(i,j,k,dcomp+nc) = tang_vel2; + } else if (nc == td2) { + vel(i,j,k,dcomp+nc) = tang_vel2; #endif + } } - } - else if (bc.hi(dir) == amrex::BCType::direction_dependent && norm_vel > 0.) - { - vel(i,j,k,dcomp+nc) = vel(i,j-1,k,dcomp+nc); - } + else if (bc.hi(dir) == amrex::BCType::direction_dependent && norm_vel > 0.) + { + vel(i,j,k,dcomp+nc) = vel(i,j-1,k,dcomp+nc); + } + } // not 1102 } // high j #if (AMREX_SPACEDIM == 3)