From 2e7054113491bff61a2bc71af4d26cf15eb20338 Mon Sep 17 00:00:00 2001
From: Axel Kohlmeyer <akohlmey@gmail.com>
Date: Sat, 29 Dec 2018 14:49:28 -0500
Subject: [PATCH] consistent formatting: replace '}else' with '} else'

---
 src/KOKKOS/npair_kokkos.cpp                   | 10 +++++-----
 src/KOKKOS/npair_ssa_kokkos.cpp               |  4 ++--
 src/REPLICA/fix_neb.cpp                       |  2 +-
 src/USER-LB/fix_lb_fluid.cpp                  | 12 ++++++------
 src/USER-LB/fix_lb_rigid_pc_sphere.cpp        |  2 +-
 src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp |  2 +-
 src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp |  6 +++---
 src/USER-MANIFOLD/manifold_gaussian_bump.cpp  |  8 ++++----
 src/USER-MANIFOLD/manifold_thylakoid.cpp      |  4 ++--
 src/USER-REAXC/reaxc_traj.cpp                 |  2 +-
 10 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/KOKKOS/npair_kokkos.cpp b/src/KOKKOS/npair_kokkos.cpp
index 6f75e6cabc..88017c3f9d 100644
--- a/src/KOKKOS/npair_kokkos.cpp
+++ b/src/KOKKOS/npair_kokkos.cpp
@@ -383,7 +383,7 @@ void NeighborKokkosExecute<DeviceType>::
         if (which == 0){
           if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
           else n++;
-        }else if (minimum_image_check(delx,dely,delz)){
+        } else if (minimum_image_check(delx,dely,delz)){
           if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
           else n++;
         }
@@ -440,7 +440,7 @@ void NeighborKokkosExecute<DeviceType>::
             if (which == 0){
               if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
               else n++;
-            }else if (minimum_image_check(delx,dely,delz)){
+            } else if (minimum_image_check(delx,dely,delz)){
               if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
               else n++;
             }
@@ -567,7 +567,7 @@ void NeighborKokkosExecute<DeviceType>::build_ItemCuda(typename Kokkos::TeamPoli
           if (which == 0){
             if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
             else n++;
-          }else if (minimum_image_check(delx,dely,delz)){
+          } else if (minimum_image_check(delx,dely,delz)){
             if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
             else n++;
           }
@@ -645,7 +645,7 @@ void NeighborKokkosExecute<DeviceType>::build_ItemCuda(typename Kokkos::TeamPoli
             if (which == 0){
               if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
               else n++;
-            }else if (minimum_image_check(delx,dely,delz)){
+            } else if (minimum_image_check(delx,dely,delz)){
               if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
               else n++;
             }
@@ -738,7 +738,7 @@ void NeighborKokkosExecute<DeviceType>::
             if (which == 0){
               if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
               else n++;
-            }else if (minimum_image_check(delx,dely,delz)){
+            } else if (minimum_image_check(delx,dely,delz)){
               if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
               else n++;
             }
diff --git a/src/KOKKOS/npair_ssa_kokkos.cpp b/src/KOKKOS/npair_ssa_kokkos.cpp
index ba941b8e54..d17e341f15 100644
--- a/src/KOKKOS/npair_ssa_kokkos.cpp
+++ b/src/KOKKOS/npair_ssa_kokkos.cpp
@@ -588,7 +588,7 @@ void NPairSSAKokkosExecute<DeviceType>::build_locals_onePhase(const bool firstTr
                 if (which == 0){
                   if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
                   else n++;
-                }else if (minimum_image_check(delx,dely,delz)){
+                } else if (minimum_image_check(delx,dely,delz)){
                   if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
                   else n++;
                 }
@@ -715,7 +715,7 @@ void NPairSSAKokkosExecute<DeviceType>::build_ghosts_onePhase(int workPhase) con
                 if (which == 0){
                   if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
                   else n++;
-                }else if (minimum_image_check(delx,dely,delz)){
+                } else if (minimum_image_check(delx,dely,delz)){
                   if(n<neigh_list.maxneighs) neighbors_i(n++) = j;
                   else n++;
                 }
diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp
index dc86c70956..e1b1e46a53 100644
--- a/src/REPLICA/fix_neb.cpp
+++ b/src/REPLICA/fix_neb.cpp
@@ -302,7 +302,7 @@ void FixNEB::min_post_force(int /*vflag*/)
       int procFirst;
       procFirst=universe->root_proc[0];
       MPI_Bcast(&vIni,1,MPI_DOUBLE,procFirst,uworld);
-    }else {
+    } else {
       if (me == 0)
         MPI_Bcast(&vIni,1,MPI_DOUBLE,0,rootworld);
 
diff --git a/src/USER-LB/fix_lb_fluid.cpp b/src/USER-LB/fix_lb_fluid.cpp
index 864bb02f3f..6f1dfc9982 100644
--- a/src/USER-LB/fix_lb_fluid.cpp
+++ b/src/USER-LB/fix_lb_fluid.cpp
@@ -1391,7 +1391,7 @@ satisfy the Courant condition.\n");
       K_0 = 2.57*(a_0 - 0.333333333333333);
     }
      dtoverdtcollision = dt_lb*6.0*viscosity/densityinit_real/dx_lb/dx_lb;
-  }else if(typeLB==2){
+  } else if(typeLB==2){
     expminusdtovertau=exp(-1.0/tau);
     Dcoeff=(1.0-(1.0-expminusdtovertau)*tau);
     namp = 2.0*kB*T/3.;
@@ -2019,7 +2019,7 @@ void FixLbFluid::equilibriumdist15(int xstart, int xend, int ystart, int yend, i
             (u_lb[i][j][k][0]*drhoz+u_lb[i][j][k][2]*drhox);
           Pyz = kappa_lb*drhoy*drhoz+(tau-0.5)*(1.0/3.0-dPdrho)*
             (u_lb[i][j][k][1]*drhoz+u_lb[i][j][k][2]*drhoy);
-        }else if(typeLB==2){
+        } else if(typeLB==2){
           Pxx = p0 + kappa_lb*(drhox*drhox - 0.5*grs)+tau*(1.0/3.0-dPdrho)*
             (3.0*u_lb[i][j][k][0]*drhox+u_lb[i][j][k][1]*drhoy+u_lb[i][j][k][2]*drhoz);
           Pyy = p0 + kappa_lb*(drhoy*drhoy - 0.5*grs)+tau*(1.0/3.0-dPdrho)*
@@ -2197,7 +2197,7 @@ void FixLbFluid::equilibriumdist19(int xstart, int xend, int ystart, int yend, i
             (u_lb[i][j][k][0]*drhoz+u_lb[i][j][k][2]*drhox);
           Pyz = kappa_lb*drhoy*drhoz+(tau-0.5)*(1.0/3.0-dPdrho)*
             (u_lb[i][j][k][1]*drhoz+u_lb[i][j][k][2]*drhoy);
-        }else if(typeLB==2){
+        } else if(typeLB==2){
           Pxx = p0 + kappa_lb*(drhox*drhox - 0.5*grs)+tau*(1.0/3.0-dPdrho)*
             (3.0*u_lb[i][j][k][0]*drhox+u_lb[i][j][k][1]*drhoy+u_lb[i][j][k][2]*drhoz);
           Pyy = p0 + kappa_lb*(drhoy*drhoy - 0.5*grs)+tau*(1.0/3.0-dPdrho)*
@@ -2488,7 +2488,7 @@ void FixLbFluid::update_periodic(int xstart, int xend, int ystart, int yend, int
 
             fnew[i][j][k][m] = f_lb[imod][jmod][kmod][m] + (feq[imod][jmod][kmod][m]-f_lb[imod][jmod][kmod][m])/tau;
           }
-        }else if(typeLB==2){
+        } else if(typeLB==2){
           for(m=0; m<numvel; m++){
             imod = i-e[m][0];
             jmod = j-e[m][1];
@@ -2718,7 +2718,7 @@ void FixLbFluid::update_full15(void)
      if(typeLB==1){
        update_periodic(1,subNbx-1,1,subNby-1,1,2);
        update_periodic(1,subNbx-1,1,subNby-1,subNbz-2,subNbz-1);
-     }else if(typeLB==2){
+     } else if(typeLB==2){
        if(comm->myloc[2]==0){
          for(i=1; i<subNbx-1; i++){
            for(j=1;j<subNby-1;j++){
@@ -3074,7 +3074,7 @@ void FixLbFluid::update_full19(void)
     if(typeLB==1){
       update_periodic(1,subNbx-1,1,subNby-1,1,2);
       update_periodic(1,subNbx-1,1,subNby-1,subNbz-2,subNbz-1);
-    }else if(typeLB==2){
+    } else if(typeLB==2){
       if(comm->myloc[2]==0){
         for(i=1; i<subNbx-1; i++){
           for(j=1;j<subNby-1;j++){
diff --git a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp
index a950fffdf0..83dc751631 100644
--- a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp
+++ b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp
@@ -178,7 +178,7 @@ FixLbRigidPCSphere::FixLbRigidPCSphere(LAMMPS *lmp, int narg, char **arg) :
 
     delete [] igroups;
 
-  }else error->all(FLERR,"Illegal fix lb/rigid/pc/sphere command");
+  } else error->all(FLERR,"Illegal fix lb/rigid/pc/sphere command");
 
   // error check on nbody
 
diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp
index 5c0215aa95..8b5cf6334c 100644
--- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp
+++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp
@@ -159,7 +159,7 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg,
                         nevery, next_output);
       }
       argi += 2;
-    }else if (error_on_unknown_keyword) {
+    } else if (error_on_unknown_keyword) {
       char msg[2048];
       sprintf(msg,"Error parsing arg \"%s\".\n", arg[argi]);
       error->all(FLERR, msg);
diff --git a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp
index 47a1d65bbd..877aa3baa7 100644
--- a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp
+++ b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp
@@ -115,13 +115,13 @@ FixNVTManifoldRattle::FixNVTManifoldRattle(LAMMPS *lmp, int narg, char **arg,
       got_temp = 1;
 
       argi += 4;
-    }else if (strcmp( arg[argi], "tchain" ) == 0) {
+    } else if (strcmp( arg[argi], "tchain" ) == 0) {
       if( argi+1 >= narg )
         error->all(FLERR,"Keyword 'tchain' needs 1 argument");
 
       mtchain = force->inumeric(FLERR, arg[argi+1]);
       argi += 2;
-    }else if (error_on_unknown_keyword) {
+    } else if (error_on_unknown_keyword) {
       char msg[2048];
       sprintf(msg,"Error parsing arg \"%s\".\n", arg[argi]);
       error->all(FLERR, msg);
@@ -354,7 +354,7 @@ void FixNVTManifoldRattle::nh_v_temp()
         v[i][2] *= factor_eta;
       }
     }
-  }else if (which == BIAS) {
+  } else if (which == BIAS) {
     for( int i = 0; i < nlocal; ++i ){
       if (mask[i] & groupbit) {
         temperature->remove_bias(i,v[i]);
diff --git a/src/USER-MANIFOLD/manifold_gaussian_bump.cpp b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp
index 322f9671c2..91095d6b82 100644
--- a/src/USER-MANIFOLD/manifold_gaussian_bump.cpp
+++ b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp
@@ -159,7 +159,7 @@ double manifold_gaussian_bump::g( const double *x )
   double x2 = dot(xf,xf);
   if (x2 < rc12) {
     return x[2] - gaussian_bump_x2( x2 );
-  }else if (x2 < rc22) {
+  } else if (x2 < rc22) {
     double rr = sqrt( x2 );
     double z_taper_func = lut_get_z( rr );
     return x[2] - z_taper_func;
@@ -183,7 +183,7 @@ void   manifold_gaussian_bump::n( const double *x, double *nn )
     factor /= (ll*ll);
     nn[0] = factor * x[0];
     nn[1] = factor * x[1];
-  }else if (x2 < rc22) {
+  } else if (x2 < rc22) {
     double rr = sqrt( x2 );
     double zp_taper_func = lut_get_zp( rr );
 
@@ -214,7 +214,7 @@ double manifold_gaussian_bump::g_and_n( const double *x, double *nn )
     nn[1] = factor * x[1];
 
     return x[2] - gb;
-  }else if (x2 < rc22) {
+  } else if (x2 < rc22) {
     double z_taper_func, zp_taper_func;
     double rr = sqrt( x2 );
     lut_get_z_and_zp( rr, z_taper_func, zp_taper_func );
@@ -362,7 +362,7 @@ void manifold_gaussian_bump::test_lut()
     double taper_z;
     if (xx <= rc1) {
             taper_z = gaussian_bump(xx);
-    }else if (xx < rc2) {
+    } else if (xx < rc2) {
             taper_z = lut_get_z( xx );
     } else {
             taper_z = 0.0;
diff --git a/src/USER-MANIFOLD/manifold_thylakoid.cpp b/src/USER-MANIFOLD/manifold_thylakoid.cpp
index 1c479ff25f..373a6cd4c7 100644
--- a/src/USER-MANIFOLD/manifold_thylakoid.cpp
+++ b/src/USER-MANIFOLD/manifold_thylakoid.cpp
@@ -491,11 +491,11 @@ void manifold_thylakoid::set_domain( thyla_part *p, const std::vector<double> &l
     char msg[2048];
     sprintf(msg,"xlo >= xhi (%f >= %f)",lo[0],hi[0]);
     error->one(FLERR,msg);
-  }else if (lo[1] >= hi[1]) {
+  } else if (lo[1] >= hi[1]) {
     char msg[2048];
     sprintf(msg,"ylo >= yhi (%f >= %f)",lo[1],hi[1]);
     error->one(FLERR,msg);
-  }else if (lo[2] >= hi[2]) {
+  } else if (lo[2] >= hi[2]) {
     char msg[2048];
     sprintf(msg,"zlo >= zhi (%f >= %f)",lo[2],hi[2]);
     error->one(FLERR,msg);
diff --git a/src/USER-REAXC/reaxc_traj.cpp b/src/USER-REAXC/reaxc_traj.cpp
index 63a31b9577..946833afaa 100644
--- a/src/USER-REAXC/reaxc_traj.cpp
+++ b/src/USER-REAXC/reaxc_traj.cpp
@@ -629,7 +629,7 @@ int Write_Bonds(reax_system *system, control_params *control, reax_list *bonds,
     }
   }
 
-  i(f me != MASTER_NODE) {
+  if (me != MASTER_NODE) {
     MPI_Send( out_control->buffer, buffer_req-1, MPI_CHAR, MASTER_NODE,
               np*BOND_LINES+me, mpi_data->world );
   } else {
-- 
GitLab