include-what-you-use updates
This commit is contained in:
@ -25,7 +25,6 @@
|
|||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "force.h"
|
#include "force.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "lammps.h"
|
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
|
|||||||
@ -19,8 +19,6 @@
|
|||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,6 @@
|
|||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,6 @@
|
|||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,6 @@
|
|||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
|
|||||||
@ -14,12 +14,12 @@
|
|||||||
#include "compute_count_type.h"
|
#include "compute_count_type.h"
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "domain.h"
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "force.h"
|
#include "force.h"
|
||||||
#include "group.h"
|
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
enum { ATOM, BOND, ANGLE, DIHEDRAL, IMPROPER };
|
enum { ATOM, BOND, ANGLE, DIHEDRAL, IMPROPER };
|
||||||
|
|||||||
@ -23,7 +23,6 @@ ComputeStyle(dipole/chunk,ComputeDipoleChunk);
|
|||||||
#include "compute_chunk.h"
|
#include "compute_chunk.h"
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
class Fix;
|
|
||||||
|
|
||||||
class ComputeDipoleChunk : public ComputeChunk {
|
class ComputeDipoleChunk : public ComputeChunk {
|
||||||
public:
|
public:
|
||||||
@ -43,8 +42,6 @@ class ComputeDipoleChunk : public ComputeChunk {
|
|||||||
|
|
||||||
void allocate() override;
|
void allocate() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace LAMMPS_NS
|
} // namespace LAMMPS_NS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -12,28 +12,25 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "compute_erotate_sphere_atom.h"
|
#include "compute_erotate_sphere_atom.h"
|
||||||
#include <cstring>
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "update.h"
|
|
||||||
#include "modify.h"
|
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
|
#include "error.h"
|
||||||
#include "force.h"
|
#include "force.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "modify.h"
|
||||||
|
#include "update.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
static constexpr double INERTIA = 0.4; // moment of inertia prefactor for sphere
|
static constexpr double INERTIA = 0.4; // moment of inertia prefactor for sphere
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
ComputeErotateSphereAtom::
|
ComputeErotateSphereAtom::ComputeErotateSphereAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||||
ComputeErotateSphereAtom(LAMMPS *lmp, int narg, char **arg) :
|
Compute(lmp, narg, arg), erot(nullptr)
|
||||||
Compute(lmp, narg, arg),
|
|
||||||
erot(nullptr)
|
|
||||||
{
|
{
|
||||||
if (narg != 3)
|
if (narg != 3) error->all(FLERR, "Illegal compute erotate/sphere//atom command");
|
||||||
error->all(FLERR,"Illegal compute erotate/sphere//atom command");
|
|
||||||
|
|
||||||
peratom_flag = 1;
|
peratom_flag = 1;
|
||||||
size_peratom_cols = 0;
|
size_peratom_cols = 0;
|
||||||
@ -41,9 +38,9 @@ ComputeErotateSphereAtom(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
// error check
|
// error check
|
||||||
|
|
||||||
if (!atom->omega_flag)
|
if (!atom->omega_flag)
|
||||||
error->all(FLERR,"Compute erotate/sphere/atom requires atom attribute omega");
|
error->all(FLERR, "Compute erotate/sphere/atom requires atom attribute omega");
|
||||||
if (!atom->radius_flag)
|
if (!atom->radius_flag)
|
||||||
error->all(FLERR,"Compute erotate/sphere/atom requires atom attribute radius");
|
error->all(FLERR, "Compute erotate/sphere/atom requires atom attribute radius");
|
||||||
|
|
||||||
nmax = 0;
|
nmax = 0;
|
||||||
}
|
}
|
||||||
@ -76,7 +73,7 @@ void ComputeErotateSphereAtom::compute_peratom()
|
|||||||
if (atom->nmax > nmax) {
|
if (atom->nmax > nmax) {
|
||||||
memory->destroy(erot);
|
memory->destroy(erot);
|
||||||
nmax = atom->nmax;
|
nmax = atom->nmax;
|
||||||
memory->create(erot,nmax,"erotate/sphere/atom:erot");
|
memory->create(erot, nmax, "erotate/sphere/atom:erot");
|
||||||
vector_atom = erot;
|
vector_atom = erot;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,10 +88,12 @@ void ComputeErotateSphereAtom::compute_peratom()
|
|||||||
|
|
||||||
for (int i = 0; i < nlocal; i++) {
|
for (int i = 0; i < nlocal; i++) {
|
||||||
if (mask[i] & groupbit) {
|
if (mask[i] & groupbit) {
|
||||||
erot[i] = (omega[i][0]*omega[i][0] + omega[i][1]*omega[i][1] +
|
erot[i] =
|
||||||
omega[i][2]*omega[i][2]) * radius[i]*radius[i]*rmass[i];
|
(omega[i][0] * omega[i][0] + omega[i][1] * omega[i][1] + omega[i][2] * omega[i][2]) *
|
||||||
|
radius[i] * radius[i] * rmass[i];
|
||||||
erot[i] *= pfactor;
|
erot[i] *= pfactor;
|
||||||
} else erot[i] = 0.0;
|
} else
|
||||||
|
erot[i] = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,6 +103,6 @@ void ComputeErotateSphereAtom::compute_peratom()
|
|||||||
|
|
||||||
double ComputeErotateSphereAtom::memory_usage()
|
double ComputeErotateSphereAtom::memory_usage()
|
||||||
{
|
{
|
||||||
double bytes = (double)nmax * sizeof(double);
|
double bytes = (double) nmax * sizeof(double);
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "compute_ke_atom.h"
|
#include "compute_ke_atom.h"
|
||||||
|
|
||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "comm.h"
|
#include "comm.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@ -19,7 +20,6 @@
|
|||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,6 @@
|
|||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "force.h"
|
#include "force.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "lammps.h"
|
|
||||||
#include "math_const.h"
|
#include "math_const.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,6 @@
|
|||||||
#include "grid3d.h"
|
#include "grid3d.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
#include "region.h"
|
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|||||||
@ -36,7 +36,6 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
|
|||||||
@ -17,7 +17,6 @@
|
|||||||
#include "atom.h"
|
#include "atom.h"
|
||||||
#include "domain.h"
|
#include "domain.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "modify.h"
|
|
||||||
#include "respa.h"
|
#include "respa.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,8 @@
|
|||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "fmt/format.h"
|
#include "fmt/format.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,6 @@
|
|||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "fix_deform.h"
|
#include "fix_deform.h"
|
||||||
#include "force.h"
|
#include "force.h"
|
||||||
#include "group.h"
|
|
||||||
#include "irregular.h"
|
#include "irregular.h"
|
||||||
#include "kspace.h"
|
#include "kspace.h"
|
||||||
#include "modify.h"
|
#include "modify.h"
|
||||||
|
|||||||
@ -22,6 +22,8 @@
|
|||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
|
|
||||||
|
|||||||
@ -17,8 +17,6 @@
|
|||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "math_special.h"
|
#include "math_special.h"
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using MathSpecial::powint;
|
using MathSpecial::powint;
|
||||||
|
|
||||||
|
|||||||
@ -17,8 +17,6 @@
|
|||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "math_special.h"
|
#include "math_special.h"
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using MathSpecial::powint;
|
using MathSpecial::powint;
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,8 @@
|
|||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "pair.h"
|
#include "pair.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
static constexpr int DELTA = 16;
|
static constexpr int DELTA = 16;
|
||||||
|
|||||||
@ -24,6 +24,8 @@
|
|||||||
#include "math_extra.h"
|
#include "math_extra.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
static constexpr int DELTA = 16;
|
static constexpr int DELTA = 16;
|
||||||
|
|||||||
@ -15,9 +15,9 @@
|
|||||||
#define LMP_INTEGRATE_H
|
#define LMP_INTEGRATE_H
|
||||||
|
|
||||||
#include "pointers.h"
|
#include "pointers.h"
|
||||||
#include "compute.h"
|
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
class Compute;
|
||||||
|
|
||||||
class Integrate : protected Pointers {
|
class Integrate : protected Pointers {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -66,7 +66,6 @@
|
|||||||
|
|
||||||
#include "lmpinstalledpkgs.h"
|
#include "lmpinstalledpkgs.h"
|
||||||
#include "lmpgitversion.h"
|
#include "lmpgitversion.h"
|
||||||
#include "lmpfftsettings.h"
|
|
||||||
|
|
||||||
#if defined(LAMMPS_UPDATE)
|
#if defined(LAMMPS_UPDATE)
|
||||||
#define UPDATE_STRING " - " LAMMPS_UPDATE
|
#define UPDATE_STRING " - " LAMMPS_UPDATE
|
||||||
|
|||||||
@ -15,9 +15,9 @@
|
|||||||
#define LMP_MIN_H
|
#define LMP_MIN_H
|
||||||
|
|
||||||
#include "pointers.h" // IWYU pragma: export
|
#include "pointers.h" // IWYU pragma: export
|
||||||
#include "compute.h"
|
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
class Compute;
|
||||||
|
|
||||||
class Min : protected Pointers {
|
class Min : protected Pointers {
|
||||||
public:
|
public:
|
||||||
@ -116,7 +116,7 @@ class Min : protected Pointers {
|
|||||||
int narray; // # of arrays stored by fix_minimize
|
int narray; // # of arrays stored by fix_minimize
|
||||||
class FixMinimize *fix_minimize; // fix that stores auxiliary data
|
class FixMinimize *fix_minimize; // fix that stores auxiliary data
|
||||||
|
|
||||||
class Compute *pe_compute; // compute for potential energy
|
Compute *pe_compute; // compute for potential energy
|
||||||
double ecurrent; // current potential energy
|
double ecurrent; // current potential energy
|
||||||
|
|
||||||
bigint ndoftotal; // total dof for entire problem
|
bigint ndoftotal; // total dof for entire problem
|
||||||
|
|||||||
@ -23,6 +23,8 @@
|
|||||||
#include "neigh_list.h"
|
#include "neigh_list.h"
|
||||||
#include "neighbor.h"
|
#include "neighbor.h"
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace NeighConst;
|
using namespace NeighConst;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user