convert more style_creators to use local static functions

This commit is contained in:
Axel Kohlmeyer
2022-02-11 18:29:52 -05:00
parent 5ab9b46b67
commit 6a0e93a18a
10 changed files with 110 additions and 152 deletions

View File

@ -54,6 +54,15 @@ using namespace MathConst;
#define DELTA_PERATOM 64
#define EPSILON 1.0e-6
/* ----------------------------------------------------------------------
one instance per AtomVec style in style_atom.h
------------------------------------------------------------------------- */
template <typename T> static AtomVec *avec_creator(LAMMPS *lmp)
{
return new T(lmp);
}
/* ---------------------------------------------------------------------- */
/** \class LAMMPS_NS::Atom
@ -743,16 +752,6 @@ AtomVec *Atom::new_avec(const std::string &style, int trysuffix, int &sflag)
return nullptr;
}
/* ----------------------------------------------------------------------
one instance per AtomVec style in style_atom.h
------------------------------------------------------------------------- */
template <typename T>
AtomVec *Atom::avec_creator(LAMMPS *lmp)
{
return new T(lmp);
}
/* ---------------------------------------------------------------------- */
void Atom::init()