avoid segfault in msm/dielectric
This commit is contained in:
@ -113,9 +113,11 @@ void MSMDielectric::compute(int eflag, int vflag)
|
|||||||
if (atom->nmax > nmax) {
|
if (atom->nmax > nmax) {
|
||||||
memory->destroy(part2grid);
|
memory->destroy(part2grid);
|
||||||
memory->destroy(efield);
|
memory->destroy(efield);
|
||||||
|
memory->destroy(phi);
|
||||||
nmax = atom->nmax;
|
nmax = atom->nmax;
|
||||||
memory->create(part2grid,nmax,3,"msm:part2grid");
|
memory->create(part2grid,nmax,3,"msm:part2grid");
|
||||||
memory->create(efield,nmax,3,"msm:efield");
|
memory->create(efield,nmax,3,"msm:efield");
|
||||||
|
memory->create(phi,nmax,"msm:phi");
|
||||||
}
|
}
|
||||||
|
|
||||||
// find grid points for all my particles
|
// find grid points for all my particles
|
||||||
|
|||||||
Reference in New Issue
Block a user