consistent source format: replace '}else{' with '} else {'

This commit is contained in:
Axel Kohlmeyer
2018-12-29 12:20:24 -05:00
parent 3a7350575c
commit 7177c541d4
12 changed files with 59 additions and 59 deletions

View File

@ -578,7 +578,7 @@ FSUM FixLangevinKokkos<DeviceType>::post_force_item(int i) const
if (v(i,0) == 0.0) fran[0] = 0.0;
if (v(i,1) == 0.0) fran[1] = 0.0;
if (v(i,2) == 0.0) fran[2] = 0.0;
}else{
} else {
fdrag[0] = gamma1*v(i,0);
fdrag[1] = gamma1*v(i,1);
fdrag[2] = gamma1*v(i,2);

View File

@ -116,7 +116,7 @@ void PairMorseSoft::compute(int eflag, int vflag)
// Force computation:
fpair = 3.0*a*B*dexp3*s1 + 2.0*a*D*(dexp2 - dexp);
fpair /= r;
}else{
} else {
llf = MathSpecial::powint( l / shift_range, nlambda );
phi = V0 + B*dexp3;
phi *= llf;
@ -124,7 +124,7 @@ void PairMorseSoft::compute(int eflag, int vflag)
// Force computation:
if (r == 0.0){
fpair = 0.0;
}else{
} else {
fpair = 3.0*a*B*dexp3 + 2.0*a*D*(dexp2 - dexp);
fpair *= llf / r;
}
@ -234,7 +234,8 @@ void PairMorseSoft::settings(int narg, char **arg)
double PairMorseSoft::init_one(int i, int j)
{
if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
if (setflag[i][j] == 0)
error->all(FLERR,"All pair coeffs are not set");
morse1[i][j] = 2.0*d0[i][j]*alpha[i][j];
@ -259,8 +260,7 @@ double PairMorseSoft::init_one(int i, int j)
if (l >= shift_range){
s1 = (l - 1.0) / (shift_range - 1.0);
offset[i][j] = V0 + B*dexp3 * s1;
}else{
} else {
llf = MathSpecial::powint( l / shift_range, nlambda );
offset[i][j] = V0 + B*dexp3;
offset[i][j] *= llf;
@ -392,7 +392,7 @@ double PairMorseSoft::single(int /*i*/, int /*j*/, int itype, int jtype, double
// Force computation:
fforce = 3.0*a*B*dexp3*s1 + 2.0*a*D*(dexp2 - dexp);
fforce /= r;
}else{
} else {
llf = MathSpecial::powint( l / shift_range, nlambda );
phi = V0 + B*dexp3;
phi *= llf;
@ -400,7 +400,7 @@ double PairMorseSoft::single(int /*i*/, int /*j*/, int itype, int jtype, double
// Force computation:
if (r == 0.0){
fforce = 0.0;
}else{
} else {
fforce = 3.0*a*B*dexp3 + 2.0*a*D*(dexp2 - dexp);
fforce *= llf / r;
}

View File

@ -231,7 +231,7 @@ a z wall velocity without implementing fixed BCs in z");
initializeLB = &FixLbFluid::initializeLB15;
equilibriumdist = &FixLbFluid::equilibriumdist15;
update_full = &FixLbFluid::update_full15;
}else{
} else {
initializeLB = &FixLbFluid::initializeLB19;
equilibriumdist = &FixLbFluid::equilibriumdist19;
update_full = &FixLbFluid::update_full19;
@ -379,7 +379,7 @@ a z wall velocity without implementing fixed BCs in z");
char str[128];
if(setdx == 1){
sprintf(str,"Using a lattice-Boltzmann grid of %i by %i by %i total grid points. To change, use the dx keyword",Nbx,Nby,Nbz);
}else{
} else {
sprintf(str,"Using a lattice-Boltzmann grid of %i by %i by %i total grid points.",Nbx,Nby,Nbz);
}
error->message(FLERR,str);
@ -544,7 +544,7 @@ FixLbFluid::~FixLbFluid()
if(setGamma == 1){
delete [] Gamma;
}else{
} else {
delete [] NodeArea;
}
}
@ -841,7 +841,7 @@ void FixLbFluid::calc_fluidforce(void)
if(mask[i] & groupbit){
if(trilinear_stencil==1) {
trilinear_interpolation(i);
}else{
} else {
peskin_interpolation(i);
}
@ -1219,7 +1219,7 @@ require more frequent neighborlist rebuilds");
massone = massone/dm_lb;
gammavalue = 2.0*(mnode*massone)*dtoverdtcollision/(mnode+massone);
}else{
} else {
gammavalue = Gamma[type[i]];
}
@ -1350,7 +1350,7 @@ void FixLbFluid::rescale(void)
for(int i=0; i<= atom->ntypes; i++){
NodeArea[i] = NodeArea[i]/dx_lb/dx_lb;
}
}else{
} else {
for(int i=0; i<= atom->ntypes; i++){
Gamma[i] = Gamma[i]*dt_lb/dm_lb;
}
@ -1388,7 +1388,7 @@ satisfy the Courant condition.\n");
noisefactor = 1.0;
if(a_0 <= 0.333333333333333){
K_0 = 5.17*(0.333333333333333 - a_0);
}else{
} else {
K_0 = 2.57*(a_0 - 0.333333333333333);
}
dtoverdtcollision = dt_lb*6.0*viscosity/densityinit_real/dx_lb/dx_lb;
@ -1821,7 +1821,7 @@ void FixLbFluid::initialize_feq(void)
// If using the standary LB integrator, do not need to send feqn.
if(typeLB == 1){
numrequests = 4;
}else{
} else {
numrequests = 8;
}
@ -1888,7 +1888,7 @@ void FixLbFluid::initialize_feq(void)
feqoldn[i][j][k][p] = feqn[i][j][k][p];
}
}
}else{
} else {
step = 1;
read_restartfile();
@ -2576,7 +2576,7 @@ void FixLbFluid::streamout(void)
}
}
}
}else{
} else {
for(i=1; i<subNbx-1; i++){
for(j=1; j<subNby-1; j++){
for(k=1; k<subNbz-1; k++){
@ -2604,10 +2604,10 @@ void FixLbFluid::streamout(void)
if(domain->periodicity[2]==0){
if(comm->myloc[2]==comm->procgrid[2]-1){
kstart=comm->myloc[2]*(subNbz-3);
}else{
} else {
kstart=comm->myloc[2]*(subNbz-2);
}
}else{
} else {
kstart=comm->myloc[2]*(subNbz-2);
}
iend=istart+subNbx-2;
@ -2659,7 +2659,7 @@ void FixLbFluid::update_full15(void)
//--------------------------------------------------------------------------
if(typeLB == 1){
numrequests = 4;
}else{
} else {
numrequests = 8;
}
@ -2777,7 +2777,7 @@ void FixLbFluid::update_full15(void)
}
}
}
}else{
} else {
update_periodic(1,subNbx-1,1,subNby-1,1,2);
}
if(comm->myloc[2]==comm->procgrid[2]-1){
@ -3019,7 +3019,7 @@ void FixLbFluid::update_full19(void)
//--------------------------------------------------------------------------
if(typeLB == 1){
numrequests = 4;
}else{
} else {
numrequests = 8;
}
@ -3135,7 +3135,7 @@ void FixLbFluid::update_full19(void)
}
}
}
}else{
} else {
update_periodic(1,subNbx-1,1,subNby-1,1,2);
}
if(comm->myloc[2]==comm->procgrid[2]-1){

View File

@ -201,7 +201,7 @@ void FixLbMomentum::end_of_step()
ucmx*u_lb[i][j][k][1]*ucmz-ucmx*ucmy*u_lb[i][j][k][2]+
ucmx*ucmy*ucmz);
etacov[14]=0.0;
}else{
} else {
etacov[0] = 0.0;
etacov[1] = rho*ucmx;
etacov[2] = rho*ucmy;
@ -263,7 +263,7 @@ void FixLbMomentum::end_of_step()
ucmx*u_old[1]*ucmz-ucmx*ucmy*u_old[2]+
ucmx*ucmy*ucmz);
etacov[14]=0.0;
}else{
} else {
etacov[0] = 0.0;
etacov[1] = density_old*ucmx;
etacov[2] = density_old*ucmy;

View File

@ -164,7 +164,7 @@ void FixLbPC::initial_integrate(int /*vflag*/) {
v[i][0] += f[i][0]*dtfm;
v[i][1] += f[i][1]*dtfm;
v[i][2] += f[i][2]*dtfm;
}else{
} else {
v[i][0] = (v[i][0]-up[i][0]-f[i][0]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
f[i][0]*force->ftm2v/Gamma_MD[type[i]] + up[i][0];
v[i][1] = (v[i][1]-up[i][1]-f[i][1]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
@ -195,7 +195,7 @@ void FixLbPC::initial_integrate(int /*vflag*/) {
v[i][0] += f[i][0]*dtfm;
v[i][1] += f[i][1]*dtfm;
v[i][2] += f[i][2]*dtfm;
}else{
} else {
v[i][0] = (v[i][0]-up[i][0]-f[i][0]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
f[i][0]*force->ftm2v/Gamma_MD[type[i]] + up[i][0];
v[i][1] = (v[i][1]-up[i][1]-f[i][1]*force->ftm2v/Gamma_MD[type[i]])*expminusdttimesgamma +
@ -234,7 +234,7 @@ void FixLbPC::final_integrate()
v[i][0] += 0.5*(f[i][0] - force_old[i][0])*dtfm;
v[i][1] += 0.5*(f[i][1] - force_old[i][1])*dtfm;
v[i][2] += 0.5*(f[i][2] - force_old[i][2])*dtfm;
}else{
} else {
v[i][0] += DMDcoeff*((f[i][0] - force_old[i][0])*force->ftm2v/Gamma_MD[type[i]] + up[i][0] - up_old[i][0])/dtv;
v[i][1] += DMDcoeff*((f[i][1] - force_old[i][1])*force->ftm2v/Gamma_MD[type[i]] + up[i][1] - up_old[i][1])/dtv;
v[i][2] += DMDcoeff*((f[i][2] - force_old[i][2])*force->ftm2v/Gamma_MD[type[i]] + up[i][2] - up_old[i][2])/dtv;
@ -255,7 +255,7 @@ void FixLbPC::final_integrate()
v[i][0] += 0.5*(f[i][0] - force_old[i][0])*dtfm;
v[i][1] += 0.5*(f[i][1] - force_old[i][1])*dtfm;
v[i][2] += 0.5*(f[i][2] - force_old[i][2])*dtfm;
}else{
} else {
v[i][0] += DMDcoeff*((f[i][0] - force_old[i][0])*force->ftm2v/Gamma_MD[type[i]] + up[i][0] - up_old[i][0])/dtv;
v[i][1] += DMDcoeff*((f[i][1] - force_old[i][1])*force->ftm2v/Gamma_MD[type[i]] + up[i][1] - up_old[i][1])/dtv;
v[i][2] += DMDcoeff*((f[i][2] - force_old[i][2])*force->ftm2v/Gamma_MD[type[i]] + up[i][2] - up_old[i][2])/dtv;
@ -438,7 +438,7 @@ int FixLbPC::unpack_exchange(int nlocal, double *buf)
}
}
}
}else{
} else {
FfP[0] = (1.-dx1)*(1.-dy1)*(1.-dz1);
FfP[1] = (1.-dx1)*(1.-dy1)*dz1;
FfP[2] = (1.-dx1)*dy1*(1.-dz1);

View File

@ -387,7 +387,7 @@ FixLbRigidPCSphere::FixLbRigidPCSphere(LAMMPS *lmp, int narg, char **arg) :
if((mask[j] & groupbit) && (mask[j] & groupbit_lb_fluid) && (mask[j] & group->bitmask[igroupinner]))
error->one(FLERR,"the inner nodes specified in lb/rigid/pc/sphere should not be included in the lb/fluid fix");
}
}else{
} else {
for(int j=0; j<nlocal; j++){
if((mask[j] & groupbit) && !(mask[j] & groupbit_lb_fluid))
error->one(FLERR,"use the innerNodes keyword in the lb/rigid/pc/sphere fix for atoms which do not interact with the lb/fluid");
@ -536,7 +536,7 @@ void FixLbRigidPCSphere::init()
if(!(mask[i] & group->bitmask[igroupinner])){
sum[ibody][4] += massone;
}
}else{
} else {
sum[ibody][4] += massone;
}
}
@ -581,7 +581,7 @@ void FixLbRigidPCSphere::init()
sum[ibody][0] += dx*dx + dy*dy + dz*dz;
sum[ibody][1] += Gamma[type[i]];
}
}else{
} else {
ibody = body[i];
xbox = (image[i] & IMGMASK) - IMGMAX;
@ -619,7 +619,7 @@ void FixLbRigidPCSphere::init()
if(Gamma_MD[ibody]*dt_lb/dm_lb - Gamma[type[i]] > eps)
error->one(FLERR,"All atoms in a rigid body must have the same gamma value");
}
}else{
} else {
ibody = body[i];
if(Gamma_MD[ibody]*dt_lb/dm_lb - Gamma[type[i]] > eps)
@ -798,7 +798,7 @@ void FixLbRigidPCSphere::initial_integrate(int vflag)
sum[ibody][1] += up[i][1]*massone;
sum[ibody][2] += up[i][2]*massone;
}
}else{
} else {
sum[ibody][0] += up[i][0]*massone;
sum[ibody][1] += up[i][1]*massone;
sum[ibody][2] += up[i][2]*massone;
@ -841,7 +841,7 @@ void FixLbRigidPCSphere::initial_integrate(int vflag)
sum[ibody][4] += -Gamma_MD[ibody]*(v[i][1]-up[i][1]);
sum[ibody][5] += -Gamma_MD[ibody]*(v[i][2]-up[i][2]);
}
}else{
} else {
sum[ibody][0] += Gamma_MD[ibody]*(dy * ((up[i][2]-vcm[ibody][2])) -
dz * ((up[i][1]-vcm[ibody][1])));
sum[ibody][1] += Gamma_MD[ibody]*(dz * ((up[i][0]-vcm[ibody][0])) -
@ -1054,7 +1054,7 @@ void FixLbRigidPCSphere::final_integrate()
sum[ibody][5] += Gamma_MD[ibody]*(dx * ((up[i][1]-vcm[ibody][1])) -
dy * ((up[i][0]-vcm[ibody][0])));
}
}else{
} else {
sum[ibody][0] += up[i][0]*massone;
sum[ibody][1] += up[i][1]*massone;
sum[ibody][2] += up[i][2]*massone;
@ -1659,7 +1659,7 @@ double FixLbRigidPCSphere::compute_array(int i, int j)
}
}
}
}else{
} else {
FfP[0] = (1.-dx1)*(1.-dy1)*(1.-dz1);
FfP[1] = (1.-dx1)*(1.-dy1)*dz1;
FfP[2] = (1.-dx1)*dy1*(1.-dz1);

View File

@ -129,7 +129,7 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg,
len = strlen(arg[i+6]) - 1; // -1 because -2 for v_, +1 for \0.
is_var[i] = 1;
offset = 2;
}else{
} else {
force->numeric(FLERR,arg[i+6]); // Check if legal number.
len = strlen( arg[i+6] ) + 1; // +1 for \0.
is_var[i] = 0;
@ -163,7 +163,7 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg,
char msg[2048];
sprintf(msg,"Error parsing arg \"%s\".\n", arg[argi]);
error->all(FLERR, msg);
}else{
} else {
argi += 1;
}
}
@ -247,7 +247,7 @@ int FixNVEManifoldRattle::was_var( const char *str )
{
if( strlen(str) > 2 ){
return (str[0] == 'v') && (str[1] == '_');
}else{
} else {
return 0;
}
}
@ -295,7 +295,7 @@ void FixNVEManifoldRattle::update_var_params()
double new_val = input->variable->compute_equal(tvars[i]);
ptr_params[i] = new_val;
}else{
} else {
error->all(FLERR,
"Variable for fix nve/manifold/rattle is invalid style");
}

View File

@ -125,7 +125,7 @@ FixNVTManifoldRattle::FixNVTManifoldRattle(LAMMPS *lmp, int narg, char **arg,
char msg[2048];
sprintf(msg,"Error parsing arg \"%s\".\n", arg[argi]);
error->all(FLERR, msg);
}else{
} else {
argi += 1;
}
}
@ -281,7 +281,7 @@ void FixNVTManifoldRattle::nhc_temp_integrate()
if( eta_mass[0] > 0.0 ){
eta_dotdot[0] = (kecurrent - ke_target)/eta_mass[0];
}else{
} else {
eta_dotdot[0] = 0;
}
@ -314,7 +314,7 @@ void FixNVTManifoldRattle::nhc_temp_integrate()
if( eta_mass[0] > 0.0 ){
eta_dotdot[0] = (kecurrent - ke_target) / eta_mass[0];
}else{
} else {
eta_dotdot[0] = 0.0;
}

View File

@ -21,7 +21,7 @@ double manifold_cylinder_dent::g( const double *x )
double k = MathConst::MY_2PI / l;
double c = R - 0.5*a*( 1.0 + cos(k*x[2]) );
return c*c - r2;
}else{
} else {
return R*R - r2;
}
}
@ -36,7 +36,7 @@ void manifold_cylinder_dent::n( const double *x, double *n )
n[0] = -2*x[0];
n[1] = -2*x[1];
n[2] = c*a*k*sin(k*x[2]);
}else{
} else {
n[0] = -2*x[0];
n[1] = -2*x[1];
n[2] = 0.0;

View File

@ -163,7 +163,7 @@ double manifold_gaussian_bump::g( const double *x )
double rr = sqrt( x2 );
double z_taper_func = lut_get_z( rr );
return x[2] - z_taper_func;
}else{
} else {
return x[2];
}
}
@ -193,7 +193,7 @@ void manifold_gaussian_bump::n( const double *x, double *nn )
nn[0] = der_part * x[0];
nn[1] = der_part * x[1];
}else{
} else {
nn[0] = nn[1] = 0.0;
}
}
@ -226,7 +226,7 @@ double manifold_gaussian_bump::g_and_n( const double *x, double *nn )
nn[1] = der_part * x[1];
return x[2] - z_taper_func;
}else{
} else {
nn[0] = nn[1] = 0.0;
return x[2];
}
@ -364,7 +364,7 @@ void manifold_gaussian_bump::test_lut()
taper_z = gaussian_bump(xx);
}else if( xx < rc2 ){
taper_z = lut_get_z( xx );
}else{
} else {
taper_z = 0.0;
}
fprintf( fp, "%g %g %g %g %g %g %g\n", xx, gaussian_bump(xx), taper_z,

View File

@ -48,7 +48,7 @@ double manifold_spine::g_and_n( const double *x, double *nn )
if( x[2] > 0 ){
BB = B;
cc = c;
}else{
} else {
BB = B2;
cc = 1.0;
}
@ -97,7 +97,7 @@ void manifold_spine::n( const double *x, double *nn )
if( x[2] > 0 ){
BB = B;
cc = c;
}else{
} else {
BB = B2;
cc = 1.0;
}
@ -141,7 +141,7 @@ double manifold_spine::g( const double *x )
if( x[2] > 0 ){
BB = B;
cc = c;
}else{
} else {
BB = B2;
cc = 1.0;
}

View File

@ -87,7 +87,7 @@ double manifold_thylakoid::g( const double *x )
double con_val = p->g(x);
if( std::isfinite(con_val) ){
return con_val;
}else{
} else {
char msg[2048];
sprintf(msg,"Error, thyla_part of type %d returned %f as constraint val!",
p->type, con_val);
@ -109,7 +109,7 @@ void manifold_thylakoid::n( const double *x, double *n )
p->n(x,n);
if( std::isfinite(n[0]) && std::isfinite(n[1]) && std::isfinite(n[2]) ){
return;
}else{
} else {
char msg[2048];
sprintf(msg,"Error, thyla_part of type %d returned (%f,%f,%f) as gradient!",
p->type, n[0], n[1], n[2]);
@ -532,11 +532,11 @@ int manifold_thylakoid::is_in_domain( thyla_part *part, const double *x )
if( dist2 < RR2 ){
return true;
}else{
} else {
// Domain was ok, but radius not.
return false;
}
}else{
} else {
return true;
}
}