From 390c6ba1061d5461995f905c78af7418c9dd368c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 3 Sep 2020 15:28:07 -0400 Subject: [PATCH] rechecking some corefiles with IWYU after the many updates --- src/comm.cpp | 8 ++++---- src/finish.cpp | 6 +++--- src/group.cpp | 1 + src/lammps.cpp | 6 +++--- src/molecule.cpp | 15 +++++++-------- src/molecule.h | 2 +- src/output.cpp | 4 ++-- src/read_dump.cpp | 4 ++-- src/reader_native.cpp | 1 - src/reset_mol_ids.cpp | 2 ++ src/reset_mol_ids.h | 1 - src/timer.cpp | 8 +++----- src/universe.cpp | 1 - 13 files changed, 28 insertions(+), 31 deletions(-) diff --git a/src/comm.cpp b/src/comm.cpp index 24a5d050d4..7b351e12fc 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -14,20 +14,20 @@ #include "comm.h" #include "accelerator_kokkos.h" -#include "atom.h" +#include "atom.h" // IWYU pragma: keep #include "atom_vec.h" #include "bond.h" #include "compute.h" -#include "domain.h" +#include "domain.h" // IWYU pragma: keep #include "dump.h" #include "error.h" #include "fix.h" #include "force.h" #include "group.h" #include "irregular.h" -#include "memory.h" +#include "memory.h" // IWYU pragma: keep #include "modify.h" -#include "neighbor.h" +#include "neighbor.h" // IWYU pragma: keep #include "output.h" #include "pair.h" #include "procmap.h" diff --git a/src/finish.cpp b/src/finish.cpp index 7990a3c141..3bfe3a7bbf 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -20,13 +20,13 @@ #include "error.h" #include "force.h" #include "kspace.h" -#include "memory.h" +#include "memory.h" // IWYU pragma: keep #include "min.h" #include "molecule.h" #include "neigh_list.h" #include "neigh_request.h" -#include "neighbor.h" -#include "timer.h" +#include "neighbor.h" // IWYU pragma: keep +#include "timer.h" // IWYU pragma: keep #include "universe.h" #include "update.h" diff --git a/src/group.cpp b/src/group.cpp index ee96c20f47..a2e20a6ab1 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -33,6 +33,7 @@ #include #include #include +#include using namespace LAMMPS_NS; diff --git a/src/lammps.cpp b/src/lammps.cpp index b6c8450a4d..4d643c327c 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -30,12 +30,12 @@ #include "universe.h" #include "input.h" #include "info.h" -#include "atom.h" +#include "atom.h" // IWYU pragma: keep #include "update.h" -#include "neighbor.h" +#include "neighbor.h" // IWYU pragma: keep #include "comm.h" #include "comm_brick.h" -#include "domain.h" +#include "domain.h" // IWYU pragma: keep #include "force.h" #include "modify.h" #include "group.h" diff --git a/src/molecule.cpp b/src/molecule.cpp index 18f5c38992..0d81f49a50 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -12,23 +12,22 @@ ------------------------------------------------------------------------- */ #include "molecule.h" -#include -#include -#include -#include + #include "atom.h" #include "atom_vec.h" #include "atom_vec_body.h" -#include "force.h" #include "comm.h" #include "domain.h" +#include "error.h" +#include "force.h" #include "math_extra.h" #include "memory.h" -#include "error.h" -#include "utils.h" -#include "fmt/format.h" #include "tokenizer.h" +#include +#include +#include + using namespace LAMMPS_NS; #define MAXLINE 256 diff --git a/src/molecule.h b/src/molecule.h index d752be3f81..5a3fa5a327 100644 --- a/src/molecule.h +++ b/src/molecule.h @@ -15,7 +15,7 @@ #define LMP_ONE_MOLECULE_H #include "pointers.h" -#include + #include namespace LAMMPS_NS { diff --git a/src/output.cpp b/src/output.cpp index 9b091f89a2..6c90198de4 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include "output.h" -#include "style_dump.h" +#include "style_dump.h" // IWYU pragma: keep #include "atom.h" #include "comm.h" @@ -79,7 +79,7 @@ Output::Output(LAMMPS *lmp) : Pointers(lmp) #define DUMP_CLASS #define DumpStyle(key,Class) \ (*dump_map)[#key] = &dump_creator; -#include "style_dump.h" +#include "style_dump.h" // IWYU pragma: keep #undef DumpStyle #undef DUMP_CLASS } diff --git a/src/read_dump.cpp b/src/read_dump.cpp index eb58d3e3ff..10218fe617 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -29,7 +29,7 @@ #include "irregular.h" #include "memory.h" #include "reader.h" -#include "style_reader.h" +#include "style_reader.h" // IWYU pragma: keep #include "update.h" #include @@ -243,7 +243,7 @@ void ReadDump::setup_reader(int narg, char **arg) for (int i = 0; i < nreader; i++) \ readers[i] = new Class(lmp); \ } -#include "style_reader.h" +#include "style_reader.h" // IWYU pragma: keep #undef READER_CLASS // unrecognized style diff --git a/src/reader_native.cpp b/src/reader_native.cpp index 19e53f3efe..e0f0d7792b 100644 --- a/src/reader_native.cpp +++ b/src/reader_native.cpp @@ -13,7 +13,6 @@ #include "reader_native.h" -#include "atom.h" #include "error.h" #include "memory.h" #include "tokenizer.h" diff --git a/src/reset_mol_ids.cpp b/src/reset_mol_ids.cpp index 0d9fe55e07..ad2caad656 100644 --- a/src/reset_mol_ids.cpp +++ b/src/reset_mol_ids.cpp @@ -26,6 +26,8 @@ #include "group.h" #include "modify.h" +#include + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ diff --git a/src/reset_mol_ids.h b/src/reset_mol_ids.h index 9d2dd24bc8..fbb6fceb03 100644 --- a/src/reset_mol_ids.h +++ b/src/reset_mol_ids.h @@ -21,7 +21,6 @@ CommandStyle(reset_mol_ids,ResetMolIDs) #define LMP_RESET_MOL_IDS_H #include "pointers.h" -#include namespace LAMMPS_NS { diff --git a/src/timer.cpp b/src/timer.cpp index b9124978a9..adf143b4ae 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -12,13 +12,11 @@ ------------------------------------------------------------------------- */ #include "timer.h" -#include -#include -#include + #include "comm.h" #include "error.h" -#include "force.h" -#include "utils.h" + +#include #ifdef _WIN32 #include diff --git a/src/universe.cpp b/src/universe.cpp index acb5100337..838313665e 100644 --- a/src/universe.cpp +++ b/src/universe.cpp @@ -14,7 +14,6 @@ #include "universe.h" #include "error.h" -#include "force.h" #include "memory.h" #include "version.h"