more include file updates found by iwyu

This commit is contained in:
Axel Kohlmeyer
2020-09-02 22:52:22 -04:00
parent 7b8fe97a88
commit 45f80f4f06
17 changed files with 94 additions and 87 deletions

View File

@ -12,6 +12,7 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "atom.h" #include "atom.h"
#include "atom_vec.h"
#include "style_atom.h" // IWYU pragma: keep #include "style_atom.h" // IWYU pragma: keep
#include "comm.h" #include "comm.h"

View File

@ -15,7 +15,7 @@
#define LMP_BODY_H #define LMP_BODY_H
#include "pointers.h" #include "pointers.h"
#include "atom_vec_body.h" #include "atom_vec_body.h" // IWYU pragma: keep
namespace LAMMPS_NS { namespace LAMMPS_NS {

View File

@ -36,7 +36,6 @@
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace MathConst; using namespace MathConst;
using namespace std;
#ifdef DBL_EPSILON #ifdef DBL_EPSILON
#define MY_EPSILON (10.0*DBL_EPSILON) #define MY_EPSILON (10.0*DBL_EPSILON)

View File

@ -13,22 +13,23 @@
#include "compute_pressure.h" #include "compute_pressure.h"
#include <cstring> #include "angle.h"
#include "atom.h" #include "atom.h"
#include "update.h" #include "bond.h"
#include "dihedral.h"
#include "domain.h" #include "domain.h"
#include "modify.h" #include "error.h"
#include "fix.h" #include "fix.h"
#include "force.h" #include "force.h"
#include "pair.h"
#include "pair_hybrid.h"
#include "bond.h"
#include "angle.h"
#include "dihedral.h"
#include "improper.h" #include "improper.h"
#include "kspace.h" #include "kspace.h"
#include "error.h" #include "modify.h"
#include "pair.h"
#include "pair_hybrid.h"
#include "update.h"
#include <cctype>
#include <cstring>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -20,6 +20,7 @@
#include <map> #include <map>
namespace LAMMPS_NS { namespace LAMMPS_NS {
class Region;
class Domain : protected Pointers { class Domain : protected Pointers {
public: public:
@ -90,7 +91,7 @@ class Domain : protected Pointers {
int nregion; // # of defined Regions int nregion; // # of defined Regions
int maxregion; // max # list can hold int maxregion; // max # list can hold
class Region **regions; // list of defined Regions Region **regions; // list of defined Regions
int copymode; int copymode;
enum{NO_REMAP,X_REMAP,V_REMAP}; enum{NO_REMAP,X_REMAP,V_REMAP};

View File

@ -12,17 +12,15 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "lattice.h" #include "lattice.h"
#include "comm.h"
#include "domain.h"
#include "error.h"
#include "memory.h"
#include "update.h"
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <cstdlib>
#include "update.h"
#include "domain.h"
#include "comm.h"
#include "force.h"
#include "memory.h"
#include "error.h"
#include "utils.h"
#include "fmt/format.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;

View File

@ -16,33 +16,31 @@
#include "library.h" #include "library.h"
#include <mpi.h> #include <mpi.h>
#include <cctype>
#include <cstring>
#include <cstdlib>
#include <string>
#include "universe.h"
#include "atom_vec.h"
#include "atom.h" #include "atom.h"
#include "atom_vec.h"
#include "comm.h"
#include "compute.h"
#include "domain.h" #include "domain.h"
#include "update.h" #include "error.h"
#include "fix.h"
#include "fix_external.h"
#include "force.h"
#include "group.h" #include "group.h"
#include "info.h"
#include "input.h" #include "input.h"
#include "variable.h" #include "memory.h"
#include "modify.h" #include "modify.h"
#include "neigh_list.h"
#include "neighbor.h"
#include "output.h" #include "output.h"
#include "thermo.h" #include "thermo.h"
#include "compute.h" #include "universe.h"
#include "fix.h" #include "update.h"
#include "comm.h" #include "variable.h"
#include "memory.h"
#include "error.h" #include <cstring>
#include "force.h" #include <vector>
#include "info.h"
#include "fix_external.h"
#include "neighbor.h"
#include "neigh_list.h"
#include "neigh_request.h"
#include "fmt/format.h"
#if defined(LAMMPS_EXCEPTIONS) #if defined(LAMMPS_EXCEPTIONS)
#include "exceptions.h" #include "exceptions.h"

View File

@ -12,9 +12,8 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "memory.h" #include "memory.h"
#include <cstdlib>
#include "error.h" #include "error.h"
#include "fmt/format.h"
#if defined(LMP_USER_INTEL) && defined(__INTEL_COMPILER) #if defined(LMP_USER_INTEL) && defined(__INTEL_COMPILER)
#ifndef LMP_INTEL_NO_TBB #ifndef LMP_INTEL_NO_TBB

View File

@ -12,12 +12,13 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "min_cg.h" #include "min_cg.h"
#include <mpi.h>
#include <cmath>
#include "error.h" #include "error.h"
#include "update.h"
#include "output.h" #include "output.h"
#include "timer.h" #include "timer.h"
#include "update.h"
#include <cmath>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;

View File

@ -12,15 +12,16 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "min_fire_old.h" #include "min_fire_old.h"
#include <mpi.h>
#include <cmath>
#include "universe.h"
#include "atom.h" #include "atom.h"
#include "error.h" #include "error.h"
#include "force.h" #include "force.h"
#include "update.h"
#include "output.h" #include "output.h"
#include "timer.h" #include "timer.h"
#include "universe.h"
#include "update.h"
#include <cmath>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;

View File

@ -18,17 +18,18 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "min_hftn.h" #include "min_hftn.h"
#include <mpi.h>
#include <cmath>
#include <cstring>
#include "atom.h" #include "atom.h"
#include "error.h" #include "error.h"
#include "fix_minimize.h" #include "fix_minimize.h"
#include "modify.h" #include "modify.h"
#include "output.h" #include "output.h"
#include "pair.h" #include "pair.h"
#include "update.h"
#include "timer.h" #include "timer.h"
#include "update.h"
#include <cmath>
#include <cstring>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;

View File

@ -22,15 +22,16 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "min_linesearch.h" #include "min_linesearch.h"
#include <mpi.h>
#include <cmath>
#include "atom.h" #include "atom.h"
#include "modify.h"
#include "fix_minimize.h" #include "fix_minimize.h"
#include "pair.h" #include "modify.h"
#include "output.h" #include "output.h"
#include "pair.h"
#include "thermo.h" #include "thermo.h"
#include <cmath>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
// ALPHA_MAX = max alpha allowed to avoid long backtracks // ALPHA_MAX = max alpha allowed to avoid long backtracks

View File

@ -12,15 +12,16 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "min_quickmin.h" #include "min_quickmin.h"
#include <mpi.h>
#include <cmath>
#include "universe.h"
#include "atom.h" #include "atom.h"
#include "error.h" #include "error.h"
#include "force.h" #include "force.h"
#include "update.h"
#include "output.h" #include "output.h"
#include "timer.h" #include "timer.h"
#include "universe.h"
#include "update.h"
#include <cmath>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;

View File

@ -12,11 +12,13 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "min_sd.h" #include "min_sd.h"
#include <cmath>
#include "error.h" #include "error.h"
#include "update.h"
#include "output.h" #include "output.h"
#include "timer.h" #include "timer.h"
#include "update.h"
#include <cmath>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;

View File

@ -12,13 +12,13 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "minimize.h" #include "minimize.h"
#include "domain.h" #include "domain.h"
#include "update.h"
#include "min.h"
#include "finish.h"
#include "timer.h"
#include "error.h" #include "error.h"
#include "force.h" #include "finish.h"
#include "min.h"
#include "timer.h"
#include "update.h"
using namespace LAMMPS_NS; using namespace LAMMPS_NS;

View File

@ -12,24 +12,24 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "modify.h" #include "modify.h"
#include <cstring>
#include <string>
#include "style_compute.h" #include "style_compute.h"
#include "style_fix.h" #include "style_fix.h"
#include "atom.h" #include "atom.h"
#include "comm.h" #include "comm.h"
#include "fix.h"
#include "compute.h" #include "compute.h"
#include "group.h"
#include "update.h"
#include "domain.h" #include "domain.h"
#include "region.h"
#include "input.h"
#include "variable.h"
#include "memory.h"
#include "error.h" #include "error.h"
#include "utils.h" #include "fix.h"
#include "fmt/format.h" #include "group.h"
#include "input.h"
#include "memory.h"
#include "region.h"
#include "update.h"
#include "variable.h"
#include <cstring>
#include <vector>
using namespace LAMMPS_NS; using namespace LAMMPS_NS;
using namespace FixConst; using namespace FixConst;
@ -947,7 +947,7 @@ void Modify::add_fix(int narg, char **arg, int trysuffix)
void Modify::add_fix(const std::string &fixcmd, int trysuffix) void Modify::add_fix(const std::string &fixcmd, int trysuffix)
{ {
std::vector<std::string> args = utils::split_words(fixcmd); auto args = utils::split_words(fixcmd);
char **newarg = new char*[args.size()]; char **newarg = new char*[args.size()];
int i=0; int i=0;
for (const auto &arg : args) { for (const auto &arg : args) {
@ -1249,7 +1249,7 @@ void Modify::add_compute(int narg, char **arg, int trysuffix)
void Modify::add_compute(const std::string &computecmd, int trysuffix) void Modify::add_compute(const std::string &computecmd, int trysuffix)
{ {
std::vector<std::string> args = utils::split_words(computecmd); auto args = utils::split_words(computecmd);
char **newarg = new char*[args.size()]; char **newarg = new char*[args.size()];
int i=0; int i=0;
for (const auto &arg : args) { for (const auto &arg : args) {

View File

@ -15,11 +15,14 @@
#define LMP_MODIFY_H #define LMP_MODIFY_H
#include "pointers.h" #include "pointers.h"
#include <map> #include <map>
#include <string>
namespace LAMMPS_NS { namespace LAMMPS_NS {
class Compute;
class Fix;
class Modify : protected Pointers { class Modify : protected Pointers {
friend class Info; friend class Info;
friend class FixSRP; friend class FixSRP;
@ -27,7 +30,6 @@ class Modify : protected Pointers {
friend class RespaOMP; friend class RespaOMP;
public: public:
int nfix,maxfix;
int n_initial_integrate,n_post_integrate,n_pre_exchange; int n_initial_integrate,n_post_integrate,n_pre_exchange;
int n_pre_neighbor,n_post_neighbor; int n_pre_neighbor,n_post_neighbor;
int n_pre_force,n_pre_reverse,n_post_force; int n_pre_force,n_pre_reverse,n_post_force;
@ -41,11 +43,12 @@ class Modify : protected Pointers {
int nfix_restart_global; // stored fix global info from restart file int nfix_restart_global; // stored fix global info from restart file
int nfix_restart_peratom; // stored fix peratom info from restart file int nfix_restart_peratom; // stored fix peratom info from restart file
class Fix **fix; // list of fixes int nfix,maxfix;
Fix **fix; // list of fixes
int *fmask; // bit mask for when each fix is applied int *fmask; // bit mask for when each fix is applied
int ncompute,maxcompute; // list of computes int ncompute,maxcompute;
class Compute **compute; Compute **compute; // list of computes
Modify(class LAMMPS *); Modify(class LAMMPS *);
virtual ~Modify(); virtual ~Modify();