From f0e4f9932fbedfa8456f3ab6b001e2b7176449a6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 23 Nov 2020 22:24:00 -0500 Subject: [PATCH] whitespace fixes --- doc/src/Developer_unittest.rst | 2 +- src/KIM/pair_kim.cpp | 12 ++++++------ src/MANYBODY/pair_nb3b_harmonic.cpp | 2 +- src/compute_centroid_stress_atom.cpp | 16 ++++++++-------- src/fix.cpp | 2 +- src/fix_neigh_history.cpp | 4 ++-- src/fix_neigh_history.h | 2 +- src/kspace.cpp | 2 +- src/pair_hybrid.cpp | 6 +++--- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/src/Developer_unittest.rst b/doc/src/Developer_unittest.rst index b93cf01130..4ed3eb1fef 100644 --- a/doc/src/Developer_unittest.rst +++ b/doc/src/Developer_unittest.rst @@ -172,7 +172,7 @@ the default case, verbose == false, the test output will be compact and not mixed with LAMMPS output. However setting the verbose flag (via setting the TEST_ARGS environment variable, ``TEST_ARGS=-v``) can be helpful to understand why tests fail unexpectedly. - + Another complexity of these tests stems from the need to capture situations where LAMMPS will stop with an error, i.e. handle so-called "death tests". Here the LAMMPS code will operate differently depending diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 82dae0ded8..2a5fafefef 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -637,7 +637,7 @@ int PairKIM::pack_reverse_comm(int n, int first, double *buf) if (KIM_SupportStatus_NotEqual(kim_model_support_for_forces, KIM_SUPPORT_STATUS_notSupported) && (KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported) || + KIM_SUPPORT_STATUS_notSupported) || (vflag_atom == 0))) { const double *const fp = &(atom->f[0][0]); for (int i = first; i < last; i++) { @@ -646,9 +646,9 @@ int PairKIM::pack_reverse_comm(int n, int first, double *buf) buf[m++] = fp[3*i+2]; } return m; - } + } // ---------------------------------------------------------------------- - // see Pair::ev_setup & Integrate::ev_set() + // see Pair::ev_setup & Integrate::ev_set() // for values of eflag (0-3) and vflag (0-14) // ------------------------------------------------------------------------- if ((vflag_atom != 0) && @@ -671,7 +671,7 @@ int PairKIM::pack_reverse_comm(int n, int first, double *buf) buf[m++] = va[6*i+5]; } return m; - } + } if ((vflag_atom != 0) && KIM_SupportStatus_Equal(kim_model_support_for_forces, KIM_SUPPORT_STATUS_notSupported) && @@ -687,7 +687,7 @@ int PairKIM::pack_reverse_comm(int n, int first, double *buf) buf[m++] = va[6*i+5]; } return m; - } + } return 0; } @@ -731,7 +731,7 @@ void PairKIM::unpack_reverse_comm(int n, int *list, double *buf) va[j*6+5]+=buf[m++]; } return; - } + } if ((vflag_atom != 0) && KIM_SupportStatus_Equal(kim_model_support_for_forces, KIM_SUPPORT_STATUS_notSupported) && diff --git a/src/MANYBODY/pair_nb3b_harmonic.cpp b/src/MANYBODY/pair_nb3b_harmonic.cpp index ffb059c067..8e1468271e 100644 --- a/src/MANYBODY/pair_nb3b_harmonic.cpp +++ b/src/MANYBODY/pair_nb3b_harmonic.cpp @@ -46,7 +46,7 @@ PairNb3bHarmonic::PairNb3bHarmonic(LAMMPS *lmp) : Pair(lmp) single_enable = 0; restartinfo = 0; one_coeff = 1; - manybody_flag = 1; + manybody_flag = 1; centroidstressflag = CENTROID_NOTAVAIL; unit_convert_flag = utils::get_supported_conversions(utils::ENERGY); diff --git a/src/compute_centroid_stress_atom.cpp b/src/compute_centroid_stress_atom.cpp index a6755b5b53..1b814961a0 100644 --- a/src/compute_centroid_stress_atom.cpp +++ b/src/compute_centroid_stress_atom.cpp @@ -126,11 +126,11 @@ void ComputeCentroidStressAtom::init() // check if force components and fixes support centroid atom stress // all bond styles support it as CENTROID_SAME - + if (pairflag && force->pair) if (force->pair->centroidstressflag == CENTROID_NOTAVAIL) error->all(FLERR, "Pair style does not support compute centroid/stress/atom"); - + if (angleflag && force->angle) if (force->angle->centroidstressflag == CENTROID_NOTAVAIL) error->all(FLERR, "Angle style does not support compute centroid/stress/atom"); @@ -150,8 +150,8 @@ void ComputeCentroidStressAtom::init() if (fixflag) { for (int ifix = 0; ifix < modify->nfix; ifix++) if (modify->fix[ifix]->virial_flag && - modify->fix[ifix]->centroidstressflag == CENTROID_NOTAVAIL) - error->all(FLERR, "Fix style does not support compute centroid/stress/atom"); + modify->fix[ifix]->centroidstressflag == CENTROID_NOTAVAIL) + error->all(FLERR, "Fix style does not support compute centroid/stress/atom"); } } @@ -199,9 +199,9 @@ void ComputeCentroidStressAtom::compute_peratom() stress[i][j] = 0.0; // add in per-atom contributions from all force components and fixes - + // pair styles are either CENTROID_SAME or CENTROID_AVAIL or CENTROID_NOTAVAIL - + if (pairflag && force->pair && force->pair->compute_flag) { if (force->pair->centroidstressflag == CENTROID_AVAIL) { double **cvatom = force->pair->cvatom; @@ -223,7 +223,7 @@ void ComputeCentroidStressAtom::compute_peratom() // bond styles are all CENTROID_SAME // angle, dihedral, improper styles are CENTROID_AVAIL or CENTROID_NOTAVAIL // KSpace styles are all CENTROID_NOTAVAIL, placeholder CENTROID_SAME below - + if (bondflag && force->bond) { double **vatom = force->bond->vatom; for (i = 0; i < nbond; i++) { @@ -271,7 +271,7 @@ void ComputeCentroidStressAtom::compute_peratom() // e.g. fix ave/spatial defined before fix shake, // and fix ave/spatial uses a per-atom stress from this compute as input // fix styles are CENTROID_SAME or CENTROID_NOTAVAIL - + if (fixflag) { for (int ifix = 0; ifix < modify->nfix; ifix++) if (modify->fix[ifix]->virial_flag) { diff --git a/src/fix.cpp b/src/fix.cpp index ae8f8c7369..573d8ae1a1 100644 --- a/src/fix.cpp +++ b/src/fix.cpp @@ -105,7 +105,7 @@ Fix::Fix(LAMMPS *lmp, int /*narg*/, char **arg) : maxeatom = maxvatom = 0; vflag_atom = 0; centroidstressflag = CENTROID_SAME; - + // KOKKOS per-fix data masks execution_space = Host; diff --git a/src/fix_neigh_history.cpp b/src/fix_neigh_history.cpp index 6fb860e9a9..83ef0666c2 100644 --- a/src/fix_neigh_history.cpp +++ b/src/fix_neigh_history.cpp @@ -41,7 +41,7 @@ FixNeighHistory::FixNeighHistory(LAMMPS *lmp, int narg, char **arg) : restart_peratom = 1; restart_global = 1; - + create_attribute = 1; maxexchange_dynamic = 1; @@ -855,7 +855,7 @@ void FixNeighHistory::write_restart(FILE *fp) if (comm->me == 0) { int size = 0; fwrite(&size,sizeof(int),1,fp); - } + } } diff --git a/src/fix_neigh_history.h b/src/fix_neigh_history.h index 89c726683a..2cbdcef97a 100644 --- a/src/fix_neigh_history.h +++ b/src/fix_neigh_history.h @@ -53,7 +53,7 @@ class FixNeighHistory : public Fix { void unpack_reverse_comm(int, int *, double *); int pack_exchange(int, double *); int unpack_exchange(int, double *); - void write_restart(FILE *); + void write_restart(FILE *); int pack_restart(int, double *); void unpack_restart(int, int); int size_restart(int); diff --git a/src/kspace.cpp b/src/kspace.cpp index 594fd1ba8d..5556a5e8d0 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -89,7 +89,7 @@ KSpace::KSpace(LAMMPS *lmp) : Pointers(lmp) eatom = nullptr; vatom = nullptr; centroidstressflag = CENTROID_NOTAVAIL; - + execution_space = Host; datamask_read = ALL_MASK; datamask_modify = ALL_MASK; diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 07206dc518..7e4c1d2781 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -163,7 +163,7 @@ void PairHybrid::compute(int eflag, int vflag) } // substyles may be CENTROID_SAME or CENTROID_AVAIL - + if (cvflag_atom) { n = atom->nlocal; if (force->newton_pair) n += atom->nghost; @@ -385,7 +385,7 @@ void PairHybrid::flags() compute_flag = 0; respa_enable = 0; restartinfo = 0; - + for (m = 0; m < nstyles; m++) { if (styles[m]->single_enable) ++single_enable; if (styles[m]->respa_enable) ++respa_enable; @@ -418,7 +418,7 @@ void PairHybrid::flags() if (styles[m]->centroidstressflag == CENTROID_NOTAVAIL) centroidstressflag = CENTROID_NOTAVAIL; if (centroidstressflag == CENTROID_SAME && - styles[m]->centroidstressflag == CENTROID_AVAIL) + styles[m]->centroidstressflag == CENTROID_AVAIL) centroidstressflag = CENTROID_AVAIL; } }