From 9c16819305d04c19d6309e1dfd0057438938fda4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 13 May 2022 18:26:38 -0400 Subject: [PATCH] update code with clang-tidy fixes --- src/LATBOLTZ/fix_lb_fluid.cpp | 28 ++++++++++++++-------------- src/compute_orientorder_atom.cpp | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/LATBOLTZ/fix_lb_fluid.cpp b/src/LATBOLTZ/fix_lb_fluid.cpp index 078a38a593..e3662b338b 100644 --- a/src/LATBOLTZ/fix_lb_fluid.cpp +++ b/src/LATBOLTZ/fix_lb_fluid.cpp @@ -715,7 +715,7 @@ int FixLbFluid::setmask() FixConst::END_OF_STEP; } -void FixLbFluid::init(void) +void FixLbFluid::init() { if (modify->get_fix_by_style("lb/fluid").size() > 1) error->all(FLERR, "Only one fix lb/fluid at a time is supported"); @@ -909,7 +909,7 @@ int FixLbFluid::unpack_exchange(int nlocal, double *buf) // This assumes that all the simulation parameters have been given in // terms of distance, time and mass units. //========================================================================== -void FixLbFluid::rescale(void) +void FixLbFluid::rescale() { densityinit = densityinit_real * dx_lb * dx_lb * dx_lb; @@ -970,7 +970,7 @@ satisfy the Courant condition.\n"); } } -void FixLbFluid::InitializeFirstRun(void) +void FixLbFluid::InitializeFirstRun() { // Define geometry for pits @@ -1020,7 +1020,7 @@ void FixLbFluid::InitializeFirstRun(void) // Initialize the fluid velocity and density. //========================================================================== -void FixLbFluid::initializeLB(void) +void FixLbFluid::initializeLB() { for (int i = 0; i < subNbx + 3; i++) { @@ -1077,7 +1077,7 @@ void FixLbFluid::initializeLB(void) //========================================================================== // calculate the force from the local atoms acting on the fluid. //========================================================================== -void FixLbFluid::calc_fluidforceI(void) +void FixLbFluid::calc_fluidforceI() { int *mask = atom->mask; int nlocal = atom->nlocal; @@ -1184,7 +1184,7 @@ void FixLbFluid::calc_fluidforceI(void) } } -void FixLbFluid::calc_fluidforceII(void) +void FixLbFluid::calc_fluidforceII() { int *mask = atom->mask; int nlocal = atom->nlocal; @@ -1201,7 +1201,7 @@ void FixLbFluid::calc_fluidforceII(void) //========================================================================== // calculate the force weight from the local atoms acting on the fluid. //========================================================================== -void FixLbFluid::calc_fluidforceweight(void) +void FixLbFluid::calc_fluidforceweight() { int *mask = atom->mask; int nlocal = atom->nlocal; @@ -2295,7 +2295,7 @@ static MPI_Datatype mpiTypeDumpGlobal(const int *local_size, const int *global_o //========================================================================== // Creates various buffers for output. //========================================================================== -void FixLbFluid::SetupBuffers(void) +void FixLbFluid::SetupBuffers() { fluid_global_n0[0] = Nbx + 1; // Both domain boundaries -- this unifies the seperate periodic fluid_global_n0[1] = Nby + 1; // and non-periodic sizes of the original code @@ -2441,7 +2441,7 @@ void FixLbFluid::dump(const bigint step) // read in a fluid restart file. This is only used to restart the // fluid portion of a LAMMPS simulation. //========================================================================== -void FixLbFluid::read_restartfile(void) +void FixLbFluid::read_restartfile() { MPI_Status status; MPI_Datatype realtype; @@ -2475,7 +2475,7 @@ void FixLbFluid::read_restartfile(void) //========================================================================== // write a fluid restart file. //========================================================================== -void FixLbFluid::write_restartfile(void) +void FixLbFluid::write_restartfile() { // We first create the distribution with the correct momentum on the full step instead // of the 1/2 step that is used in the algorithm. The main difference is the velocity @@ -2841,7 +2841,7 @@ void FixLbFluid::equilibriumdist19(int xstart, int xend, int ystart, int yend, i // Calculate the fluid density and velocity over the entire simulation // domain. //========================================================================== -void FixLbFluid::parametercalc_full(void) +void FixLbFluid::parametercalc_full() { MPI_Request requests[4]; MPI_Request requests2[12]; @@ -3015,7 +3015,7 @@ void FixLbFluid::parametercalc_part(int xstart, int xend, int ystart, int yend, // Add force contribution to fluid velocity over the entire simulation // domain. //========================================================================== -void FixLbFluid::correctu_full(void) +void FixLbFluid::correctu_full() { MPI_Request requests2[12]; int numrequests; @@ -3262,7 +3262,7 @@ void FixLbFluid::update_periodic(int xstart, int xend, int ystart, int yend, int // Update the distribution functions over the entire simulation domain for // the D3Q15 model. //========================================================================== -void FixLbFluid::update_full15(void) +void FixLbFluid::update_full15() { MPI_Request requests[8]; int numrequests = 4; @@ -3394,7 +3394,7 @@ void FixLbFluid::update_full15(void) // Update the distribution functions over the entire simulation domain for // the D3Q19 model. //========================================================================== -void FixLbFluid::update_full19(void) +void FixLbFluid::update_full19() { MPI_Request req_send15, req_recv15; diff --git a/src/compute_orientorder_atom.cpp b/src/compute_orientorder_atom.cpp index 2ca4cbea80..125c7ad941 100644 --- a/src/compute_orientorder_atom.cpp +++ b/src/compute_orientorder_atom.cpp @@ -719,7 +719,7 @@ double ComputeOrientOrderAtom::w3j(const int lmax, const int j1, const int j2, c int t = 0; while (c - b + t + alpha < 0 || c - a + t - beta < 0) t++; // ^^ t>=-j1 ^^ t>=j2 - while (1) { + while (true) { if (a + b - c - t < 0) break; // t<=lmax if (a - t - alpha < 0) break; // t<=lmax-j1 if (b - t + beta < 0) break; // t<=lmax+j2