Apply override to Bond classes

This commit is contained in:
Richard Berger
2022-01-20 18:00:16 -05:00
parent 4e89488f27
commit 557e25d6fb
38 changed files with 214 additions and 217 deletions

View File

@ -27,8 +27,7 @@ namespace LAMMPS_NS {
class BondOxdna2Fene : public BondOxdnaFene {
public:
BondOxdna2Fene(class LAMMPS *lmp) : BondOxdnaFene(lmp) {}
virtual ~BondOxdna2Fene() {}
virtual void compute_interaction_sites(double *, double *, double *, double *) const;
void compute_interaction_sites(double *, double *, double *, double *) const override;
};
} // namespace LAMMPS_NS

View File

@ -27,16 +27,16 @@ namespace LAMMPS_NS {
class BondOxdnaFene : public Bond {
public:
BondOxdnaFene(class LAMMPS *lmp) : Bond(lmp) {}
virtual ~BondOxdnaFene();
~BondOxdnaFene() override;
virtual void compute_interaction_sites(double *, double *, double *, double *) const;
virtual void compute(int, int);
void coeff(int, char **);
void init_style();
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
void compute(int, int) override;
void coeff(int, char **) override;
void init_style() override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
double *k, *Delta, *r0; // FENE

View File

@ -27,9 +27,8 @@ namespace LAMMPS_NS {
class BondOxrna2Fene : public BondOxdnaFene {
public:
BondOxrna2Fene(class LAMMPS *lmp) : BondOxdnaFene(lmp) {}
virtual ~BondOxrna2Fene() {}
virtual void compute_interaction_sites(double *, double *, double *, double *) const;
void compute_interaction_sites(double *, double *, double *, double *) const override;
};
} // namespace LAMMPS_NS

View File

@ -27,15 +27,15 @@ namespace LAMMPS_NS {
class BondClass2 : public Bond {
public:
BondClass2(class LAMMPS *);
virtual ~BondClass2();
virtual void compute(int, int);
virtual void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
virtual void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
~BondClass2() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double *r0, *k2, *k3, *k4;

View File

@ -26,22 +26,22 @@ namespace LAMMPS_NS {
class BondFENENM : public BondFENE {
public:
BondFENENM(class LAMMPS *);
virtual ~BondFENENM();
virtual void compute(int, int);
virtual void coeff(int, char **);
void init_style();
double equilibrium_distance(int);
virtual void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
~BondFENENM() override;
void compute(int, int) override;
void coeff(int, char **) override;
void init_style() override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double TWO_1_3;
double *nn, *mm;
virtual void allocate();
void allocate() override;
};
} // namespace LAMMPS_NS

View File

@ -27,14 +27,14 @@ namespace LAMMPS_NS {
class BondGaussian : public Bond {
public:
BondGaussian(class LAMMPS *);
virtual ~BondGaussian();
virtual void compute(int, int);
virtual void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
virtual void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
~BondGaussian() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
int *nterms;

View File

@ -27,14 +27,14 @@ namespace LAMMPS_NS {
class BondHarmonicShift : public Bond {
public:
BondHarmonicShift(class LAMMPS *);
virtual ~BondHarmonicShift();
virtual void compute(int, int);
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
~BondHarmonicShift() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
double *k, *r0, *r1;

View File

@ -27,14 +27,14 @@ namespace LAMMPS_NS {
class BondHarmonicShiftCut : public Bond {
public:
BondHarmonicShiftCut(class LAMMPS *);
virtual ~BondHarmonicShiftCut();
virtual void compute(int, int);
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
~BondHarmonicShiftCut() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
double *k, *r0, *r1;

View File

@ -27,15 +27,15 @@ namespace LAMMPS_NS {
class BondNonlinear : public Bond {
public:
BondNonlinear(class LAMMPS *);
virtual ~BondNonlinear();
virtual void compute(int, int);
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
~BondNonlinear() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double *epsilon, *r0, *lamda;

View File

@ -33,9 +33,9 @@ namespace LAMMPS_NS {
class BondFENEIntel : public BondFENE {
public:
BondFENEIntel(class LAMMPS *);
virtual ~BondFENEIntel();
virtual void compute(int, int);
virtual void init_style();
~BondFENEIntel() override;
void compute(int, int) override;
void init_style() override;
protected:
FixIntel *fix;

View File

@ -33,9 +33,9 @@ namespace LAMMPS_NS {
class BondHarmonicIntel : public BondHarmonic {
public:
BondHarmonicIntel(class LAMMPS *);
virtual ~BondHarmonicIntel();
virtual void compute(int, int);
virtual void init_style();
~BondHarmonicIntel() override;
void compute(int, int) override;
void init_style() override;
protected:
FixIntel *fix;

View File

@ -40,27 +40,27 @@ template <class flt_t, class acc_t> class IntelBuffers;
class FixIntel : public Fix {
public:
FixIntel(class LAMMPS *, int, char **);
virtual ~FixIntel();
virtual int setmask();
virtual void init();
virtual void setup(int);
inline void min_setup(int in) { setup(in); }
void setup_pre_reverse(int eflag = 0, int vflag = 0);
~FixIntel() override;
int setmask() override;
void init() override;
void setup(int) override;
inline void min_setup(int in) override { setup(in); }
void setup_pre_reverse(int eflag = 0, int vflag = 0) override;
bool pair_hybrid_check();
void pair_init_check(const bool cdmessage = false);
void bond_init_check();
void kspace_init_check();
void pre_reverse(int eflag = 0, int vflag = 0);
inline void min_pre_reverse(int eflag = 0, int vflag = 0) { pre_reverse(eflag, vflag); }
void pre_reverse(int eflag = 0, int vflag = 0) override;
inline void min_pre_reverse(int eflag = 0, int vflag = 0) override { pre_reverse(eflag, vflag); }
void post_run() { _print_pkg_info = 1; }
void post_run() override { _print_pkg_info = 1; }
// Get all forces, calculation results from coprocesser
void sync_coprocessor();
double memory_usage();
double memory_usage() override;
typedef struct {
double x, y, z;

View File

@ -40,10 +40,10 @@ class BondClass2Kokkos : public BondClass2 {
typedef EV_FLOAT value_type;
BondClass2Kokkos(class LAMMPS *);
virtual ~BondClass2Kokkos();
void compute(int, int);
void coeff(int, char **);
void read_restart(FILE *);
~BondClass2Kokkos() override;
void compute(int, int) override;
void coeff(int, char **) override;
void read_restart(FILE *) override;
template<int NEWTON_BOND, int EVFLAG>
KOKKOS_INLINE_FUNCTION

View File

@ -39,10 +39,10 @@ class BondFENEKokkos : public BondFENE {
typedef ArrayTypes<DeviceType> AT;
BondFENEKokkos(class LAMMPS *);
virtual ~BondFENEKokkos();
void compute(int, int);
void coeff(int, char **);
void read_restart(FILE *);
~BondFENEKokkos() override;
void compute(int, int) override;
void coeff(int, char **) override;
void read_restart(FILE *) override;
template<int NEWTON_BOND, int EVFLAG>
KOKKOS_INLINE_FUNCTION
@ -92,7 +92,7 @@ class BondFENEKokkos : public BondFENE {
typename AT::t_ffloat_1d d_epsilon;
typename AT::t_ffloat_1d d_sigma;
void allocate();
void allocate() override;
};
}

View File

@ -39,10 +39,10 @@ class BondHarmonicKokkos : public BondHarmonic {
typedef EV_FLOAT value_type;
BondHarmonicKokkos(class LAMMPS *);
virtual ~BondHarmonicKokkos();
void compute(int, int);
void coeff(int, char **);
void read_restart(FILE *);
~BondHarmonicKokkos() override;
void compute(int, int) override;
void coeff(int, char **) override;
void read_restart(FILE *) override;
template<int NEWTON_BOND, int EVFLAG>
KOKKOS_INLINE_FUNCTION
@ -79,7 +79,7 @@ class BondHarmonicKokkos : public BondHarmonic {
typename AT::t_ffloat_1d d_k;
typename AT::t_ffloat_1d d_r0;
void allocate();
void allocate() override;
};
}

View File

@ -29,15 +29,15 @@ namespace LAMMPS_NS {
class BondSpecial : public Bond {
public:
BondSpecial(class LAMMPS *);
virtual ~BondSpecial();
void init_style();
void compute(int, int);
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
~BondSpecial() override;
void init_style() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
double *factor_lj, *factor_coul;

View File

@ -27,16 +27,16 @@ namespace LAMMPS_NS {
class BondFENE : public Bond {
public:
BondFENE(class LAMMPS *lmp) : Bond(lmp) {}
virtual ~BondFENE();
virtual void compute(int, int);
virtual void coeff(int, char **);
void init_style();
double equilibrium_distance(int);
virtual void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
~BondFENE() override;
void compute(int, int) override;
void coeff(int, char **) override;
void init_style() override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double *k, *r0, *epsilon, *sigma;

View File

@ -27,15 +27,15 @@ namespace LAMMPS_NS {
class BondFENEExpand : public Bond {
public:
BondFENEExpand(class LAMMPS *lmp) : Bond(lmp) {}
virtual ~BondFENEExpand();
virtual void compute(int, int);
void coeff(int, char **);
void init_style();
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
~BondFENEExpand() override;
void compute(int, int) override;
void coeff(int, char **) override;
void init_style() override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
double *k, *r0, *epsilon, *sigma, *shift;

View File

@ -27,15 +27,15 @@ namespace LAMMPS_NS {
class BondGromos : public Bond {
public:
BondGromos(class LAMMPS *);
virtual ~BondGromos();
virtual void compute(int, int);
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
~BondGromos() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double *k, *r0;

View File

@ -27,15 +27,15 @@ namespace LAMMPS_NS {
class BondHarmonic : public Bond {
public:
BondHarmonic(class LAMMPS *);
virtual ~BondHarmonic();
virtual void compute(int, int);
virtual void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
virtual void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
~BondHarmonic() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double *k, *r0;

View File

@ -27,15 +27,15 @@ namespace LAMMPS_NS {
class BondMorse : public Bond {
public:
BondMorse(class LAMMPS *);
virtual ~BondMorse();
virtual void compute(int, int);
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
~BondMorse() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double *d0, *alpha, *r0;

View File

@ -27,15 +27,15 @@ namespace LAMMPS_NS {
class BondQuartic : public Bond {
public:
BondQuartic(class LAMMPS *);
virtual ~BondQuartic();
virtual void compute(int, int);
void coeff(int, char **);
void init_style();
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
~BondQuartic() override;
void compute(int, int) override;
void coeff(int, char **) override;
void init_style() override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
double TWO_1_3;

View File

@ -27,16 +27,16 @@ namespace LAMMPS_NS {
class BondTable : public Bond {
public:
BondTable(class LAMMPS *);
virtual ~BondTable();
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
double single(int, double, int, int, double &);
~BondTable() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_restart_settings(FILE *) override;
void read_restart_settings(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
int tabstyle, tablength;

View File

@ -33,7 +33,7 @@ class BondClass2OMP : public BondClass2, public ThrOMP {
public:
BondClass2OMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondFENEExpandOMP : public BondFENEExpand, public ThrOMP {
public:
BondFENEExpandOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondFENEOMP : public BondFENE, public ThrOMP {
public:
BondFENEOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondGromosOMP : public BondGromos, public ThrOMP {
public:
BondGromosOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondHarmonicOMP : public BondHarmonic, public ThrOMP {
public:
BondHarmonicOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondHarmonicShiftCutOMP : public BondHarmonicShiftCut, public ThrOMP {
public:
BondHarmonicShiftCutOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondHarmonicShiftOMP : public BondHarmonicShift, public ThrOMP {
public:
BondHarmonicShiftOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondMorseOMP : public BondMorse, public ThrOMP {
public:
BondMorseOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondNonlinearOMP : public BondNonlinear, public ThrOMP {
public:
BondNonlinearOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondQuarticOMP : public BondQuartic, public ThrOMP {
public:
BondQuarticOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -33,7 +33,7 @@ class BondTableOMP : public BondTable, public ThrOMP {
public:
BondTableOMP(class LAMMPS *lmp);
virtual void compute(int, int);
void compute(int, int) override;
private:
template <int EVFLAG, int EFLAG, int NEWTON_BOND>

View File

@ -27,14 +27,14 @@ namespace LAMMPS_NS {
class BondMM3 : public Bond {
public:
BondMM3(class LAMMPS *);
virtual ~BondMM3();
virtual void compute(int, int);
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
double single(int, double, int, int, double &);
~BondMM3() override;
void compute(int, int) override;
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &) override;
protected:
double *r0, *k2;

View File

@ -27,15 +27,14 @@ namespace LAMMPS_NS {
class BondDeprecated : public Bond {
public:
BondDeprecated(class LAMMPS *lmp) : Bond(lmp) {}
virtual ~BondDeprecated() {}
virtual void compute(int, int) {}
virtual void settings(int, char **);
virtual void coeff(int, char **) {}
virtual double equilibrium_distance(int) { return 0.0; }
virtual void write_restart(FILE *) {}
virtual void read_restart(FILE *) {}
virtual double single(int, double, int, int, double &) { return 0.0; }
void compute(int, int) override {}
void settings(int, char **) override;
void coeff(int, char **) override {}
double equilibrium_distance(int) override { return 0.0; }
void write_restart(FILE *) override {}
void read_restart(FILE *) override {}
double single(int, double, int, int, double &) override { return 0.0; }
};
} // namespace LAMMPS_NS

View File

@ -33,16 +33,16 @@ class BondHybrid : public Bond {
char **keywords; // keyword for each Bond style
BondHybrid(class LAMMPS *);
~BondHybrid();
void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void init_style();
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
double single(int, double, int, int, double &);
double memory_usage();
~BondHybrid() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **) override;
void init_style() override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
double single(int, double, int, int, double &) override;
double memory_usage() override;
private:
int *map; // which style each bond type points to

View File

@ -27,18 +27,18 @@ namespace LAMMPS_NS {
class BondZero : public Bond {
public:
BondZero(class LAMMPS *);
virtual ~BondZero();
virtual void compute(int, int);
virtual void settings(int, char **);
~BondZero() override;
void compute(int, int) override;
void settings(int, char **) override;
void coeff(int, char **);
double equilibrium_distance(int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_data(FILE *);
void coeff(int, char **) override;
double equilibrium_distance(int) override;
void write_restart(FILE *) override;
void read_restart(FILE *) override;
void write_data(FILE *) override;
double single(int, double, int, int, double &);
virtual void *extract(const char *, int &);
double single(int, double, int, int, double &) override;
void *extract(const char *, int &) override;
protected:
double *r0;