Apply override to remaining classes

This commit is contained in:
Richard Berger
2022-01-22 09:56:01 -05:00
parent 12d708b97c
commit 79a9829e92
52 changed files with 322 additions and 333 deletions

View File

@ -22,52 +22,52 @@ namespace LAMMPS_NS {
class ModifyKokkos : public Modify { class ModifyKokkos : public Modify {
public: public:
ModifyKokkos(class LAMMPS *); ModifyKokkos(class LAMMPS *);
~ModifyKokkos() {}
void setup(int); void setup(int) override;
void setup_pre_exchange(); void setup_pre_exchange() override;
void setup_pre_neighbor(); void setup_pre_neighbor() override;
void setup_post_neighbor(); void setup_post_neighbor() override;
void setup_pre_force(int); void setup_pre_force(int) override;
void setup_pre_reverse(int, int); void setup_pre_reverse(int, int) override;
void initial_integrate(int); void initial_integrate(int) override;
void post_integrate(); void post_integrate() override;
void pre_decide(); void pre_decide();
void pre_exchange(); void pre_exchange() override;
void pre_neighbor(); void pre_neighbor() override;
void post_neighbor(); void post_neighbor() override;
void pre_force(int); void pre_force(int) override;
void pre_reverse(int,int); void pre_reverse(int,int) override;
void post_force(int); void post_force(int) override;
void final_integrate(); void final_integrate() override;
void end_of_step(); void end_of_step() override;
double energy_couple(); double energy_couple() override;
double energy_global(); double energy_global() override;
void energy_atom(int, double *); void energy_atom(int, double *) override;
void post_run(); void post_run() override;
void setup_pre_force_respa(int, int); void setup_pre_force_respa(int, int) override;
void initial_integrate_respa(int, int, int); void initial_integrate_respa(int, int, int) override;
void post_integrate_respa(int, int); void post_integrate_respa(int, int) override;
void pre_force_respa(int, int, int); void pre_force_respa(int, int, int) override;
void post_force_respa(int, int, int); void post_force_respa(int, int, int) override;
void final_integrate_respa(int, int); void final_integrate_respa(int, int) override;
void min_pre_exchange(); void min_pre_exchange() override;
void min_pre_neighbor(); void min_pre_neighbor() override;
void min_post_neighbor(); void min_post_neighbor() override;
void min_pre_force(int); void min_pre_force(int) override;
void min_pre_reverse(int,int); void min_pre_reverse(int,int) override;
void min_post_force(int); void min_post_force(int) override;
double min_energy(double *); double min_energy(double *) override;
void min_store(); void min_store() override;
void min_step(double, double *); void min_step(double, double *) override;
void min_clearstore(); void min_clearstore() override;
void min_pushstore(); void min_pushstore() override;
void min_popstore(); void min_popstore() override;
double max_alpha(double *); double max_alpha(double *) override;
int min_dof(); int min_dof() override;
int min_reset_ref(); int min_reset_ref() override;
protected: protected:

View File

@ -44,7 +44,7 @@ struct RandWrap {
class RandPoolWrap : protected Pointers { class RandPoolWrap : protected Pointers {
public: public:
RandPoolWrap(int, class LAMMPS *); RandPoolWrap(int, class LAMMPS *);
~RandPoolWrap(); ~RandPoolWrap() override;
void destroy(); void destroy();
void init(RanMars*, int); void init(RanMars*, int);

View File

@ -36,18 +36,18 @@ class FixLbFluid : public Fix {
public: public:
FixLbFluid(class LAMMPS *, int, char **); FixLbFluid(class LAMMPS *, int, char **);
~FixLbFluid(); ~FixLbFluid() override;
int setmask(); int setmask() override;
void init(); void init() override;
void initial_integrate(int); void initial_integrate(int) override;
void setup(int); void setup(int) override;
void post_force(int); void post_force(int) override;
void end_of_step(); void end_of_step() override;
void grow_arrays(int); void grow_arrays(int) override;
void copy_arrays(int, int, int); void copy_arrays(int, int, int) override;
int pack_exchange(int, double *); int pack_exchange(int, double *) override;
int unpack_exchange(int, double *); int unpack_exchange(int, double *) override;
private: private:
double viscosity, densityinit_real, a_0_real, T; double viscosity, densityinit_real, a_0_real, T;

View File

@ -27,9 +27,9 @@ namespace LAMMPS_NS {
class FixLbMomentum : public Fix { class FixLbMomentum : public Fix {
public: public:
FixLbMomentum(class LAMMPS *, int, char **); FixLbMomentum(class LAMMPS *, int, char **);
int setmask(); int setmask() override;
void init(); void init() override;
void end_of_step(); void end_of_step() override;
private: private:
int linear; int linear;

View File

@ -27,17 +27,17 @@ namespace LAMMPS_NS {
class FixLbPC : public Fix { class FixLbPC : public Fix {
public: public:
FixLbPC(class LAMMPS *, int, char **); FixLbPC(class LAMMPS *, int, char **);
~FixLbPC(); ~FixLbPC() override;
int setmask(); int setmask() override;
void init(); void init() override;
void initial_integrate(int); void initial_integrate(int) override;
void final_integrate(); void final_integrate() override;
void grow_arrays(int); void grow_arrays(int) override;
void copy_arrays(int, int, int); void copy_arrays(int, int, int) override;
// void set_arrays(int); // void set_arrays(int);
int pack_exchange(int, double *); int pack_exchange(int, double *) override;
int unpack_exchange(int, double *); int unpack_exchange(int, double *) override;
private: private:
double dtv, dtf; double dtv, dtf;

View File

@ -27,25 +27,25 @@ namespace LAMMPS_NS {
class FixLbRigidPCSphere : public Fix { class FixLbRigidPCSphere : public Fix {
public: public:
FixLbRigidPCSphere(class LAMMPS *, int, char **); FixLbRigidPCSphere(class LAMMPS *, int, char **);
virtual ~FixLbRigidPCSphere(); ~FixLbRigidPCSphere() override;
virtual int setmask(); int setmask() override;
virtual void init(); void init() override;
virtual void setup(int); void setup(int) override;
virtual void initial_integrate(int); void initial_integrate(int) override;
virtual void final_integrate(); void final_integrate() override;
virtual double compute_scalar(); double compute_scalar() override;
double memory_usage(); double memory_usage() override;
void grow_arrays(int); void grow_arrays(int) override;
void copy_arrays(int, int, int); void copy_arrays(int, int, int) override;
void set_arrays(int); void set_arrays(int) override;
int pack_exchange(int, double *); int pack_exchange(int, double *) override;
int unpack_exchange(int, double *); int unpack_exchange(int, double *) override;
void pre_neighbor(); void pre_neighbor() override;
int dof(int); int dof(int) override;
void reset_dt(); void reset_dt() override;
double compute_array(int, int); double compute_array(int, int) override;
private: private:
double **up; double **up;

View File

@ -27,14 +27,14 @@ namespace LAMMPS_NS {
class FixLbViscous : public Fix { class FixLbViscous : public Fix {
public: public:
FixLbViscous(class LAMMPS *, int, char **); FixLbViscous(class LAMMPS *, int, char **);
virtual ~FixLbViscous() = default;
int setmask(); int setmask() override;
void init(); void init() override;
void setup(int); void setup(int) override;
void min_setup(int); void min_setup(int) override;
void post_force(int); void post_force(int) override;
void post_force_respa(int, int, int); void post_force_respa(int, int, int) override;
void min_post_force(int); void min_post_force(int) override;
protected: protected:
int nlevels_respa; int nlevels_respa;

View File

@ -38,10 +38,10 @@ namespace LAMMPS_NS {
class ComputeSMDTLSPHDefgrad : public Compute { class ComputeSMDTLSPHDefgrad : public Compute {
public: public:
ComputeSMDTLSPHDefgrad(class LAMMPS *, int, char **); ComputeSMDTLSPHDefgrad(class LAMMPS *, int, char **);
~ComputeSMDTLSPHDefgrad(); ~ComputeSMDTLSPHDefgrad() override;
void init(); void init() override;
void compute_peratom(); void compute_peratom() override;
double memory_usage(); double memory_usage() override;
private: private:
int nmax; int nmax;

View File

@ -38,10 +38,10 @@ namespace LAMMPS_NS {
class ComputeSmdTlsphShape : public Compute { class ComputeSmdTlsphShape : public Compute {
public: public:
ComputeSmdTlsphShape(class LAMMPS *, int, char **); ComputeSmdTlsphShape(class LAMMPS *, int, char **);
~ComputeSmdTlsphShape(); ~ComputeSmdTlsphShape() override;
void init(); void init() override;
void compute_peratom(); void compute_peratom() override;
double memory_usage(); double memory_usage() override;
private: private:
int nmax; int nmax;

View File

@ -38,10 +38,10 @@ namespace LAMMPS_NS {
class ComputeSMDTLSPHstrain : public Compute { class ComputeSMDTLSPHstrain : public Compute {
public: public:
ComputeSMDTLSPHstrain(class LAMMPS *, int, char **); ComputeSMDTLSPHstrain(class LAMMPS *, int, char **);
~ComputeSMDTLSPHstrain(); ~ComputeSMDTLSPHstrain() override;
void init(); void init() override;
void compute_peratom(); void compute_peratom() override;
double memory_usage(); double memory_usage() override;
private: private:
int nmax; int nmax;

View File

@ -38,10 +38,10 @@ namespace LAMMPS_NS {
class ComputeSMDTLSPHStrainRate : public Compute { class ComputeSMDTLSPHStrainRate : public Compute {
public: public:
ComputeSMDTLSPHStrainRate(class LAMMPS *, int, char **); ComputeSMDTLSPHStrainRate(class LAMMPS *, int, char **);
~ComputeSMDTLSPHStrainRate(); ~ComputeSMDTLSPHStrainRate() override;
void init(); void init() override;
void compute_peratom(); void compute_peratom() override;
double memory_usage(); double memory_usage() override;
private: private:
int nmax; int nmax;

View File

@ -38,10 +38,10 @@ namespace LAMMPS_NS {
class ComputeSMDTLSPHStress : public Compute { class ComputeSMDTLSPHStress : public Compute {
public: public:
ComputeSMDTLSPHStress(class LAMMPS *, int, char **); ComputeSMDTLSPHStress(class LAMMPS *, int, char **);
~ComputeSMDTLSPHStress(); ~ComputeSMDTLSPHStress() override;
void init(); void init() override;
void compute_peratom(); void compute_peratom() override;
double memory_usage(); double memory_usage() override;
private: private:
int nmax; int nmax;

View File

@ -38,10 +38,10 @@ namespace LAMMPS_NS {
class ComputeSMDULSPHStrainRate : public Compute { class ComputeSMDULSPHStrainRate : public Compute {
public: public:
ComputeSMDULSPHStrainRate(class LAMMPS *, int, char **); ComputeSMDULSPHStrainRate(class LAMMPS *, int, char **);
~ComputeSMDULSPHStrainRate(); ~ComputeSMDULSPHStrainRate() override;
void init(); void init() override;
void compute_peratom(); void compute_peratom() override;
double memory_usage(); double memory_usage() override;
private: private:
int nmax; int nmax;

View File

@ -38,10 +38,10 @@ namespace LAMMPS_NS {
class ComputeSMDULSPHStress : public Compute { class ComputeSMDULSPHStress : public Compute {
public: public:
ComputeSMDULSPHStress(class LAMMPS *, int, char **); ComputeSMDULSPHStress(class LAMMPS *, int, char **);
~ComputeSMDULSPHStress(); ~ComputeSMDULSPHStress() override;
void init(); void init() override;
void compute_peratom(); void compute_peratom() override;
double memory_usage(); double memory_usage() override;
private: private:
int nmax; int nmax;

View File

@ -39,21 +39,21 @@ namespace LAMMPS_NS {
class PairTlsph : public Pair { class PairTlsph : public Pair {
public: public:
PairTlsph(class LAMMPS *); PairTlsph(class LAMMPS *);
virtual ~PairTlsph(); ~PairTlsph() override;
virtual void compute(int, int); void compute(int, int) override;
void settings(int, char **); void settings(int, char **) override;
void coeff(int, char **); void coeff(int, char **) override;
double init_one(int, int); double init_one(int, int) override;
void init_style(); void init_style() override;
void init_list(int, class NeighList *); void init_list(int, class NeighList *) override;
void write_restart_settings(FILE *) {} void write_restart_settings(FILE *) override {}
void read_restart_settings(FILE *) {} void read_restart_settings(FILE *) override {}
virtual double memory_usage(); double memory_usage() override;
void compute_shape_matrix(); void compute_shape_matrix();
void material_model(); void material_model();
void *extract(const char *, int &); void *extract(const char *, int &) override;
int pack_forward_comm(int, int *, double *, int, int *); int pack_forward_comm(int, int *, double *, int, int *) override;
void unpack_forward_comm(int, int, double *); void unpack_forward_comm(int, int, double *) override;
void AssembleStress(); void AssembleStress();
void PreCompute(); void PreCompute();

View File

@ -39,19 +39,19 @@ namespace LAMMPS_NS {
class PairTriSurf : public Pair { class PairTriSurf : public Pair {
public: public:
PairTriSurf(class LAMMPS *); PairTriSurf(class LAMMPS *);
virtual ~PairTriSurf(); ~PairTriSurf() override;
virtual void compute(int, int); void compute(int, int) override;
void settings(int, char **); void settings(int, char **) override;
void coeff(int, char **); void coeff(int, char **) override;
double init_one(int, int); double init_one(int, int) override;
void init_style(); void init_style() override;
void init_list(int, class NeighList *); void init_list(int, class NeighList *) override;
virtual double memory_usage(); double memory_usage() override;
void PointTriangleDistance(const Eigen::Vector3d P, const Eigen::Vector3d TRI1, void PointTriangleDistance(const Eigen::Vector3d P, const Eigen::Vector3d TRI1,
const Eigen::Vector3d TRI2, const Eigen::Vector3d TRI3, const Eigen::Vector3d TRI2, const Eigen::Vector3d TRI3,
Eigen::Vector3d &CP, double &dist); Eigen::Vector3d &CP, double &dist);
double clamp(const double a, const double min, const double max); double clamp(const double a, const double min, const double max);
void *extract(const char *, int &); void *extract(const char *, int &) override;
protected: protected:
double **bulkmodulus; double **bulkmodulus;

View File

@ -39,18 +39,18 @@ namespace LAMMPS_NS {
class PairULSPH : public Pair { class PairULSPH : public Pair {
public: public:
PairULSPH(class LAMMPS *); PairULSPH(class LAMMPS *);
virtual ~PairULSPH(); ~PairULSPH() override;
virtual void compute(int, int); void compute(int, int) override;
void settings(int, char **); void settings(int, char **) override;
void coeff(int, char **); void coeff(int, char **) override;
double init_one(int, int); double init_one(int, int) override;
void init_style(); void init_style() override;
void init_list(int, class NeighList *); void init_list(int, class NeighList *) override;
virtual double memory_usage(); double memory_usage() override;
int pack_forward_comm(int, int *, double *, int, int *); int pack_forward_comm(int, int *, double *, int, int *) override;
void unpack_forward_comm(int, int, double *); void unpack_forward_comm(int, int, double *) override;
void AssembleStressTensor(); void AssembleStressTensor();
void *extract(const char *, int &); void *extract(const char *, int &) override;
void PreCompute(); void PreCompute();
void PreCompute_DensitySummation(); void PreCompute_DensitySummation();
double effective_shear_modulus(const Eigen::Matrix3d d_dev, const Eigen::Matrix3d deltaStressDev, double effective_shear_modulus(const Eigen::Matrix3d d_dev, const Eigen::Matrix3d deltaStressDev,

View File

@ -26,13 +26,12 @@ namespace user_manifold {
public: public:
enum { NPARAMS = 1 }; // Number of parameters. enum { NPARAMS = 1 }; // Number of parameters.
manifold_cylinder(LAMMPS *lmp, int, char **); manifold_cylinder(LAMMPS *lmp, int, char **);
virtual ~manifold_cylinder() {} double g(const double *x) override;
virtual double g(const double *x); void n(const double *x, double *n) override;
virtual void n(const double *x, double *n);
static const char *type() { return "cylinder"; } static const char *type() { return "cylinder"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -24,13 +24,12 @@ namespace user_manifold {
public: public:
manifold_cylinder_dent(LAMMPS *lmp, int, char **); manifold_cylinder_dent(LAMMPS *lmp, int, char **);
enum { NPARAMS = 3 }; // Number of parameters. enum { NPARAMS = 3 }; // Number of parameters.
virtual ~manifold_cylinder_dent() {} double g(const double *x) override;
virtual double g(const double *x); void n(const double *x, double *n) override;
virtual void n(const double *x, double *n);
static const char *type() { return "cylinder/dent"; } static const char *type() { return "cylinder/dent"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -25,15 +25,14 @@ namespace user_manifold {
public: public:
enum { NPARAMS = 4 }; // Number of parameters. enum { NPARAMS = 4 }; // Number of parameters.
manifold_dumbbell(LAMMPS *lmp, int, char **); manifold_dumbbell(LAMMPS *lmp, int, char **);
virtual ~manifold_dumbbell() {} double g(const double *x) override;
virtual double g(const double *x); void n(const double *x, double *nn) override;
virtual void n(const double *x, double *nn);
static const char *type() { return "dumbbell"; } static const char *type() { return "dumbbell"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -24,14 +24,13 @@ namespace user_manifold {
public: public:
enum { NPARAMS = 3 }; enum { NPARAMS = 3 };
manifold_ellipsoid(LAMMPS *lmp, int, char **); manifold_ellipsoid(LAMMPS *lmp, int, char **);
virtual ~manifold_ellipsoid() {} double g(const double *x) override;
virtual double g(const double *x); void n(const double *x, double *n) override;
virtual void n(const double *x, double *n);
static const char *type() { return "ellipsoid"; } static const char *type() { return "ellipsoid"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -51,19 +51,19 @@ namespace user_manifold {
public: public:
enum { NPARAMS = 4 }; enum { NPARAMS = 4 };
manifold_gaussian_bump(class LAMMPS *, int, char **); manifold_gaussian_bump(class LAMMPS *, int, char **);
virtual ~manifold_gaussian_bump(); ~manifold_gaussian_bump() override;
virtual double g(const double *); double g(const double *) override;
virtual void n(const double *, double *); void n(const double *, double *) override;
// Variant of g that computes n at the same time. // Variant of g that computes n at the same time.
virtual double g_and_n(const double *x, double *nn); double g_and_n(const double *x, double *nn) override;
static const char *type() { return "gaussian_bump"; } static const char *type() { return "gaussian_bump"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
virtual void post_param_init(); void post_param_init() override;
private: private:
// Some private constants: // Some private constants:

View File

@ -25,13 +25,12 @@ namespace user_manifold {
public: public:
enum { NPARAMS = 6 }; // Number of parameters. enum { NPARAMS = 6 }; // Number of parameters.
manifold_plane(LAMMPS *lmp, int, char **); manifold_plane(LAMMPS *lmp, int, char **);
virtual ~manifold_plane() {} double g(const double *x) override;
virtual double g(const double *x); void n(const double *x, double *n) override;
virtual void n(const double *x, double *n);
static const char *type() { return "plane"; } static const char *type() { return "plane"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -25,13 +25,12 @@ namespace user_manifold {
public: public:
enum { NPARAMS = 2 }; // Number of parameters. enum { NPARAMS = 2 }; // Number of parameters.
manifold_plane_wiggle(LAMMPS *lmp, int, char **); manifold_plane_wiggle(LAMMPS *lmp, int, char **);
virtual ~manifold_plane_wiggle() {} double g(const double *x) override;
virtual double g(const double *x); void n(const double *x, double *n) override;
virtual void n(const double *x, double *n);
static const char *type() { return "plane/wiggle"; } static const char *type() { return "plane/wiggle"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -26,15 +26,14 @@ namespace user_manifold {
enum { NPARAMS = 1 }; enum { NPARAMS = 1 };
manifold_sphere(LAMMPS *lmp, int, char **) : manifold(lmp) {} manifold_sphere(LAMMPS *lmp, int, char **) : manifold(lmp) {}
virtual ~manifold_sphere() {} double g(const double *x) override
virtual double g(const double *x)
{ {
double R = params[0]; double R = params[0];
double r2 = x[0] * x[0] + x[1] * x[1] + x[2] * x[2]; double r2 = x[0] * x[0] + x[1] * x[1] + x[2] * x[2];
return r2 - R * R; return r2 - R * R;
} }
virtual double g_and_n(const double *x, double *nn) double g_and_n(const double *x, double *nn) override
{ {
double R = params[0]; double R = params[0];
double r2 = x[0] * x[0] + x[1] * x[1] + x[2] * x[2]; double r2 = x[0] * x[0] + x[1] * x[1] + x[2] * x[2];
@ -45,7 +44,7 @@ namespace user_manifold {
return r2 - R * R; return r2 - R * R;
} }
virtual void n(const double *x, double *nn) void n(const double *x, double *nn) override
{ {
nn[0] = 2 * x[0]; nn[0] = 2 * x[0];
nn[1] = 2 * x[1]; nn[1] = 2 * x[1];
@ -59,9 +58,9 @@ namespace user_manifold {
} }
static const char *type() { return "sphere"; } static const char *type() { return "sphere"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -25,16 +25,15 @@ namespace user_manifold {
public: public:
enum { NPARAMS = 5 }; // Number of parameters. enum { NPARAMS = 5 }; // Number of parameters.
manifold_spine(LAMMPS *lmp, int, char **); manifold_spine(LAMMPS *lmp, int, char **);
virtual ~manifold_spine() {} double g(const double *x) override;
virtual double g(const double *x); void n(const double *x, double *nn) override;
virtual void n(const double *x, double *nn); double g_and_n(const double *x, double *nn) override;
virtual double g_and_n(const double *x, double *nn);
static const char *type() { return "spine"; } static const char *type() { return "spine"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
protected: protected:
int power; int power;
@ -45,7 +44,7 @@ namespace user_manifold {
manifold_spine_two(LAMMPS *lmp, int, char **); manifold_spine_two(LAMMPS *lmp, int, char **);
static const char *type() { return "spine/two"; } static const char *type() { return "spine/two"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -26,11 +26,9 @@ namespace user_manifold {
enum { NPARAMS = 2 }; enum { NPARAMS = 2 };
manifold_supersphere(LAMMPS *lmp, int, char **) : manifold(lmp) {} manifold_supersphere(LAMMPS *lmp, int, char **) : manifold(lmp) {}
virtual ~manifold_supersphere() {}
double my_sign(double a) { return (a > 0) - (a < 0); } double my_sign(double a) { return (a > 0) - (a < 0); }
virtual double g(const double *x) double g(const double *x) override
{ {
double R = params[0]; double R = params[0];
double q = params[1]; double q = params[1];
@ -43,7 +41,7 @@ namespace user_manifold {
return rr - pow(R, q); return rr - pow(R, q);
} }
virtual void n(const double *x, double *nn) void n(const double *x, double *nn) override
{ {
double q = params[1]; double q = params[1];
double xx = fabs(x[0]); double xx = fabs(x[0]);
@ -56,9 +54,9 @@ namespace user_manifold {
} }
static const char *type() { return "supersphere"; } static const char *type() { return "supersphere"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -26,17 +26,17 @@ namespace user_manifold {
public: public:
enum { NPARAMS = 3 }; enum { NPARAMS = 3 };
manifold_thylakoid(LAMMPS *lmp, int, char **); manifold_thylakoid(LAMMPS *lmp, int, char **);
virtual ~manifold_thylakoid(); ~manifold_thylakoid() override;
virtual double g(const double *x); double g(const double *x) override;
virtual void n(const double *x, double *n); void n(const double *x, double *n) override;
static const char *type() { return "thylakoid"; } static const char *type() { return "thylakoid"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
virtual void post_param_init(); void post_param_init() override;
private: private:
void init_domains(); void init_domains();

View File

@ -24,14 +24,13 @@ namespace user_manifold {
public: public:
enum { NPARAMS = 2 }; enum { NPARAMS = 2 };
manifold_torus(LAMMPS *, int, char **); manifold_torus(LAMMPS *, int, char **);
~manifold_torus() {} double g(const double *x) override;
virtual double g(const double *x); void n(const double *x, double *n) override;
virtual void n(const double *x, double *n);
static const char *type() { return "torus"; } static const char *type() { return "torus"; }
virtual const char *id() { return type(); } const char *id() override { return type(); }
static int expected_argc() { return NPARAMS; } static int expected_argc() { return NPARAMS; }
virtual int nparams() { return NPARAMS; } int nparams() override { return NPARAMS; }
}; };
} // namespace user_manifold } // namespace user_manifold

View File

@ -28,20 +28,20 @@ namespace LAMMPS_NS {
class FixMDIEngine : public Fix { class FixMDIEngine : public Fix {
public: public:
FixMDIEngine(class LAMMPS *, int, char **); FixMDIEngine(class LAMMPS *, int, char **);
~FixMDIEngine(); ~FixMDIEngine() override;
int setmask(); int setmask() override;
void init(); void init() override;
int execute_command(const char *command, MDI_Comm driver_socket); int execute_command(const char *command, MDI_Comm driver_socket);
char *engine_mode(const char *node); char *engine_mode(const char *node);
// receive and update forces // receive and update forces
void min_setup(int); void min_setup(int) override;
void post_integrate(); void post_integrate() override;
void post_force(int); void post_force(int) override;
void min_pre_force(int); //@COORDS void min_pre_force(int) override; //@COORDS
void min_post_force(int); //@FORCES void min_post_force(int) override; //@FORCES
double *add_force; // stores forces added using +FORCE command double *add_force; // stores forces added using +FORCE command
double potential_energy; // stores potential energy double potential_energy; // stores potential energy

View File

@ -27,8 +27,8 @@ namespace LAMMPS_NS {
class MDIEngine : public Command { class MDIEngine : public Command {
public: public:
MDIEngine(LAMMPS *lmp) : Command(lmp) {} MDIEngine(LAMMPS *lmp) : Command(lmp) {}
virtual ~MDIEngine() {}
void command(int, char **); void command(int, char **) override;
private: private:
class FixMDIEngine *mdi_fix; class FixMDIEngine *mdi_fix;

View File

@ -39,12 +39,12 @@ class PairHDNNP : public Pair {
public: public:
PairHDNNP(class LAMMPS *); PairHDNNP(class LAMMPS *);
virtual ~PairHDNNP(); ~PairHDNNP() override;
virtual void compute(int, int); void compute(int, int) override;
virtual void settings(int, char **); void settings(int, char **) override;
virtual void coeff(int, char **); void coeff(int, char **) override;
virtual void init_style(); void init_style() override;
virtual double init_one(int, int); double init_one(int, int) override;
protected: protected:
virtual void allocate(); virtual void allocate();

View File

@ -11,7 +11,7 @@ class MLIAP_SO3 : protected Pointers {
MLIAP_SO3(LAMMPS *, double vrcut, int vlmax, int vnmax, double valpha); MLIAP_SO3(LAMMPS *, double vrcut, int vlmax, int vnmax, double valpha);
MLIAP_SO3(LAMMPS *lmp) : Pointers(lmp){}; MLIAP_SO3(LAMMPS *lmp) : Pointers(lmp){};
~MLIAP_SO3(); ~MLIAP_SO3() override;
void init(); void init();

View File

@ -39,15 +39,15 @@ namespace LAMMPS_NS {
class PairPACE : public Pair { class PairPACE : public Pair {
public: public:
PairPACE(class LAMMPS *); PairPACE(class LAMMPS *);
virtual ~PairPACE(); ~PairPACE() override;
virtual void compute(int, int); void compute(int, int) override;
void settings(int, char **); void settings(int, char **) override;
void coeff(int, char **); void coeff(int, char **) override;
virtual void init_style(); void init_style() override;
double init_one(int, int); double init_one(int, int) override;
void *extract(const char *, int &); void *extract(const char *, int &) override;
protected: protected:
struct ACEImpl *aceimpl; struct ACEImpl *aceimpl;

View File

@ -29,18 +29,18 @@ namespace LAMMPS_NS {
class ReaderMolfile : public Reader { class ReaderMolfile : public Reader {
public: public:
ReaderMolfile(class LAMMPS *); ReaderMolfile(class LAMMPS *);
virtual ~ReaderMolfile(); ~ReaderMolfile() override;
virtual void settings(int, char **); void settings(int, char **) override;
virtual int read_time(bigint &); int read_time(bigint &) override;
virtual void skip(); void skip() override;
virtual bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &, bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &,
int &, int &, int &); int &, int &, int &) override;
virtual void read_atoms(int, int, double **); void read_atoms(int, int, double **) override;
virtual void open_file(const std::string &); void open_file(const std::string &) override;
virtual void close_file(); void close_file() override;
private: private:
int *fieldindex; // mapping of input fields to dump int *fieldindex; // mapping of input fields to dump

View File

@ -28,7 +28,7 @@ class DumpAtomMPIIO : public DumpAtom {
public: public:
DumpAtomMPIIO(class LAMMPS *, int, char **); DumpAtomMPIIO(class LAMMPS *, int, char **);
virtual ~DumpAtomMPIIO(); ~DumpAtomMPIIO() override;
protected: protected:
bigint bigint
@ -40,12 +40,12 @@ class DumpAtomMPIIO : public DumpAtom {
int performEstimate; // switch for write_data and write_header methods to use for gathering data and detemining filesize for preallocation vs actually writing the data int performEstimate; // switch for write_data and write_header methods to use for gathering data and detemining filesize for preallocation vs actually writing the data
char *filecurrent; // name of file for this round (with % and * replaced) char *filecurrent; // name of file for this round (with % and * replaced)
virtual void openfile(); void openfile() override;
virtual void write_header(bigint); void write_header(bigint) override;
virtual void write(); void write() override;
virtual void write_data(int, double *); void write_data(int, double *) override;
virtual void init_style(); void init_style() override;
typedef void (DumpAtomMPIIO::*FnPtrHeader)(bigint); typedef void (DumpAtomMPIIO::*FnPtrHeader)(bigint);
FnPtrHeader header_choice; // ptr to write header functions FnPtrHeader header_choice; // ptr to write header functions
void header_binary(bigint); void header_binary(bigint);
@ -59,7 +59,7 @@ class DumpAtomMPIIO : public DumpAtom {
int convert_noimage_omp(int, double *); // multithreaded version of convert_noimage int convert_noimage_omp(int, double *); // multithreaded version of convert_noimage
#endif #endif
int convert_string(int, double *); int convert_string(int, double *) override;
typedef void (DumpAtomMPIIO::*FnPtrData)(int, double *); typedef void (DumpAtomMPIIO::*FnPtrData)(int, double *);
FnPtrData write_choice; // ptr to write data functions FnPtrData write_choice; // ptr to write data functions
void write_binary(int, double *); void write_binary(int, double *);

View File

@ -27,7 +27,7 @@ namespace LAMMPS_NS {
class DumpCFGMPIIO : public DumpCFG { class DumpCFGMPIIO : public DumpCFG {
public: public:
DumpCFGMPIIO(class LAMMPS *, int, char **); DumpCFGMPIIO(class LAMMPS *, int, char **);
virtual ~DumpCFGMPIIO(); ~DumpCFGMPIIO() override;
protected: protected:
bigint bigint
@ -43,11 +43,11 @@ class DumpCFGMPIIO : public DumpCFG {
int convert_string_omp(int, double *); // multithreaded version of convert_string int convert_string_omp(int, double *); // multithreaded version of convert_string
#endif #endif
virtual void openfile(); void openfile() override;
virtual void init_style(); void init_style() override;
virtual void write_header(bigint); void write_header(bigint) override;
virtual void write(); void write() override;
virtual void write_data(int, double *); void write_data(int, double *) override;
typedef void (DumpCFGMPIIO::*FnPtrData)(int, double *); typedef void (DumpCFGMPIIO::*FnPtrData)(int, double *);
FnPtrData write_choice; // ptr to write data functions FnPtrData write_choice; // ptr to write data functions

View File

@ -27,7 +27,7 @@ namespace LAMMPS_NS {
class DumpCustomMPIIO : public DumpCustom { class DumpCustomMPIIO : public DumpCustom {
public: public:
DumpCustomMPIIO(class LAMMPS *, int, char **); DumpCustomMPIIO(class LAMMPS *, int, char **);
virtual ~DumpCustomMPIIO(); ~DumpCustomMPIIO() override;
protected: protected:
bigint bigint
@ -43,12 +43,12 @@ class DumpCustomMPIIO : public DumpCustom {
int convert_string_omp(int, double *); // multithreaded version of convert_string int convert_string_omp(int, double *); // multithreaded version of convert_string
#endif #endif
virtual void openfile(); void openfile() override;
virtual void write_header(bigint); void write_header(bigint) override;
virtual void write(); void write() override;
virtual void write_data(int, double *); void write_data(int, double *) override;
virtual void init_style(); void init_style() override;
typedef void (DumpCustomMPIIO::*FnPtrHeader)(bigint); typedef void (DumpCustomMPIIO::*FnPtrHeader)(bigint);
FnPtrHeader header_choice; // ptr to write header functions FnPtrHeader header_choice; // ptr to write header functions
void header_binary(bigint); void header_binary(bigint);

View File

@ -27,7 +27,7 @@ namespace LAMMPS_NS {
class DumpXYZMPIIO : public DumpXYZ { class DumpXYZMPIIO : public DumpXYZ {
public: public:
DumpXYZMPIIO(class LAMMPS *, int, char **); DumpXYZMPIIO(class LAMMPS *, int, char **);
virtual ~DumpXYZMPIIO(); ~DumpXYZMPIIO() override;
protected: protected:
bigint bigint
@ -43,12 +43,12 @@ class DumpXYZMPIIO : public DumpXYZ {
int convert_string_omp(int, double *); // multithreaded version of convert_string int convert_string_omp(int, double *); // multithreaded version of convert_string
#endif #endif
virtual void openfile(); void openfile() override;
virtual void write_header(bigint); void write_header(bigint) override;
virtual void write(); void write() override;
virtual void write_data(int, double *); void write_data(int, double *) override;
virtual void init_style(); void init_style() override;
typedef void (DumpXYZMPIIO::*FnPtrData)(int, double *); typedef void (DumpXYZMPIIO::*FnPtrData)(int, double *);
FnPtrData write_choice; // ptr to write data functions FnPtrData write_choice; // ptr to write data functions

View File

@ -27,7 +27,7 @@ class RestartMPIIO : protected Pointers {
int mpiio_exists; int mpiio_exists;
RestartMPIIO(class LAMMPS *); RestartMPIIO(class LAMMPS *);
~RestartMPIIO() {}
void openForRead(const char *); void openForRead(const char *);
void openForWrite(const char *); void openForWrite(const char *);
void write(MPI_Offset, int, double *); void write(MPI_Offset, int, double *);

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class FixMSCG : public Fix { class FixMSCG : public Fix {
public: public:
FixMSCG(class LAMMPS *, int, char **); FixMSCG(class LAMMPS *, int, char **);
~FixMSCG(); ~FixMSCG() override;
int setmask(); int setmask() override;
void post_constructor(); void post_constructor() override;
void init(); void init() override;
void end_of_step(); void end_of_step() override;
void post_run(); void post_run() override;
private: private:
int range_flag, name_flag, me, nprocs; int range_flag, name_flag, me, nprocs;

View File

@ -33,8 +33,8 @@ namespace LAMMPS_NS {
class DumpNetCDF : public DumpCustom { class DumpNetCDF : public DumpCustom {
public: public:
DumpNetCDF(class LAMMPS *, int, char **); DumpNetCDF(class LAMMPS *, int, char **);
virtual ~DumpNetCDF(); ~DumpNetCDF() override;
virtual void write(); void write() override;
private: private:
static constexpr int NC_FIELD_NAME_MAX = 100; static constexpr int NC_FIELD_NAME_MAX = 100;
@ -88,12 +88,12 @@ class DumpNetCDF : public DumpCustom {
int cell_lengths_var; int cell_lengths_var;
int cell_angles_var; int cell_angles_var;
virtual void openfile(); void openfile() override;
void closefile(); void closefile();
virtual void write_header(bigint); void write_header(bigint) override;
virtual void write_data(int, double *); void write_data(int, double *) override;
virtual int modify_param(int, char **); int modify_param(int, char **) override;
void ncerr(int, const char *, int); void ncerr(int, const char *, int);
}; };

View File

@ -33,8 +33,8 @@ namespace LAMMPS_NS {
class DumpNetCDFMPIIO : public DumpCustom { class DumpNetCDFMPIIO : public DumpCustom {
public: public:
DumpNetCDFMPIIO(class LAMMPS *, int, char **); DumpNetCDFMPIIO(class LAMMPS *, int, char **);
virtual ~DumpNetCDFMPIIO(); ~DumpNetCDFMPIIO() override;
virtual void write(); void write() override;
private: private:
static constexpr int NC_MPIIO_FIELD_NAME_MAX = 100; static constexpr int NC_MPIIO_FIELD_NAME_MAX = 100;
@ -85,13 +85,13 @@ class DumpNetCDFMPIIO : public DumpCustom {
int cell_lengths_var; int cell_lengths_var;
int cell_angles_var; int cell_angles_var;
virtual void openfile(); void openfile() override;
void closefile(); void closefile();
void write_time_and_cell(); void write_time_and_cell();
virtual void write_data(int, double *); void write_data(int, double *) override;
void write_prmtop(); void write_prmtop();
virtual int modify_param(int, char **); int modify_param(int, char **) override;
void ncerr(int, const char *, int); void ncerr(int, const char *, int);
}; };

View File

@ -273,7 +273,7 @@ class voronoicell_neighbor : public voronoicell_base {
* face that is clockwise from the jth edge. */ * face that is clockwise from the jth edge. */
int **ne; int **ne;
voronoicell_neighbor(); voronoicell_neighbor();
~voronoicell_neighbor(); ~voronoicell_neighbor() override;
void operator=(voronoicell_neighbor &c); void operator=(voronoicell_neighbor &c);
/** Cuts the Voronoi cell by a particle whose center is at a /** Cuts the Voronoi cell by a particle whose center is at a
* separation of (x,y,z) from the cell center. The value of rsq * separation of (x,y,z) from the cell center. The value of rsq
@ -321,7 +321,7 @@ class voronoicell_neighbor : public voronoicell_base {
} }
void init(double xmin,double xmax,double ymin,double ymax,double zmin,double zmax); void init(double xmin,double xmax,double ymin,double ymax,double zmin,double zmax);
void check_facets(); void check_facets();
virtual void neighbors(std::vector<int> &v); void neighbors(std::vector<int> &v) override;
private: private:
int *paux1; int *paux1;

View File

@ -47,7 +47,7 @@ namespace {
std::string message; std::string message;
public: public:
explicit qeq_parser_error(const std::string &mesg) { message = mesg; } explicit qeq_parser_error(const std::string &mesg) { message = mesg; }
const char *what() const noexcept { return message.c_str(); } const char *what() const noexcept override { return message.c_str(); }
}; };
} }

View File

@ -27,18 +27,18 @@ namespace LAMMPS_NS {
class FixQMMM : public Fix { class FixQMMM : public Fix {
public: public:
FixQMMM(class LAMMPS *, int, char **); FixQMMM(class LAMMPS *, int, char **);
~FixQMMM(); ~FixQMMM() override;
int setmask(); int setmask() override;
void init(); void init() override;
// send up-to-date position information to QM and MM slave code // send up-to-date position information to QM and MM slave code
void post_integrate(); void post_integrate() override;
// receive and update forces // receive and update forces
void setup(int); void setup(int) override;
void post_force(int); void post_force(int) override;
double memory_usage(); double memory_usage() override;
protected: protected:
void exchange_positions(); // communicate positions to QM and MM slave void exchange_positions(); // communicate positions to QM and MM slave

View File

@ -60,7 +60,7 @@ namespace ReaxFF {
explicit control_parser_error(const std::string &format, const std::string &keyword) { explicit control_parser_error(const std::string &format, const std::string &keyword) {
message = fmt::format(format, keyword); message = fmt::format(format, keyword);
} }
const char *what() const noexcept { return message.c_str(); } const char *what() const noexcept override { return message.c_str(); }
}; };
// NOTE: this function is run on MPI rank 0 only // NOTE: this function is run on MPI rank 0 only

View File

@ -47,7 +47,7 @@ namespace ReaxFF {
std::string message; std::string message;
public: public:
explicit ffield_parser_error(const std::string &mesg) { message = mesg; } explicit ffield_parser_error(const std::string &mesg) { message = mesg; }
const char *what() const noexcept { return message.c_str(); } const char *what() const noexcept override { return message.c_str(); }
}; };
void Read_Force_Field(const char *filename, reax_interaction *reax, void Read_Force_Field(const char *filename, reax_interaction *reax,

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class MinSpin : public Min { class MinSpin : public Min {
public: public:
MinSpin(class LAMMPS *); MinSpin(class LAMMPS *);
~MinSpin() {}
void init(); void init() override;
void setup_style(); void setup_style() override;
int modify_param(int, char **); int modify_param(int, char **) override;
void reset_vectors(); void reset_vectors() override;
int iterate(int); int iterate(int) override;
double evaluate_dt(); double evaluate_dt();
void advance_spins(double); void advance_spins(double);

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class MinSpinCG : public Min { class MinSpinCG : public Min {
public: public:
MinSpinCG(class LAMMPS *); MinSpinCG(class LAMMPS *);
virtual ~MinSpinCG(); ~MinSpinCG() override;
void init(); void init() override;
void setup_style(); void setup_style() override;
void reset_vectors(); void reset_vectors() override;
int modify_param(int, char **); int modify_param(int, char **) override;
int iterate(int); int iterate(int) override;
private: private:
int local_iter; // for neb int local_iter; // for neb

View File

@ -27,12 +27,12 @@ namespace LAMMPS_NS {
class MinSpinLBFGS : public Min { class MinSpinLBFGS : public Min {
public: public:
MinSpinLBFGS(class LAMMPS *); MinSpinLBFGS(class LAMMPS *);
virtual ~MinSpinLBFGS(); ~MinSpinLBFGS() override;
void init(); void init() override;
void setup_style(); void setup_style() override;
int modify_param(int, char **); int modify_param(int, char **) override;
void reset_vectors(); void reset_vectors() override;
int iterate(int); int iterate(int) override;
private: private:
int local_iter; // for neb int local_iter; // for neb

View File

@ -33,15 +33,15 @@ namespace LAMMPS_NS {
class ComputeVoronoi : public Compute { class ComputeVoronoi : public Compute {
public: public:
ComputeVoronoi(class LAMMPS *, int, char **); ComputeVoronoi(class LAMMPS *, int, char **);
~ComputeVoronoi(); ~ComputeVoronoi() override;
void init(); void init() override;
void compute_peratom(); void compute_peratom() override;
void compute_vector(); void compute_vector() override;
void compute_local(); void compute_local() override;
double memory_usage(); double memory_usage() override;
int pack_forward_comm(int, int *, double *, int, int *); int pack_forward_comm(int, int *, double *, int, int *) override;
void unpack_forward_comm(int, int, double *); void unpack_forward_comm(int, int, double *) override;
private: private:
voro::container *con_mono; voro::container *con_mono;