make class name consistent with file name and add backward compatibility

This commit is contained in:
Axel Kohlmeyer
2022-03-07 14:09:01 -05:00
parent 1f3a3bb80b
commit 5206d81742
4 changed files with 17 additions and 15 deletions

View File

@ -256,12 +256,13 @@ print("Total number of style index entries:", total_index)
skip_fix = ('python', 'NEIGH_HISTORY/omp','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species')
skip_pair = ('meam/c','lj/sf','reax/c')
skip_compute = ('pressure/cylinder')
counter = 0
counter += check_style('Commands_all.rst', doc_dir, ":doc:`(.+) <.+>`",command,'Command',suffix=True)
counter += check_style('Commands_compute.rst', doc_dir, ":doc:`(.+) <compute.+>`",compute,'Compute',suffix=True)
counter += check_style('compute.rst', doc_dir, ":doc:`(.+) <compute.+>` -",compute,'Compute',suffix=False)
counter += check_style('Commands_compute.rst', doc_dir, ":doc:`(.+) <compute.+>`",compute,'Compute',skip=skip_compute,suffix=True)
counter += check_style('compute.rst', doc_dir, ":doc:`(.+) <compute.+>` -",compute,'Compute',skip=skip_compute,suffix=False)
counter += check_style('Commands_fix.rst', doc_dir, ":doc:`(.+) <fix.+>`",fix,'Fix',skip=skip_fix,suffix=True)
counter += check_style('fix.rst', doc_dir, ":doc:`(.+) <fix.+>` -",fix,'Fix',skip=skip_fix,suffix=False)
counter += check_style('Commands_pair.rst', doc_dir, ":doc:`(.+) <pair.+>`",pair,'Pair',skip=skip_pair,suffix=True)
@ -281,7 +282,7 @@ if counter:
counter = 0
counter += check_style_index("compute", compute, index["compute"])
counter += check_style_index("compute", compute, index["compute"], skip=['pressure/cylinder'])
counter += check_style_index("fix", fix, index["fix"], skip=['python','acks2/reax','qeq/reax','reax/c/bonds','reax/c/species'])
counter += check_style_index("angle_style", angle, index["angle_style"])
counter += check_style_index("bond_style", bond, index["bond_style"])

View File

@ -359,7 +359,7 @@ void ComputeStressCartesian::compute_array()
}
void ComputeStressCartesian::compute_pressure_1d(double fpair, double xi, double xj, double delx,
double dely, double delz)
double dely, double delz)
{
int bin_s, bin_e, bin_step, bin, bin_limit;
double xa, xb, l_sum;
@ -457,7 +457,7 @@ void ComputeStressCartesian::compute_pressure_1d(double fpair, double xi, double
}
void ComputeStressCartesian::compute_pressure_2d(double fpair, double xi, double yi, double xj,
double yj, double delx, double dely, double delz)
double yj, double delx, double dely, double delz)
{
int bin1, bin2, next_bin1, next_bin2;
double la = 0.0, lb = 0.0, l_sum = 0.0;

View File

@ -59,7 +59,7 @@ static const char cite_compute_stress_cylinder[] =
cylindrical geometry, according to the formulation of Addington et al. (2018)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
ComputeStressCyl::ComputeStressCyl(LAMMPS *lmp, int narg, char **arg) :
ComputeStressCylinder::ComputeStressCylinder(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg), Pvr_temp(nullptr), Pvr_all(nullptr), Pvz_temp(nullptr),
Pvz_all(nullptr), Pvphi_temp(nullptr), Pvphi_all(nullptr), R(nullptr), Rinv(nullptr),
R2(nullptr), PrAinv(nullptr), PzAinv(nullptr), R2kin(nullptr), density_temp(nullptr),
@ -147,7 +147,7 @@ ComputeStressCyl::ComputeStressCyl(LAMMPS *lmp, int narg, char **arg) :
/* ---------------------------------------------------------------------- */
ComputeStressCyl::~ComputeStressCyl()
ComputeStressCylinder::~ComputeStressCylinder()
{
memory->destroy(array);
if (kinetic_flag == 1) {
@ -181,7 +181,7 @@ ComputeStressCyl::~ComputeStressCyl()
/* ---------------------------------------------------------------------- */
void ComputeStressCyl::init()
void ComputeStressCylinder::init()
{
if (force->pair == nullptr)
error->all(FLERR, "No pair style is defined for compute stress/cylinder");
@ -224,7 +224,7 @@ void ComputeStressCyl::init()
/* ---------------------------------------------------------------------- */
void ComputeStressCyl::init_list(int /* id */, NeighList *ptr)
void ComputeStressCylinder::init_list(int /* id */, NeighList *ptr)
{
list = ptr;
}
@ -238,7 +238,7 @@ void ComputeStressCyl::init_list(int /* id */, NeighList *ptr)
if flag is set, compute requested info about pair
------------------------------------------------------------------------- */
void ComputeStressCyl::compute_array()
void ComputeStressCylinder::compute_array()
{
invoked_array = update->ntimestep;
@ -556,7 +556,7 @@ void ComputeStressCyl::compute_array()
/* ----------------------------------------------------------------------
memory usage of data
------------------------------------------------------------------------- */
double ComputeStressCyl::memory_usage()
double ComputeStressCylinder::memory_usage()
{
double bytes =
(3.0 * (double) nphi + 16.0 * (double) nbins + (5.0 + 3.0 * kinetic_flag) * (double) nbins) *

View File

@ -13,7 +13,8 @@
#ifdef COMPUTE_CLASS
// clang-format off
ComputeStyle(stress/cylinder,ComputeStressCyl);
ComputeStyle(stress/cylinder,ComputeStressCylinderinder);
ComputeStyle(pressure/cylinder,ComputeStressCylinderinder);
// clang-format on
#else
@ -24,10 +25,10 @@ ComputeStyle(stress/cylinder,ComputeStressCyl);
namespace LAMMPS_NS {
class ComputeStressCyl : public Compute {
class ComputeStressCylinder : public Compute {
public:
ComputeStressCyl(class LAMMPS *, int, char **);
~ComputeStressCyl() override;
ComputeStressCylinder(class LAMMPS *, int, char **);
~ComputeStressCylinder() override;
void init() override;
void init_list(int, class NeighList *) override;
void compute_array() override;