diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index a604782993..5f16176e49 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -437,7 +437,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) : // register with Atom class history_one = nullptr; - grow_arrays(atom->nmax); + FixWallGran::grow_arrays(atom->nmax); atom->add_callback(Atom::GROW); atom->add_callback(Atom::RESTART); @@ -1555,8 +1555,7 @@ double FixWallGran::memory_usage() void FixWallGran::grow_arrays(int nmax) { - if (use_history) memory->grow(history_one,nmax,size_history, - "fix_wall_gran:history_one"); + if (use_history) memory->grow(history_one,nmax,size_history,"fix_wall_gran:history_one"); if (peratom_flag) { memory->grow(array_atom,nmax,size_peratom_cols,"fix_wall_gran:array_atom"); } diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 0a92bac543..37afe9632c 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -62,7 +62,7 @@ FixWallGranRegion::FixWallGranRegion(LAMMPS *lmp, int narg, char **arg) : ncontact = nullptr; walls = nullptr; history_many = nullptr; - grow_arrays(atom->nmax); + FixWallGranRegion::grow_arrays(atom->nmax); // initialize shear history as if particle is not touching region @@ -355,8 +355,7 @@ void FixWallGranRegion::grow_arrays(int nmax) if (use_history) { memory->grow(ncontact,nmax,"fix_wall_gran:ncontact"); memory->grow(walls,nmax,tmax,"fix_wall_gran:walls"); - memory->grow(history_many,nmax,tmax,size_history, - "fix_wall_gran:history_many"); + memory->grow(history_many,nmax,tmax,size_history,"fix_wall_gran:history_many"); } if (peratom_flag) memory->grow(array_atom,nmax,size_peratom_cols,"fix_wall_gran:array_atom"); diff --git a/src/MANYBODY/pair_tersoff_table.cpp b/src/MANYBODY/pair_tersoff_table.cpp index e64e5bce02..94c4d88b09 100644 --- a/src/MANYBODY/pair_tersoff_table.cpp +++ b/src/MANYBODY/pair_tersoff_table.cpp @@ -91,7 +91,7 @@ PairTersoffTable::~PairTersoffTable() memory->destroy(cutsq); } deallocateGrids(); - deallocatePreLoops(); + PairTersoffTable::deallocatePreLoops(); } /* ---------------------------------------------------------------------- */ diff --git a/src/OPENMP/pair_tersoff_table_omp.cpp b/src/OPENMP/pair_tersoff_table_omp.cpp index 47ee2feca8..5367a3d043 100644 --- a/src/OPENMP/pair_tersoff_table_omp.cpp +++ b/src/OPENMP/pair_tersoff_table_omp.cpp @@ -53,7 +53,7 @@ PairTersoffTableOMP::PairTersoffTableOMP(LAMMPS *lmp) : PairTersoffTableOMP::~PairTersoffTableOMP() { if (allocated) { - deallocatePreLoops(); + PairTersoffTableOMP::deallocatePreLoops(); } } diff --git a/src/REAXFF/fix_qeq_reaxff.cpp b/src/REAXFF/fix_qeq_reaxff.cpp index fd197a156a..8c3b7df190 100644 --- a/src/REAXFF/fix_qeq_reaxff.cpp +++ b/src/REAXFF/fix_qeq_reaxff.cpp @@ -165,7 +165,7 @@ FixQEqReaxFF::~FixQEqReaxFF() memory->destroy(s_hist); memory->destroy(t_hist); - deallocate_storage(); + FixQEqReaxFF::deallocate_storage(); deallocate_matrix(); memory->destroy(shld); diff --git a/src/compute_dipole.cpp b/src/compute_dipole.cpp index 053f11e6f9..b67c3df3ce 100644 --- a/src/compute_dipole.cpp +++ b/src/compute_dipole.cpp @@ -29,7 +29,7 @@ enum { MASSCENTER, GEOMCENTER }; ComputeDipole::ComputeDipole(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) { - if (narg != 3) error->all(FLERR, "Illegal compute com command"); + if ((narg < 3) || (narg > 4)) error->all(FLERR, "Illegal compute dipole command"); scalar_flag = 1; vector_flag = 1; @@ -39,11 +39,8 @@ ComputeDipole::ComputeDipole(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, n vector = new double[size_vector]; vector[0] = vector[1] = vector[2] = 0.0; - usecenter = MASSCENTER; - if ((narg != 3) && (narg != 4)) error->all(FLERR, "Illegal compute dipole command"); - if (narg == 4) { if (utils::strmatch(arg[3], "^geom")) usecenter = GEOMCENTER;