diff --git a/src/USER-OMP/angle_charmm_omp.cpp b/src/USER-OMP/angle_charmm_omp.cpp index 6a53a7d0ba..36a5127ccf 100644 --- a/src/USER-OMP/angle_charmm_omp.cpp +++ b/src/USER-OMP/angle_charmm_omp.cpp @@ -26,11 +26,20 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; #define SMALL 0.001 +/* ---------------------------------------------------------------------- */ + + AngleCharmmOMP::AngleCharmmOMP(class LAMMPS *lmp) + : AngleCharmm(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + /* ---------------------------------------------------------------------- */ void AngleCharmmOMP::compute(int eflag, int vflag) diff --git a/src/USER-OMP/angle_charmm_omp.h b/src/USER-OMP/angle_charmm_omp.h index 77ed6c74d7..f9f13cad33 100644 --- a/src/USER-OMP/angle_charmm_omp.h +++ b/src/USER-OMP/angle_charmm_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleCharmmOMP : public AngleCharmm, public ThrOMP { public: - AngleCharmmOMP(class LAMMPS *lmp) : - AngleCharmm(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleCharmmOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_class2_omp.cpp b/src/USER-OMP/angle_class2_omp.cpp index dbd87139af..37b28343e1 100644 --- a/src/USER-OMP/angle_class2_omp.cpp +++ b/src/USER-OMP/angle_class2_omp.cpp @@ -26,6 +26,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,6 +34,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleClass2OMP::AngleClass2OMP(class LAMMPS *lmp) + : AngleClass2(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleClass2OMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_class2_omp.h b/src/USER-OMP/angle_class2_omp.h index 039d86b8af..5317f7c447 100644 --- a/src/USER-OMP/angle_class2_omp.h +++ b/src/USER-OMP/angle_class2_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleClass2OMP : public AngleClass2, public ThrOMP { public: - AngleClass2OMP(class LAMMPS *lmp) : - AngleClass2(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleClass2OMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_cosine_delta_omp.cpp b/src/USER-OMP/angle_cosine_delta_omp.cpp index f37a6d452e..8c14513ca8 100644 --- a/src/USER-OMP/angle_cosine_delta_omp.cpp +++ b/src/USER-OMP/angle_cosine_delta_omp.cpp @@ -26,6 +26,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,6 +34,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleCosineDeltaOMP::AngleCosineDeltaOMP(class LAMMPS *lmp) + : AngleCosineDelta(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleCosineDeltaOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_cosine_delta_omp.h b/src/USER-OMP/angle_cosine_delta_omp.h index 86e96eb900..aecc30f794 100644 --- a/src/USER-OMP/angle_cosine_delta_omp.h +++ b/src/USER-OMP/angle_cosine_delta_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleCosineDeltaOMP : public AngleCosineDelta, public ThrOMP { public: - AngleCosineDeltaOMP(class LAMMPS *lmp) : - AngleCosineDelta(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleCosineDeltaOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_cosine_omp.cpp b/src/USER-OMP/angle_cosine_omp.cpp index f0c4bc7234..4bc93e95ac 100644 --- a/src/USER-OMP/angle_cosine_omp.cpp +++ b/src/USER-OMP/angle_cosine_omp.cpp @@ -26,6 +26,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,6 +34,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleCosineOMP::AngleCosineOMP(class LAMMPS *lmp) + : AngleCosine(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleCosineOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_cosine_omp.h b/src/USER-OMP/angle_cosine_omp.h index 29b3e8b86b..6d2995ba0f 100644 --- a/src/USER-OMP/angle_cosine_omp.h +++ b/src/USER-OMP/angle_cosine_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleCosineOMP : public AngleCosine, public ThrOMP { public: - AngleCosineOMP(class LAMMPS *lmp) : - AngleCosine(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleCosineOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_cosine_periodic_omp.cpp b/src/USER-OMP/angle_cosine_periodic_omp.cpp index 66c09dcebd..b96f456f69 100644 --- a/src/USER-OMP/angle_cosine_periodic_omp.cpp +++ b/src/USER-OMP/angle_cosine_periodic_omp.cpp @@ -26,6 +26,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,6 +34,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleCosinePeriodicOMP::AngleCosinePeriodicOMP(class LAMMPS *lmp) + : AngleCosinePeriodic(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleCosinePeriodicOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_cosine_periodic_omp.h b/src/USER-OMP/angle_cosine_periodic_omp.h index 63325ff8f5..9d05b3e071 100644 --- a/src/USER-OMP/angle_cosine_periodic_omp.h +++ b/src/USER-OMP/angle_cosine_periodic_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleCosinePeriodicOMP : public AngleCosinePeriodic, public ThrOMP { public: - AngleCosinePeriodicOMP(class LAMMPS *lmp) : - AngleCosinePeriodic(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleCosinePeriodicOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp index 1e5648c760..26ad2976cf 100644 --- a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp @@ -26,6 +26,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,6 +34,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleCosineShiftExpOMP::AngleCosineShiftExpOMP(class LAMMPS *lmp) + : AngleCosineShiftExp(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleCosineShiftExpOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_cosine_shift_exp_omp.h b/src/USER-OMP/angle_cosine_shift_exp_omp.h index b9adbf104d..b70045b890 100644 --- a/src/USER-OMP/angle_cosine_shift_exp_omp.h +++ b/src/USER-OMP/angle_cosine_shift_exp_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleCosineShiftExpOMP : public AngleCosineShiftExp, public ThrOMP { public: - AngleCosineShiftExpOMP(class LAMMPS *lmp) : - AngleCosineShiftExp(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleCosineShiftExpOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_cosine_shift_omp.cpp b/src/USER-OMP/angle_cosine_shift_omp.cpp index 45da085a56..a52f0343a0 100644 --- a/src/USER-OMP/angle_cosine_shift_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_omp.cpp @@ -26,6 +26,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,6 +34,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleCosineShiftOMP::AngleCosineShiftOMP(class LAMMPS *lmp) + : AngleCosineShift(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleCosineShiftOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_cosine_shift_omp.h b/src/USER-OMP/angle_cosine_shift_omp.h index dadbd1cf53..4afe4a233e 100644 --- a/src/USER-OMP/angle_cosine_shift_omp.h +++ b/src/USER-OMP/angle_cosine_shift_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleCosineShiftOMP : public AngleCosineShift, public ThrOMP { public: - AngleCosineShiftOMP(class LAMMPS *lmp) : - AngleCosineShift(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleCosineShiftOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_cosine_squared_omp.cpp b/src/USER-OMP/angle_cosine_squared_omp.cpp index f95d703a7f..d518167508 100644 --- a/src/USER-OMP/angle_cosine_squared_omp.cpp +++ b/src/USER-OMP/angle_cosine_squared_omp.cpp @@ -26,6 +26,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,6 +34,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleCosineSquaredOMP::AngleCosineSquaredOMP(class LAMMPS *lmp) + : AngleCosineSquared(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleCosineSquaredOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_cosine_squared_omp.h b/src/USER-OMP/angle_cosine_squared_omp.h index 82c7c06e89..aeadd2e95d 100644 --- a/src/USER-OMP/angle_cosine_squared_omp.h +++ b/src/USER-OMP/angle_cosine_squared_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleCosineSquaredOMP : public AngleCosineSquared, public ThrOMP { public: - AngleCosineSquaredOMP(class LAMMPS *lmp) : - AngleCosineSquared(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleCosineSquaredOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_dipole_omp.cpp b/src/USER-OMP/angle_dipole_omp.cpp index 91cb198e6d..863512dd40 100644 --- a/src/USER-OMP/angle_dipole_omp.cpp +++ b/src/USER-OMP/angle_dipole_omp.cpp @@ -27,6 +27,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -34,6 +35,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleDipoleOMP::AngleDipoleOMP(class LAMMPS *lmp) + : AngleDipole(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleDipoleOMP::compute(int eflag, int vflag) { @@ -65,6 +74,7 @@ void AngleDipoleOMP::compute(int eflag, int vflag) reduce_thr(this, eflag, vflag, thr); } // end of omp parallel region + } template diff --git a/src/USER-OMP/angle_dipole_omp.h b/src/USER-OMP/angle_dipole_omp.h index c148adfbe4..23e69ad5ee 100644 --- a/src/USER-OMP/angle_dipole_omp.h +++ b/src/USER-OMP/angle_dipole_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleDipoleOMP : public AngleDipole, public ThrOMP { public: - AngleDipoleOMP(class LAMMPS *lmp) : - AngleDipole(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleDipoleOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_harmonic_omp.cpp b/src/USER-OMP/angle_harmonic_omp.cpp index f6384ff2cc..1ebfa3fdde 100644 --- a/src/USER-OMP/angle_harmonic_omp.cpp +++ b/src/USER-OMP/angle_harmonic_omp.cpp @@ -26,6 +26,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,6 +34,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleHarmonicOMP::AngleHarmonicOMP(class LAMMPS *lmp) + : AngleHarmonic(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleHarmonicOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_harmonic_omp.h b/src/USER-OMP/angle_harmonic_omp.h index 3855726192..f8169de117 100644 --- a/src/USER-OMP/angle_harmonic_omp.h +++ b/src/USER-OMP/angle_harmonic_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleHarmonicOMP : public AngleHarmonic, public ThrOMP { public: - AngleHarmonicOMP(class LAMMPS *lmp) : - AngleHarmonic(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleHarmonicOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_sdk_omp.cpp b/src/USER-OMP/angle_sdk_omp.cpp index 41ac2bb557..098d14053c 100644 --- a/src/USER-OMP/angle_sdk_omp.cpp +++ b/src/USER-OMP/angle_sdk_omp.cpp @@ -27,6 +27,7 @@ #include "lj_sdk_common.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; using namespace LJSDKParms; @@ -35,6 +36,14 @@ using namespace LJSDKParms; /* ---------------------------------------------------------------------- */ +AngleSDKOMP::AngleSDKOMP(class LAMMPS *lmp) + : AngleSDK(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleSDKOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_sdk_omp.h b/src/USER-OMP/angle_sdk_omp.h index ed9e1bc40c..350490811f 100644 --- a/src/USER-OMP/angle_sdk_omp.h +++ b/src/USER-OMP/angle_sdk_omp.h @@ -33,9 +33,7 @@ namespace LAMMPS_NS { class AngleSDKOMP : public AngleSDK, public ThrOMP { public: - AngleSDKOMP(class LAMMPS *lmp) : - AngleSDK(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleSDKOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/angle_table_omp.cpp b/src/USER-OMP/angle_table_omp.cpp index c35836b72d..edb162d983 100644 --- a/src/USER-OMP/angle_table_omp.cpp +++ b/src/USER-OMP/angle_table_omp.cpp @@ -26,6 +26,7 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -33,6 +34,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +AngleTableOMP::AngleTableOMP(class LAMMPS *lmp) + : AngleTable(lmp), ThrOMP(lmp,THR_ANGLE) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void AngleTableOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/angle_table_omp.h b/src/USER-OMP/angle_table_omp.h index b0bb9c7113..31d7db60b6 100644 --- a/src/USER-OMP/angle_table_omp.h +++ b/src/USER-OMP/angle_table_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class AngleTableOMP : public AngleTable, public ThrOMP { public: - AngleTableOMP(class LAMMPS *lmp) : - AngleTable(lmp), ThrOMP(lmp,THR_ANGLE) {}; - + AngleTableOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_class2_omp.cpp b/src/USER-OMP/bond_class2_omp.cpp index 76f447fc8b..1d0efe3862 100644 --- a/src/USER-OMP/bond_class2_omp.cpp +++ b/src/USER-OMP/bond_class2_omp.cpp @@ -24,8 +24,18 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +BondClass2OMP::BondClass2OMP(class LAMMPS *lmp) + : BondClass2(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + /* ---------------------------------------------------------------------- */ void BondClass2OMP::compute(int eflag, int vflag) diff --git a/src/USER-OMP/bond_class2_omp.h b/src/USER-OMP/bond_class2_omp.h index 181ed4a441..ab41ae401e 100644 --- a/src/USER-OMP/bond_class2_omp.h +++ b/src/USER-OMP/bond_class2_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondClass2OMP : public BondClass2, public ThrOMP { public: - BondClass2OMP(class LAMMPS *lmp) : - BondClass2(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondClass2OMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_fene_expand_omp.cpp b/src/USER-OMP/bond_fene_expand_omp.cpp index 71fb5af1fa..42de952298 100644 --- a/src/USER-OMP/bond_fene_expand_omp.cpp +++ b/src/USER-OMP/bond_fene_expand_omp.cpp @@ -26,10 +26,19 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +BondFENEExpandOMP::BondFENEExpandOMP(class LAMMPS *lmp) + : BondFENEExpand(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void BondFENEExpandOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/bond_fene_expand_omp.h b/src/USER-OMP/bond_fene_expand_omp.h index fd7fe4b04f..a383fe58a7 100644 --- a/src/USER-OMP/bond_fene_expand_omp.h +++ b/src/USER-OMP/bond_fene_expand_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondFENEExpandOMP : public BondFENEExpand, public ThrOMP { public: - BondFENEExpandOMP(class LAMMPS *lmp) : - BondFENEExpand(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondFENEExpandOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_fene_omp.cpp b/src/USER-OMP/bond_fene_omp.cpp index fdf206998e..f9556392fb 100644 --- a/src/USER-OMP/bond_fene_omp.cpp +++ b/src/USER-OMP/bond_fene_omp.cpp @@ -26,10 +26,19 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +BondFENEOMP::BondFENEOMP(class LAMMPS *lmp) + : BondFENE(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void BondFENEOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/bond_fene_omp.h b/src/USER-OMP/bond_fene_omp.h index b617aa1363..c3b0348e93 100644 --- a/src/USER-OMP/bond_fene_omp.h +++ b/src/USER-OMP/bond_fene_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondFENEOMP : public BondFENE, public ThrOMP { public: - BondFENEOMP(class LAMMPS *lmp) : - BondFENE(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondFENEOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_harmonic_omp.cpp b/src/USER-OMP/bond_harmonic_omp.cpp index 13bfedc6b4..19b03194be 100644 --- a/src/USER-OMP/bond_harmonic_omp.cpp +++ b/src/USER-OMP/bond_harmonic_omp.cpp @@ -24,10 +24,19 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +BondHarmonicOMP::BondHarmonicOMP(class LAMMPS *lmp) + : BondHarmonic(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void BondHarmonicOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/bond_harmonic_omp.h b/src/USER-OMP/bond_harmonic_omp.h index 79c12aa12a..c542033d5e 100644 --- a/src/USER-OMP/bond_harmonic_omp.h +++ b/src/USER-OMP/bond_harmonic_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondHarmonicOMP : public BondHarmonic, public ThrOMP { public: - BondHarmonicOMP(class LAMMPS *lmp) : - BondHarmonic(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondHarmonicOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp index b17f28b9f1..e5f1b49f23 100644 --- a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp @@ -24,10 +24,19 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +BondHarmonicShiftCutOMP::BondHarmonicShiftCutOMP(class LAMMPS *lmp) + : BondHarmonicShiftCut(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void BondHarmonicShiftCutOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/bond_harmonic_shift_cut_omp.h b/src/USER-OMP/bond_harmonic_shift_cut_omp.h index e324da73ac..fd4f6185f0 100644 --- a/src/USER-OMP/bond_harmonic_shift_cut_omp.h +++ b/src/USER-OMP/bond_harmonic_shift_cut_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondHarmonicShiftCutOMP : public BondHarmonicShiftCut, public ThrOMP { public: - BondHarmonicShiftCutOMP(class LAMMPS *lmp) : - BondHarmonicShiftCut(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondHarmonicShiftCutOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_harmonic_shift_omp.cpp b/src/USER-OMP/bond_harmonic_shift_omp.cpp index 01a974f183..87d62afd15 100644 --- a/src/USER-OMP/bond_harmonic_shift_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_omp.cpp @@ -24,10 +24,19 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +BondHarmonicShiftOMP::BondHarmonicShiftOMP(class LAMMPS *lmp) + : BondHarmonicShift(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void BondHarmonicShiftOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/bond_harmonic_shift_omp.h b/src/USER-OMP/bond_harmonic_shift_omp.h index d5a45472a6..6c5aa1324e 100644 --- a/src/USER-OMP/bond_harmonic_shift_omp.h +++ b/src/USER-OMP/bond_harmonic_shift_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondHarmonicShiftOMP : public BondHarmonicShift, public ThrOMP { public: - BondHarmonicShiftOMP(class LAMMPS *lmp) : - BondHarmonicShift(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondHarmonicShiftOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_morse_omp.cpp b/src/USER-OMP/bond_morse_omp.cpp index e6bbe9e00a..39979edf39 100644 --- a/src/USER-OMP/bond_morse_omp.cpp +++ b/src/USER-OMP/bond_morse_omp.cpp @@ -24,10 +24,19 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +BondMorseOMP::BondMorseOMP(class LAMMPS *lmp) + : BondMorse(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void BondMorseOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/bond_morse_omp.h b/src/USER-OMP/bond_morse_omp.h index 0deb731e2c..e6a9177868 100644 --- a/src/USER-OMP/bond_morse_omp.h +++ b/src/USER-OMP/bond_morse_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondMorseOMP : public BondMorse, public ThrOMP { public: - BondMorseOMP(class LAMMPS *lmp) : - BondMorse(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondMorseOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_nonlinear_omp.cpp b/src/USER-OMP/bond_nonlinear_omp.cpp index bc15f1edb6..cfb046bf67 100644 --- a/src/USER-OMP/bond_nonlinear_omp.cpp +++ b/src/USER-OMP/bond_nonlinear_omp.cpp @@ -24,10 +24,19 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +BondNonlinearOMP::BondNonlinearOMP(class LAMMPS *lmp) + : BondNonlinear(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void BondNonlinearOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/bond_nonlinear_omp.h b/src/USER-OMP/bond_nonlinear_omp.h index a104a9af44..ae1b671ad4 100644 --- a/src/USER-OMP/bond_nonlinear_omp.h +++ b/src/USER-OMP/bond_nonlinear_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondNonlinearOMP : public BondNonlinear, public ThrOMP { public: - BondNonlinearOMP(class LAMMPS *lmp) : - BondNonlinear(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondNonlinearOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_quartic_omp.cpp b/src/USER-OMP/bond_quartic_omp.cpp index a0844ded52..d4ce470cde 100644 --- a/src/USER-OMP/bond_quartic_omp.cpp +++ b/src/USER-OMP/bond_quartic_omp.cpp @@ -25,10 +25,19 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +BondQuarticOMP::BondQuarticOMP(class LAMMPS *lmp) + : BondQuartic(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void BondQuarticOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/bond_quartic_omp.h b/src/USER-OMP/bond_quartic_omp.h index f2dcec833b..bdc7d229e2 100644 --- a/src/USER-OMP/bond_quartic_omp.h +++ b/src/USER-OMP/bond_quartic_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondQuarticOMP : public BondQuartic, public ThrOMP { public: - BondQuarticOMP(class LAMMPS *lmp) : - BondQuartic(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondQuarticOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/bond_table_omp.cpp b/src/USER-OMP/bond_table_omp.cpp index 639c2c8a07..fe344dcfbe 100644 --- a/src/USER-OMP/bond_table_omp.cpp +++ b/src/USER-OMP/bond_table_omp.cpp @@ -24,10 +24,19 @@ #include +#include "suffix.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +BondTableOMP::BondTableOMP(class LAMMPS *lmp) + : BondTable(lmp), ThrOMP(lmp,THR_BOND) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void BondTableOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/bond_table_omp.h b/src/USER-OMP/bond_table_omp.h index 3cf8022226..17e48463d3 100644 --- a/src/USER-OMP/bond_table_omp.h +++ b/src/USER-OMP/bond_table_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class BondTableOMP : public BondTable, public ThrOMP { public: - BondTableOMP(class LAMMPS *lmp) : - BondTable(lmp), ThrOMP(lmp,THR_BOND) {}; - + BondTableOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/dihedral_charmm_omp.cpp b/src/USER-OMP/dihedral_charmm_omp.cpp index b4d7e2e4ad..6044a0be04 100644 --- a/src/USER-OMP/dihedral_charmm_omp.cpp +++ b/src/USER-OMP/dihedral_charmm_omp.cpp @@ -28,6 +28,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -35,6 +36,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +DihedralCharmmOMP::DihedralCharmmOMP(class LAMMPS *lmp) + : DihedralCharmm(lmp), ThrOMP(lmp,THR_DIHEDRAL|THR_CHARMM) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void DihedralCharmmOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/dihedral_charmm_omp.h b/src/USER-OMP/dihedral_charmm_omp.h index 75ba6410d5..6705b89fbc 100644 --- a/src/USER-OMP/dihedral_charmm_omp.h +++ b/src/USER-OMP/dihedral_charmm_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class DihedralCharmmOMP : public DihedralCharmm, public ThrOMP { public: - DihedralCharmmOMP(class LAMMPS *lmp) : - DihedralCharmm(lmp), ThrOMP(lmp,THR_DIHEDRAL|THR_CHARMM) {}; - + DihedralCharmmOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/dihedral_class2_omp.cpp b/src/USER-OMP/dihedral_class2_omp.cpp index 5f1aedf788..1c473ca4b1 100644 --- a/src/USER-OMP/dihedral_class2_omp.cpp +++ b/src/USER-OMP/dihedral_class2_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -32,6 +33,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +DihedralClass2OMP::DihedralClass2OMP(class LAMMPS *lmp) + : DihedralClass2(lmp), ThrOMP(lmp,THR_DIHEDRAL) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void DihedralClass2OMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/dihedral_class2_omp.h b/src/USER-OMP/dihedral_class2_omp.h index 14a6c40edd..ac7b21cb4b 100644 --- a/src/USER-OMP/dihedral_class2_omp.h +++ b/src/USER-OMP/dihedral_class2_omp.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class DihedralClass2OMP : public DihedralClass2, public ThrOMP { public: - DihedralClass2OMP(class LAMMPS *lmp) : - DihedralClass2(lmp), ThrOMP(lmp,THR_DIHEDRAL) {}; - + DihedralClass2OMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp index 8acd1050aa..29a7e48f52 100644 --- a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -32,6 +33,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +DihedralCosineShiftExpOMP::DihedralCosineShiftExpOMP(class LAMMPS *lmp) + : DihedralCosineShiftExp(lmp), ThrOMP(lmp,THR_DIHEDRAL) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void DihedralCosineShiftExpOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/dihedral_cosine_shift_exp_omp.h b/src/USER-OMP/dihedral_cosine_shift_exp_omp.h index 54627c169b..502c2c01e9 100644 --- a/src/USER-OMP/dihedral_cosine_shift_exp_omp.h +++ b/src/USER-OMP/dihedral_cosine_shift_exp_omp.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class DihedralCosineShiftExpOMP : public DihedralCosineShiftExp, public ThrOMP { public: - DihedralCosineShiftExpOMP(class LAMMPS *lmp) : - DihedralCosineShiftExp(lmp), ThrOMP(lmp,THR_DIHEDRAL) {}; - + DihedralCosineShiftExpOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/dihedral_harmonic_omp.cpp b/src/USER-OMP/dihedral_harmonic_omp.cpp index 25e6b548ce..46fee71422 100644 --- a/src/USER-OMP/dihedral_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_harmonic_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -32,6 +33,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +DihedralHarmonicOMP::DihedralHarmonicOMP(class LAMMPS *lmp) + : DihedralHarmonic(lmp), ThrOMP(lmp,THR_DIHEDRAL) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void DihedralHarmonicOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/dihedral_harmonic_omp.h b/src/USER-OMP/dihedral_harmonic_omp.h index 8b8562ad90..744054ae43 100644 --- a/src/USER-OMP/dihedral_harmonic_omp.h +++ b/src/USER-OMP/dihedral_harmonic_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class DihedralHarmonicOMP : public DihedralHarmonic, public ThrOMP { public: - DihedralHarmonicOMP(class LAMMPS *lmp) : - DihedralHarmonic(lmp), ThrOMP(lmp,THR_DIHEDRAL) {}; - + DihedralHarmonicOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/dihedral_helix_omp.cpp b/src/USER-OMP/dihedral_helix_omp.cpp index ae4e705399..dc9673699d 100644 --- a/src/USER-OMP/dihedral_helix_omp.cpp +++ b/src/USER-OMP/dihedral_helix_omp.cpp @@ -26,6 +26,7 @@ #include "math_const.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -35,6 +36,14 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ +DihedralHelixOMP::DihedralHelixOMP(class LAMMPS *lmp) + : DihedralHelix(lmp), ThrOMP(lmp,THR_DIHEDRAL) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void DihedralHelixOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/dihedral_helix_omp.h b/src/USER-OMP/dihedral_helix_omp.h index e932045cff..de3d5b8f30 100644 --- a/src/USER-OMP/dihedral_helix_omp.h +++ b/src/USER-OMP/dihedral_helix_omp.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class DihedralHelixOMP : public DihedralHelix, public ThrOMP { public: - DihedralHelixOMP(class LAMMPS *lmp) : - DihedralHelix(lmp), ThrOMP(lmp,THR_DIHEDRAL) {}; - + DihedralHelixOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp index bd4dccd18e..decc12e75a 100644 --- a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -32,6 +33,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +DihedralMultiHarmonicOMP::DihedralMultiHarmonicOMP(class LAMMPS *lmp) + : DihedralMultiHarmonic(lmp), ThrOMP(lmp,THR_DIHEDRAL) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void DihedralMultiHarmonicOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/dihedral_multi_harmonic_omp.h b/src/USER-OMP/dihedral_multi_harmonic_omp.h index 628ad2a6a0..73e34a49e5 100644 --- a/src/USER-OMP/dihedral_multi_harmonic_omp.h +++ b/src/USER-OMP/dihedral_multi_harmonic_omp.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class DihedralMultiHarmonicOMP : public DihedralMultiHarmonic, public ThrOMP { public: - DihedralMultiHarmonicOMP(class LAMMPS *lmp) : - DihedralMultiHarmonic(lmp), ThrOMP(lmp,THR_DIHEDRAL) {}; - + DihedralMultiHarmonicOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/dihedral_opls_omp.cpp b/src/USER-OMP/dihedral_opls_omp.cpp index 20684b3e00..5beee8a8cb 100644 --- a/src/USER-OMP/dihedral_opls_omp.cpp +++ b/src/USER-OMP/dihedral_opls_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -33,6 +34,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +DihedralOPLSOMP::DihedralOPLSOMP(class LAMMPS *lmp) + : DihedralOPLS(lmp), ThrOMP(lmp,THR_DIHEDRAL) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void DihedralOPLSOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/dihedral_opls_omp.h b/src/USER-OMP/dihedral_opls_omp.h index 44c76bb2ad..4092ab167e 100644 --- a/src/USER-OMP/dihedral_opls_omp.h +++ b/src/USER-OMP/dihedral_opls_omp.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class DihedralOPLSOMP : public DihedralOPLS, public ThrOMP { public: - DihedralOPLSOMP(class LAMMPS *lmp) : - DihedralOPLS(lmp), ThrOMP(lmp,THR_DIHEDRAL) {}; - + DihedralOPLSOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/dihedral_table_omp.cpp b/src/USER-OMP/dihedral_table_omp.cpp index 2b7b5ae6e0..77fb0f8999 100644 --- a/src/USER-OMP/dihedral_table_omp.cpp +++ b/src/USER-OMP/dihedral_table_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace DIHEDRAL_TABLE_NS; #define TOLERANCE 0.05 @@ -32,6 +33,14 @@ using namespace DIHEDRAL_TABLE_NS; /* ---------------------------------------------------------------------- */ +DihedralTableOMP::DihedralTableOMP(class LAMMPS *lmp) + : DihedralTable(lmp), ThrOMP(lmp,THR_DIHEDRAL) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void DihedralTableOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/dihedral_table_omp.h b/src/USER-OMP/dihedral_table_omp.h index 5133cee068..638834b104 100644 --- a/src/USER-OMP/dihedral_table_omp.h +++ b/src/USER-OMP/dihedral_table_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class DihedralTableOMP : public DihedralTable, public ThrOMP { public: - DihedralTableOMP(class LAMMPS *lmp) : - DihedralTable(lmp), ThrOMP(lmp,THR_DIHEDRAL) {}; - + DihedralTableOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/ewald_omp.cpp b/src/USER-OMP/ewald_omp.cpp index df27e8f49a..1461ea4ad6 100644 --- a/src/USER-OMP/ewald_omp.cpp +++ b/src/USER-OMP/ewald_omp.cpp @@ -26,6 +26,7 @@ #include "math_const.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -35,7 +36,9 @@ using namespace MathConst; EwaldOMP::EwaldOMP(LAMMPS *lmp, int narg, char **arg) : Ewald(lmp, narg, arg), ThrOMP(lmp, THR_KSPACE) -{ } +{ + suffix_flag |= Suffix::OMP; +} /* ---------------------------------------------------------------------- */ void EwaldOMP::allocate() diff --git a/src/USER-OMP/fix_omp.cpp b/src/USER-OMP/fix_omp.cpp index 760e8e6490..954bbaa9e4 100644 --- a/src/USER-OMP/fix_omp.cpp +++ b/src/USER-OMP/fix_omp.cpp @@ -35,6 +35,7 @@ #include "angle_hybrid.h" #include "dihedral_hybrid.h" #include "improper_hybrid.h" +#include "kspace.h" #include #include @@ -198,6 +199,7 @@ void FixOMP::init() last_omp_style = NULL; char *last_omp_name = NULL; char *last_hybrid_name = NULL; + char *last_force_name = NULL; // determine which is the last force style with OpenMP // support as this is the one that has to reduce the forces @@ -208,9 +210,8 @@ void FixOMP::init() if ( (strcmp(force->name ## _style,"hybrid") == 0) || \ (strcmp(force->name ## _style,"hybrid/overlay") == 0) ) \ check_hybrid=1; \ - int len = strlen(force->name ## _style); \ - char *suffix = force->name ## _style + len - 4; \ - if (strcmp(suffix,"/omp") == 0) { \ + if (force->name->suffix_flag & Suffix::OMP) { \ + last_force_name = #name; \ last_omp_name = force->name ## _style; \ last_omp_style = (void *) force->name; \ } \ @@ -220,24 +221,19 @@ void FixOMP::init() if (check_hybrid) { \ Class ## Hybrid *style = (Class ## Hybrid *) force->name; \ for (int i=0; i < style->nstyles; i++) { \ - int len = strlen(style->keywords[i]); \ - char *suffix = style->keywords[i] + len - 4; \ - if (strcmp(suffix,"/omp") == 0) { \ - last_omp_name = force->name ## _style; \ + if (style->styles[i]->suffix_flag & Suffix::OMP) { \ + last_force_name = #name; \ + last_omp_name = style->keywords[i]; \ last_omp_style = style->styles[i]; \ } \ } \ } CheckStyleForOMP(pair); + CheckHybridForOMP(pair,Pair); if (check_hybrid) { - PairHybrid *style = (PairHybrid *) force->pair; - for (int i=0; i < style->nstyles; i++) { - if (style->styles[i]->suffix_flag & Suffix::OMP) { - last_pair_hybrid = style->styles[i]; - last_omp_name = style->keywords[i]; - } - } + last_pair_hybrid = last_omp_style; + last_hybrid_name = last_omp_name; } CheckStyleForOMP(bond); @@ -256,8 +252,30 @@ void FixOMP::init() #undef CheckStyleForOMP #undef CheckHybridForOMP - set_neighbor_omp(); + + // diagnostic output + if (comm->me == 0) { + if (last_omp_style) { + if (last_pair_hybrid) { + if (screen) + fprintf(screen,"Hybrid pair style last /omp style %s\n", last_hybrid_name); + if (logfile) + fprintf(logfile,"Hybrid pair style last /omp style %s\n", last_hybrid_name); + } + if (screen) + fprintf(screen,"Last active /omp style is %s_style %s\n", + last_force_name, last_omp_name); + if (logfile) + fprintf(logfile,"Last active /omp style is %s_style %s\n", + last_force_name, last_omp_name); + } else { + if (screen) + fprintf(screen,"No /omp style for force computation currently active\n"); + if (logfile) + fprintf(screen,"No /omp style for force computation currently active\n"); + } + } } /* ---------------------------------------------------------------------- */ diff --git a/src/USER-OMP/improper_class2_omp.cpp b/src/USER-OMP/improper_class2_omp.cpp index f7879f48e6..b59cf9e4b1 100644 --- a/src/USER-OMP/improper_class2_omp.cpp +++ b/src/USER-OMP/improper_class2_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -32,6 +33,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +ImproperClass2OMP::ImproperClass2OMP(class LAMMPS *lmp) + : ImproperClass2(lmp), ThrOMP(lmp,THR_IMPROPER) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void ImproperClass2OMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/improper_class2_omp.h b/src/USER-OMP/improper_class2_omp.h index 130a680d06..8eca8cd8c1 100644 --- a/src/USER-OMP/improper_class2_omp.h +++ b/src/USER-OMP/improper_class2_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class ImproperClass2OMP : public ImproperClass2, public ThrOMP { public: - ImproperClass2OMP(class LAMMPS *lmp) : - ImproperClass2(lmp), ThrOMP(lmp,THR_IMPROPER) {}; - + ImproperClass2OMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/improper_cvff_omp.cpp b/src/USER-OMP/improper_cvff_omp.cpp index 1491f044ac..11387a76bc 100644 --- a/src/USER-OMP/improper_cvff_omp.cpp +++ b/src/USER-OMP/improper_cvff_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -32,6 +33,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +ImproperCvffOMP::ImproperCvffOMP(class LAMMPS *lmp) + : ImproperCvff(lmp), ThrOMP(lmp,THR_IMPROPER) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void ImproperCvffOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/improper_cvff_omp.h b/src/USER-OMP/improper_cvff_omp.h index f058b10eed..912da93b5d 100644 --- a/src/USER-OMP/improper_cvff_omp.h +++ b/src/USER-OMP/improper_cvff_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class ImproperCvffOMP : public ImproperCvff, public ThrOMP { public: - ImproperCvffOMP(class LAMMPS *lmp) : - ImproperCvff(lmp), ThrOMP(lmp,THR_IMPROPER) {}; - + ImproperCvffOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/improper_harmonic_omp.cpp b/src/USER-OMP/improper_harmonic_omp.cpp index 71f5cd6c73..748afdd2ca 100644 --- a/src/USER-OMP/improper_harmonic_omp.cpp +++ b/src/USER-OMP/improper_harmonic_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -32,6 +33,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +ImproperHarmonicOMP::ImproperHarmonicOMP(class LAMMPS *lmp) + : ImproperHarmonic(lmp), ThrOMP(lmp,THR_IMPROPER) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void ImproperHarmonicOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/improper_harmonic_omp.h b/src/USER-OMP/improper_harmonic_omp.h index a2a6a0a033..73cf6c21db 100644 --- a/src/USER-OMP/improper_harmonic_omp.h +++ b/src/USER-OMP/improper_harmonic_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class ImproperHarmonicOMP : public ImproperHarmonic, public ThrOMP { public: - ImproperHarmonicOMP(class LAMMPS *lmp) : - ImproperHarmonic(lmp), ThrOMP(lmp,THR_IMPROPER) {}; - + ImproperHarmonicOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/improper_umbrella_omp.cpp b/src/USER-OMP/improper_umbrella_omp.cpp index e943e0ba97..4b792b6218 100644 --- a/src/USER-OMP/improper_umbrella_omp.cpp +++ b/src/USER-OMP/improper_umbrella_omp.cpp @@ -25,6 +25,7 @@ #include "update.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; #define TOLERANCE 0.05 @@ -32,6 +33,14 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ +ImproperUmbrellaOMP::ImproperUmbrellaOMP(class LAMMPS *lmp) + : ImproperUmbrella(lmp), ThrOMP(lmp,THR_IMPROPER) +{ + suffix_flag |= Suffix::OMP; +} + +/* ---------------------------------------------------------------------- */ + void ImproperUmbrellaOMP::compute(int eflag, int vflag) { diff --git a/src/USER-OMP/improper_umbrella_omp.h b/src/USER-OMP/improper_umbrella_omp.h index 757089212b..39feb6d7b3 100644 --- a/src/USER-OMP/improper_umbrella_omp.h +++ b/src/USER-OMP/improper_umbrella_omp.h @@ -32,9 +32,7 @@ namespace LAMMPS_NS { class ImproperUmbrellaOMP : public ImproperUmbrella, public ThrOMP { public: - ImproperUmbrellaOMP(class LAMMPS *lmp) : - ImproperUmbrella(lmp), ThrOMP(lmp,THR_IMPROPER) {}; - + ImproperUmbrellaOMP(class LAMMPS *lmp); virtual void compute(int, int); private: diff --git a/src/USER-OMP/pppm_cg_omp.cpp b/src/USER-OMP/pppm_cg_omp.cpp index d89c7d4358..32526d2d2e 100644 --- a/src/USER-OMP/pppm_cg_omp.cpp +++ b/src/USER-OMP/pppm_cg_omp.cpp @@ -26,6 +26,7 @@ #include #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -43,6 +44,7 @@ using namespace MathConst; PPPMCGOMP::PPPMCGOMP(LAMMPS *lmp, int narg, char **arg) : PPPMCG(lmp, narg, arg), ThrOMP(lmp, THR_KSPACE) { + suffix_flag |= Suffix::OMP; } /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/pppm_omp.cpp b/src/USER-OMP/pppm_omp.cpp index 9575545e46..706e3e4270 100644 --- a/src/USER-OMP/pppm_omp.cpp +++ b/src/USER-OMP/pppm_omp.cpp @@ -26,6 +26,7 @@ #include #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -44,6 +45,7 @@ using namespace MathConst; PPPMOMP::PPPMOMP(LAMMPS *lmp, int narg, char **arg) : PPPM(lmp, narg, arg), ThrOMP(lmp, THR_KSPACE) { + suffix_flag |= Suffix::OMP; } /* ---------------------------------------------------------------------- diff --git a/src/USER-OMP/pppm_tip4p_omp.cpp b/src/USER-OMP/pppm_tip4p_omp.cpp index efee0a0d99..219b1b2030 100644 --- a/src/USER-OMP/pppm_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_tip4p_omp.cpp @@ -26,6 +26,7 @@ #include #include +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -42,7 +43,10 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ PPPMTIP4POMP::PPPMTIP4POMP(LAMMPS *lmp, int narg, char **arg) : - PPPMOMP(lmp, narg, arg) {} + PPPMOMP(lmp, narg, arg) +{ + suffix_flag |= Suffix::OMP; +} /* ---------------------------------------------------------------------- */ diff --git a/src/USER-OMP/thr_omp.cpp b/src/USER-OMP/thr_omp.cpp index a5e0fdde79..f916c519d2 100644 --- a/src/USER-OMP/thr_omp.cpp +++ b/src/USER-OMP/thr_omp.cpp @@ -42,8 +42,8 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -ThrOMP::ThrOMP(LAMMPS *ptr, int style) : lmp(ptr), fix(NULL), - thr_style(style), thr_error(0) +ThrOMP::ThrOMP(LAMMPS *ptr, int style) + : lmp(ptr), fix(NULL), thr_style(style), thr_error(0) { // register fix omp with this class int ifix = lmp->modify->find_fix("package_omp"); @@ -284,15 +284,24 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag, #pragma omp critical #endif { - bond->energy += thr->eng_bond; - for (int i=0; i < 6; ++i) - bond->virial[i] += thr->virial_bond[i]; - } - if (eflag & 2) { - data_reduce_thr(&(bond->eatom[0]), nall, nthreads, 1, tid); - } - if (vflag & 4) { - data_reduce_thr(&(bond->vatom[0][0]), nall, nthreads, 6, tid); + if (eflag & 1) { + bond->energy += thr->eng_bond; + thr->eng_bond = 0.0; + } + + if (vflag & 3) { + for (int i=0; i < 6; ++i) { + bond->virial[i] += thr->virial_bond[i]; + thr->virial_bond[i] = 0.0; + } + } + + if (eflag & 2) { + data_reduce_thr(&(bond->eatom[0]), nall, nthreads, 1, tid); + } + if (vflag & 4) { + data_reduce_thr(&(bond->vatom[0][0]), nall, nthreads, 6, tid); + } } } break; @@ -305,15 +314,24 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag, #pragma omp critical #endif { - angle->energy += thr->eng_angle; - for (int i=0; i < 6; ++i) - angle->virial[i] += thr->virial_angle[i]; - } - if (eflag & 2) { - data_reduce_thr(&(angle->eatom[0]), nall, nthreads, 1, tid); - } - if (vflag & 4) { - data_reduce_thr(&(angle->vatom[0][0]), nall, nthreads, 6, tid); + if (eflag & 1) { + angle->energy += thr->eng_angle; + thr->eng_angle = 0.0; + } + + if (vflag & 3) { + for (int i=0; i < 6; ++i) { + angle->virial[i] += thr->virial_angle[i]; + thr->virial_angle[i] = 0.0; + } + } + + if (eflag & 2) { + data_reduce_thr(&(angle->eatom[0]), nall, nthreads, 1, tid); + } + if (vflag & 4) { + data_reduce_thr(&(angle->vatom[0][0]), nall, nthreads, 6, tid); + } } } break; @@ -326,15 +344,24 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag, #pragma omp critical #endif { - dihedral->energy += thr->eng_dihed; - for (int i=0; i < 6; ++i) - dihedral->virial[i] += thr->virial_dihed[i]; - } - if (eflag & 2) { - data_reduce_thr(&(dihedral->eatom[0]), nall, nthreads, 1, tid); - } - if (vflag & 4) { - data_reduce_thr(&(dihedral->vatom[0][0]), nall, nthreads, 6, tid); + if (eflag & 1) { + dihedral->energy += thr->eng_dihed; + thr->eng_dihed = 0.0; + } + + if (vflag & 3) { + for (int i=0; i < 6; ++i) { + dihedral->virial[i] += thr->virial_dihed[i]; + thr->virial_dihed[i] = 0.0; + } + } + + if (eflag & 2) { + data_reduce_thr(&(dihedral->eatom[0]), nall, nthreads, 1, tid); + } + if (vflag & 4) { + data_reduce_thr(&(dihedral->vatom[0][0]), nall, nthreads, 6, tid); + } } } break; @@ -352,22 +379,28 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag, dihedral->energy += thr->eng_dihed; pair->eng_vdwl += thr->eng_vdwl; pair->eng_coul += thr->eng_coul; + thr->eng_dihed = 0.0; + thr->eng_vdwl = 0.0; + thr->eng_coul = 0.0; } if (vflag & 3) { for (int i=0; i < 6; ++i) { dihedral->virial[i] += thr->virial_dihed[i]; pair->virial[i] += thr->virial_pair[i]; + thr->virial_dihed[i] = 0.0; + thr->virial_pair[i] = 0.0; } } - } - if (eflag & 2) { - data_reduce_thr(&(dihedral->eatom[0]), nall, nthreads, 1, tid); - data_reduce_thr(&(pair->eatom[0]), nall, nthreads, 1, tid); - } - if (vflag & 4) { - data_reduce_thr(&(dihedral->vatom[0][0]), nall, nthreads, 6, tid); - data_reduce_thr(&(pair->vatom[0][0]), nall, nthreads, 6, tid); + + if (eflag & 2) { + data_reduce_thr(&(dihedral->eatom[0]), nall, nthreads, 1, tid); + data_reduce_thr(&(pair->eatom[0]), nall, nthreads, 1, tid); + } + if (vflag & 4) { + data_reduce_thr(&(dihedral->vatom[0][0]), nall, nthreads, 6, tid); + data_reduce_thr(&(pair->vatom[0][0]), nall, nthreads, 6, tid); + } } } break; @@ -380,15 +413,24 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag, #pragma omp critical #endif { - improper->energy += thr->eng_imprp; - for (int i=0; i < 6; ++i) - improper->virial[i] += thr->virial_imprp[i]; - } - if (eflag & 2) { - data_reduce_thr(&(improper->eatom[0]), nall, nthreads, 1, tid); - } - if (vflag & 4) { - data_reduce_thr(&(improper->vatom[0][0]), nall, nthreads, 6, tid); + if (eflag & 1) { + improper->energy += thr->eng_imprp; + thr->eng_imprp = 0.0; + } + + if (vflag & 3) { + for (int i=0; i < 6; ++i) { + improper->virial[i] += thr->virial_imprp[i]; + thr->virial_imprp[i] = 0.0; + } + } + + if (eflag & 2) { + data_reduce_thr(&(improper->eatom[0]), nall, nthreads, 1, tid); + } + if (vflag & 4) { + data_reduce_thr(&(improper->vatom[0][0]), nall, nthreads, 6, tid); + } } } break; diff --git a/src/angle.cpp b/src/angle.cpp index 709ace1826..526bfa646e 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -19,6 +19,7 @@ #include "math_const.h" #include "memory.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -30,6 +31,7 @@ Angle::Angle(LAMMPS *lmp) : Pointers(lmp) energy = 0.0; allocated = 0; + suffix_flag = Suffix::NONE; maxeatom = maxvatom = 0; eatom = NULL; diff --git a/src/angle.h b/src/angle.h index 948ee071c3..a94846b0e8 100644 --- a/src/angle.h +++ b/src/angle.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -21,6 +21,7 @@ namespace LAMMPS_NS { class Angle : protected Pointers { friend class ThrOMP; + friend class FixOMP; public: int allocated; int *setflag; @@ -42,6 +43,8 @@ class Angle : protected Pointers { virtual double memory_usage(); protected: + int suffix_flag; // suffix compatibility flag + int evflag; int eflag_either,eflag_global,eflag_atom; int vflag_either,vflag_global,vflag_atom; diff --git a/src/bond.cpp b/src/bond.cpp index aa168ff45c..14138ab38d 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -18,6 +18,7 @@ #include "force.h" #include "memory.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -31,6 +32,7 @@ Bond::Bond(LAMMPS *lmp) : Pointers(lmp) energy = 0.0; allocated = 0; + suffix_flag = Suffix::NONE; maxeatom = maxvatom = 0; eatom = NULL; diff --git a/src/bond.h b/src/bond.h index 8c72d19e8e..7c055d4174 100644 --- a/src/bond.h +++ b/src/bond.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -21,6 +21,7 @@ namespace LAMMPS_NS { class Bond : protected Pointers { friend class ThrOMP; + friend class FixOMP; public: int allocated; int *setflag; @@ -42,6 +43,8 @@ class Bond : protected Pointers { virtual double memory_usage(); protected: + int suffix_flag; // suffix compatibility flag + int evflag; int eflag_either,eflag_global,eflag_atom; int vflag_either,vflag_global,vflag_atom; diff --git a/src/dihedral.cpp b/src/dihedral.cpp index f1a62cba16..80a029b94c 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -19,6 +19,7 @@ #include "pair.h" #include "memory.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/dihedral.h b/src/dihedral.h index 31f8902cbf..0abb3afeba 100644 --- a/src/dihedral.h +++ b/src/dihedral.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -20,8 +20,8 @@ namespace LAMMPS_NS { class Dihedral : protected Pointers { - friend class ThrOMP; - + friend class ThrOMP; + friend class FixOMP; public: int allocated; int *setflag; @@ -41,6 +41,8 @@ class Dihedral : protected Pointers { virtual double memory_usage(); protected: + int suffix_flag; // suffix compatibility flag + int evflag; int eflag_either,eflag_global,eflag_atom; int vflag_either,vflag_global,vflag_atom; diff --git a/src/improper.cpp b/src/improper.cpp index 9a1f47e5ce..47ae5c69ed 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -18,6 +18,7 @@ #include "force.h" #include "memory.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -28,6 +29,7 @@ Improper::Improper(LAMMPS *lmp) : Pointers(lmp) energy = 0.0; allocated = 0; + suffix_flag = Suffix::NONE; maxeatom = maxvatom = 0; eatom = NULL; diff --git a/src/improper.h b/src/improper.h index 30322a4834..56f38e7641 100644 --- a/src/improper.h +++ b/src/improper.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -21,6 +21,7 @@ namespace LAMMPS_NS { class Improper : protected Pointers { friend class ThrOMP; + friend class FixOMP; public: int allocated; int *setflag; @@ -39,6 +40,8 @@ class Improper : protected Pointers { virtual double memory_usage(); protected: + int suffix_flag; // suffix compatibility flag + int evflag; int eflag_either,eflag_global,eflag_atom; int vflag_either,vflag_global,vflag_atom; diff --git a/src/kspace.cpp b/src/kspace.cpp index 6ea1499b2f..9913b44809 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -19,6 +19,7 @@ #include "force.h" #include "memory.h" #include "error.h" +#include "suffix.h" using namespace LAMMPS_NS; @@ -32,6 +33,7 @@ KSpace::KSpace(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) gewaldflag = 0; slabflag = 0; slab_volfactor = 1; + suffix_flag = Suffix::NONE; accuracy_absolute = -1.0; two_charge_force = force->qqr2e * diff --git a/src/kspace.h b/src/kspace.h index 3549a35cfa..30605b4193 100644 --- a/src/kspace.h +++ b/src/kspace.h @@ -1,4 +1,4 @@ -/* ---------------------------------------------------------------------- +/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov @@ -20,6 +20,7 @@ namespace LAMMPS_NS { class KSpace : protected Pointers { friend class ThrOMP; + friend class FixOMP; public: double energy; // accumulated energy double virial[6]; // accumlated virial @@ -43,6 +44,7 @@ class KSpace : protected Pointers { int gridflag,gewaldflag; int order; int slabflag; + int suffix_flag; // suffix compatibility flag double scale; double slab_volfactor;