diff --git a/src/USER-MISC/pair_tersoff_table.cpp b/src/USER-MISC/pair_tersoff_table.cpp index 0ac7cf06c4..343ff189c7 100644 --- a/src/USER-MISC/pair_tersoff_table.cpp +++ b/src/USER-MISC/pair_tersoff_table.cpp @@ -63,6 +63,10 @@ PairTersoffTable::PairTersoffTable(LAMMPS *lmp) : Pair(lmp) nparams = maxparam = 0; params = NULL; elem2param = NULL; + allocated = 0; + + preGtetaFunction = preGtetaFunctionDerived = NULL; + preCutoffFunction = preCutoffFunctionDerived = NULL; } /* ---------------------------------------------------------------------- @@ -99,7 +103,6 @@ void PairTersoffTable::compute(int eflag, int vflag) int interpolIDX; - double r_ik_x, r_ik_y, r_ik_z; double directorCos_ij_x, directorCos_ij_y, directorCos_ij_z, directorCos_ik_x, directorCos_ik_y, directorCos_ik_z; double invR_ij, invR_ik, cosTeta; double repulsivePotential, attractivePotential; @@ -543,8 +546,6 @@ void PairTersoffTable::allocatePreLoops(void) void PairTersoffTable::deallocateGrids() { - int i,j; - memory->destroy(exponential); memory->destroy(gtetaFunction); memory->destroy(gtetaFunctionDerived); diff --git a/src/USER-MISC/pair_tersoff_table.h b/src/USER-MISC/pair_tersoff_table.h index 4423932a34..681a22181f 100644 --- a/src/USER-MISC/pair_tersoff_table.h +++ b/src/USER-MISC/pair_tersoff_table.h @@ -74,8 +74,8 @@ class PairTersoffTable : public Pair { double **preGtetaFunction, **preGtetaFunctionDerived; double *preCutoffFunction, *preCutoffFunctionDerived; - void allocatePreLoops(void); - void deallocatePreLoops(void); + virtual void allocatePreLoops(void); + virtual void deallocatePreLoops(void); // grids