make calls to virtual functions from constructors explicit
This commit is contained in:
@ -437,7 +437,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
// register with Atom class
|
// register with Atom class
|
||||||
|
|
||||||
history_one = nullptr;
|
history_one = nullptr;
|
||||||
grow_arrays(atom->nmax);
|
FixWallGran::grow_arrays(atom->nmax);
|
||||||
atom->add_callback(Atom::GROW);
|
atom->add_callback(Atom::GROW);
|
||||||
atom->add_callback(Atom::RESTART);
|
atom->add_callback(Atom::RESTART);
|
||||||
|
|
||||||
@ -1555,8 +1555,7 @@ double FixWallGran::memory_usage()
|
|||||||
|
|
||||||
void FixWallGran::grow_arrays(int nmax)
|
void FixWallGran::grow_arrays(int nmax)
|
||||||
{
|
{
|
||||||
if (use_history) memory->grow(history_one,nmax,size_history,
|
if (use_history) memory->grow(history_one,nmax,size_history,"fix_wall_gran:history_one");
|
||||||
"fix_wall_gran:history_one");
|
|
||||||
if (peratom_flag) {
|
if (peratom_flag) {
|
||||||
memory->grow(array_atom,nmax,size_peratom_cols,"fix_wall_gran:array_atom");
|
memory->grow(array_atom,nmax,size_peratom_cols,"fix_wall_gran:array_atom");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,7 @@ FixWallGranRegion::FixWallGranRegion(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
ncontact = nullptr;
|
ncontact = nullptr;
|
||||||
walls = nullptr;
|
walls = nullptr;
|
||||||
history_many = nullptr;
|
history_many = nullptr;
|
||||||
grow_arrays(atom->nmax);
|
FixWallGranRegion::grow_arrays(atom->nmax);
|
||||||
|
|
||||||
// initialize shear history as if particle is not touching region
|
// initialize shear history as if particle is not touching region
|
||||||
|
|
||||||
@ -355,8 +355,7 @@ void FixWallGranRegion::grow_arrays(int nmax)
|
|||||||
if (use_history) {
|
if (use_history) {
|
||||||
memory->grow(ncontact,nmax,"fix_wall_gran:ncontact");
|
memory->grow(ncontact,nmax,"fix_wall_gran:ncontact");
|
||||||
memory->grow(walls,nmax,tmax,"fix_wall_gran:walls");
|
memory->grow(walls,nmax,tmax,"fix_wall_gran:walls");
|
||||||
memory->grow(history_many,nmax,tmax,size_history,
|
memory->grow(history_many,nmax,tmax,size_history,"fix_wall_gran:history_many");
|
||||||
"fix_wall_gran:history_many");
|
|
||||||
}
|
}
|
||||||
if (peratom_flag)
|
if (peratom_flag)
|
||||||
memory->grow(array_atom,nmax,size_peratom_cols,"fix_wall_gran:array_atom");
|
memory->grow(array_atom,nmax,size_peratom_cols,"fix_wall_gran:array_atom");
|
||||||
|
|||||||
@ -91,7 +91,7 @@ PairTersoffTable::~PairTersoffTable()
|
|||||||
memory->destroy(cutsq);
|
memory->destroy(cutsq);
|
||||||
}
|
}
|
||||||
deallocateGrids();
|
deallocateGrids();
|
||||||
deallocatePreLoops();
|
PairTersoffTable::deallocatePreLoops();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -53,7 +53,7 @@ PairTersoffTableOMP::PairTersoffTableOMP(LAMMPS *lmp) :
|
|||||||
PairTersoffTableOMP::~PairTersoffTableOMP()
|
PairTersoffTableOMP::~PairTersoffTableOMP()
|
||||||
{
|
{
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
deallocatePreLoops();
|
PairTersoffTableOMP::deallocatePreLoops();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -165,7 +165,7 @@ FixQEqReaxFF::~FixQEqReaxFF()
|
|||||||
memory->destroy(s_hist);
|
memory->destroy(s_hist);
|
||||||
memory->destroy(t_hist);
|
memory->destroy(t_hist);
|
||||||
|
|
||||||
deallocate_storage();
|
FixQEqReaxFF::deallocate_storage();
|
||||||
deallocate_matrix();
|
deallocate_matrix();
|
||||||
|
|
||||||
memory->destroy(shld);
|
memory->destroy(shld);
|
||||||
|
|||||||
@ -29,7 +29,7 @@ enum { MASSCENTER, GEOMCENTER };
|
|||||||
|
|
||||||
ComputeDipole::ComputeDipole(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg)
|
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;
|
scalar_flag = 1;
|
||||||
vector_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 = new double[size_vector];
|
||||||
vector[0] = vector[1] = vector[2] = 0.0;
|
vector[0] = vector[1] = vector[2] = 0.0;
|
||||||
|
|
||||||
usecenter = MASSCENTER;
|
usecenter = MASSCENTER;
|
||||||
|
|
||||||
if ((narg != 3) && (narg != 4)) error->all(FLERR, "Illegal compute dipole command");
|
|
||||||
|
|
||||||
if (narg == 4) {
|
if (narg == 4) {
|
||||||
if (utils::strmatch(arg[3], "^geom"))
|
if (utils::strmatch(arg[3], "^geom"))
|
||||||
usecenter = GEOMCENTER;
|
usecenter = GEOMCENTER;
|
||||||
|
|||||||
Reference in New Issue
Block a user