convert more style_creators to use local static functions
This commit is contained in:
@ -47,6 +47,15 @@ using namespace LAMMPS_NS;
|
||||
#define DELTAREGION 4
|
||||
#define BONDSTRETCH 1.1
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
one instance per region style in style_region.h
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template <typename T> static Region *region_creator(LAMMPS *lmp, int narg, char ** arg)
|
||||
{
|
||||
return new T(lmp, narg, arg);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
default is periodic
|
||||
------------------------------------------------------------------------- */
|
||||
@ -1797,16 +1806,6 @@ void Domain::add_region(int narg, char **arg)
|
||||
nregion++;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
one instance per region style in style_region.h
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
template <typename T>
|
||||
Region *Domain::region_creator(LAMMPS *lmp, int narg, char ** arg)
|
||||
{
|
||||
return new T(lmp, narg, arg);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
delete a region
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user