diff --git a/src/DIELECTRIC/msm_dielectric.cpp b/src/DIELECTRIC/msm_dielectric.cpp index fd09e40acc..46bb9c0415 100644 --- a/src/DIELECTRIC/msm_dielectric.cpp +++ b/src/DIELECTRIC/msm_dielectric.cpp @@ -113,9 +113,11 @@ void MSMDielectric::compute(int eflag, int vflag) if (atom->nmax > nmax) { memory->destroy(part2grid); memory->destroy(efield); + memory->destroy(phi); nmax = atom->nmax; memory->create(part2grid,nmax,3,"msm:part2grid"); memory->create(efield,nmax,3,"msm:efield"); + memory->create(phi,nmax,"msm:phi"); } // find grid points for all my particles