From b672c30428c0b397f7323ee470b5c8d4f17a9d69 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 24 Jun 2025 23:52:59 -0400 Subject: [PATCH] add missing overrides and format them consistently --- src/EXTRA-FIX/fix_viscous_sphere.h | 18 +++++++++--------- src/GRANULAR/fix_damping_cundall.h | 18 +++++++++--------- src/GRANULAR/gran_sub_mod_rolling.h | 2 +- src/GRANULAR/gran_sub_mod_tangential.h | 2 +- src/GRANULAR/gran_sub_mod_twisting.h | 2 +- src/LEPTON/pair_lepton_coul.h | 2 +- src/MANYBODY/pair_bop.h | 6 +++--- src/MISC/fix_accelerate_cos.h | 2 +- src/ML-PACE/compute_pace.h | 10 +++++----- src/MOLFILE/dump_molfile.h | 2 +- 10 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/EXTRA-FIX/fix_viscous_sphere.h b/src/EXTRA-FIX/fix_viscous_sphere.h index 2d63c0ca92..7f44184e34 100644 --- a/src/EXTRA-FIX/fix_viscous_sphere.h +++ b/src/EXTRA-FIX/fix_viscous_sphere.h @@ -27,15 +27,15 @@ namespace LAMMPS_NS { class FixViscousSphere : public Fix { public: FixViscousSphere(class LAMMPS *, int, char **); - virtual ~FixViscousSphere(); - int setmask(); - void init(); - void setup(int); - void min_setup(int); - void post_force(int); - void post_force_respa(int, int, int); - void min_post_force(int); - double memory_usage(); + ~FixViscousSphere() override; + int setmask() override; + void init() override; + void setup(int) override; + void min_setup(int) override; + void post_force(int) override; + void post_force_respa(int, int, int) override; + void min_post_force(int) override; + double memory_usage() override; protected: double gamma, *scalegamma, *scaleval; diff --git a/src/GRANULAR/fix_damping_cundall.h b/src/GRANULAR/fix_damping_cundall.h index 53bb1867ca..2ff5f9529a 100644 --- a/src/GRANULAR/fix_damping_cundall.h +++ b/src/GRANULAR/fix_damping_cundall.h @@ -27,15 +27,15 @@ namespace LAMMPS_NS { class FixDampingCundall : public Fix { public: FixDampingCundall(class LAMMPS *, int, char **); - virtual ~FixDampingCundall(); - int setmask(); - void init(); - void setup(int); - void min_setup(int); - void post_force(int); - void post_force_respa(int, int, int); - void min_post_force(int); - double memory_usage(); + ~FixDampingCundall() override; + int setmask() override; + void init() override; + void setup(int) override; + void min_setup(int) override; + void post_force(int) override; + void post_force_respa(int, int, int) override; + void min_post_force(int) override; + double memory_usage() override; protected: double gamma_lin, gamma_ang, *scalegamma, *scaleval; diff --git a/src/GRANULAR/gran_sub_mod_rolling.h b/src/GRANULAR/gran_sub_mod_rolling.h index 9e8b9e6510..97fa98b350 100644 --- a/src/GRANULAR/gran_sub_mod_rolling.h +++ b/src/GRANULAR/gran_sub_mod_rolling.h @@ -37,7 +37,7 @@ namespace Granular_NS { class GranSubModRollingNone : public GranSubModRolling { public: GranSubModRollingNone(class GranularModel *, class LAMMPS *); - void calculate_forces() override{}; + void calculate_forces() override {}; }; /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gran_sub_mod_tangential.h b/src/GRANULAR/gran_sub_mod_tangential.h index ca699fbf1e..7878dc2ffe 100644 --- a/src/GRANULAR/gran_sub_mod_tangential.h +++ b/src/GRANULAR/gran_sub_mod_tangential.h @@ -51,7 +51,7 @@ namespace Granular_NS { class GranSubModTangentialNone : public GranSubModTangential { public: GranSubModTangentialNone(class GranularModel *, class LAMMPS *); - void calculate_forces() override{}; + void calculate_forces() override {}; }; /* ---------------------------------------------------------------------- */ diff --git a/src/GRANULAR/gran_sub_mod_twisting.h b/src/GRANULAR/gran_sub_mod_twisting.h index 2f379cf4ae..068690b9ee 100644 --- a/src/GRANULAR/gran_sub_mod_twisting.h +++ b/src/GRANULAR/gran_sub_mod_twisting.h @@ -38,7 +38,7 @@ namespace Granular_NS { class GranSubModTwistingNone : public GranSubModTwisting { public: GranSubModTwistingNone(class GranularModel *, class LAMMPS *); - void calculate_forces() override{}; + void calculate_forces() override {}; }; /* ---------------------------------------------------------------------- */ diff --git a/src/LEPTON/pair_lepton_coul.h b/src/LEPTON/pair_lepton_coul.h index c58177c6cb..692e84cfd8 100644 --- a/src/LEPTON/pair_lepton_coul.h +++ b/src/LEPTON/pair_lepton_coul.h @@ -28,7 +28,7 @@ namespace LAMMPS_NS { class PairLeptonCoul : public PairLepton { public: PairLeptonCoul(class LAMMPS *_lmp) : PairLepton(_lmp) {}; - ~PairLeptonCoul() override {}; + ~PairLeptonCoul() override = default; void compute(int, int) override; void settings(int, char **) override; void init_style() override; diff --git a/src/MANYBODY/pair_bop.h b/src/MANYBODY/pair_bop.h index cdc6033f00..dafec43a89 100644 --- a/src/MANYBODY/pair_bop.h +++ b/src/MANYBODY/pair_bop.h @@ -57,18 +57,18 @@ class PairBOP : public Pair { struct PairList1 { double r, dis[3]; double betaS, dBetaS, betaP, dBetaP, rep, dRep; - PairList1() {}; + PairList1() = default; }; struct PairList2 { double r, dis[3]; double rep, dRep; - PairList2() {}; + PairList2() = default; }; struct TripleList { double G, dG, cosAng, dCosAngi[3], dCosAngj[3], dCosAngk[3]; - TripleList() {}; + TripleList() = default; }; struct B_SG { diff --git a/src/MISC/fix_accelerate_cos.h b/src/MISC/fix_accelerate_cos.h index dbabfcf660..ecfdee820b 100644 --- a/src/MISC/fix_accelerate_cos.h +++ b/src/MISC/fix_accelerate_cos.h @@ -33,7 +33,7 @@ class FixAccelerateCos : public Fix { FixAccelerateCos(class LAMMPS *, int, char **); int setmask() override; - void init() override{}; + void init() override {}; void setup(int) override; void post_force(int) override; diff --git a/src/ML-PACE/compute_pace.h b/src/ML-PACE/compute_pace.h index 23243b0066..e720a86199 100644 --- a/src/ML-PACE/compute_pace.h +++ b/src/ML-PACE/compute_pace.h @@ -27,11 +27,11 @@ namespace LAMMPS_NS { class ComputePACE : public Compute { public: ComputePACE(class LAMMPS *, int, char **); - ~ComputePACE(); - void init(); - void init_list(int, class NeighList *); - void compute_array(); - double memory_usage(); + ~ComputePACE() override; + void init() override; + void init_list(int, class NeighList *) override; + void compute_array() override; + double memory_usage() override; private: int natoms, nmax, size_peratom, lastcol; diff --git a/src/MOLFILE/dump_molfile.h b/src/MOLFILE/dump_molfile.h index 8ac8623e94..c52b51753a 100644 --- a/src/MOLFILE/dump_molfile.h +++ b/src/MOLFILE/dump_molfile.h @@ -48,7 +48,7 @@ class DumpMolfile : public Dump { void init_style() override; int modify_param(int, char **) override; - void write_header(bigint) override{}; + void write_header(bigint) override {}; void pack(tagint *) override; void write_data(int, double *) override; double memory_usage() override;