diff --git a/src/atom.cpp b/src/atom.cpp index 471061cd5e..11f26af6c3 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -249,115 +249,6 @@ Atom::~Atom() delete [] peratom[i].name; memory->sfree(peratom); - // -------------------------------------------------------------------- - // 2nd customization section: customize by adding new per-atom variables - // delete atom arrays - - memory->destroy(tag); - memory->destroy(type); - memory->destroy(mask); - memory->destroy(image); - memory->destroy(x); - memory->destroy(v); - memory->destroy(f); - - memory->destroy(molecule); - memory->destroy(molindex); - memory->destroy(molatom); - - memory->destroy(q); - memory->destroy(mu); - memory->destroy(omega); - memory->destroy(angmom); - memory->destroy(torque); - memory->destroy(radius); - memory->destroy(rmass); - memory->destroy(ellipsoid); - memory->destroy(line); - memory->destroy(tri); - memory->destroy(body); - - memory->destroy(sp); - memory->destroy(fm); - memory->destroy(fm_long); - - memory->destroy(vfrac); - memory->destroy(s0); - memory->destroy(x0); - - memory->destroy(spin); - memory->destroy(eradius); - memory->destroy(ervel); - memory->destroy(erforce); - memory->destroy(ervelforce); - memory->destroy(cs); - memory->destroy(csforce); - memory->destroy(vforce); - memory->destroy(etag); - - memory->destroy(rho); - memory->destroy(drho); - memory->destroy(esph); - memory->destroy(desph); - memory->destroy(cv); - memory->destroy(vest); - - // USER-MESONT package - memory->destroy(length); - memory->destroy(buckling); - memory->destroy(bond_nt); - - memory->destroy(contact_radius); - memory->destroy(smd_data_9); - memory->destroy(smd_stress); - memory->destroy(eff_plastic_strain); - memory->destroy(eff_plastic_strain_rate); - memory->destroy(damage); - - memory->destroy(dpdTheta); - memory->destroy(uCond); - memory->destroy(uMech); - memory->destroy(uChem); - memory->destroy(uCG); - memory->destroy(uCGnew); - memory->destroy(duChem); - - memory->destroy(cc); - memory->destroy(cc_flux); - memory->destroy(edpd_temp); - memory->destroy(edpd_flux); - memory->destroy(edpd_cv); - - memory->destroy(nspecial); - memory->destroy(special); - - memory->destroy(num_bond); - memory->destroy(bond_type); - memory->destroy(bond_atom); - - memory->destroy(num_angle); - memory->destroy(angle_type); - memory->destroy(angle_atom1); - memory->destroy(angle_atom2); - memory->destroy(angle_atom3); - - memory->destroy(num_dihedral); - memory->destroy(dihedral_type); - memory->destroy(dihedral_atom1); - memory->destroy(dihedral_atom2); - memory->destroy(dihedral_atom3); - memory->destroy(dihedral_atom4); - - memory->destroy(num_improper); - memory->destroy(improper_type); - memory->destroy(improper_atom1); - memory->destroy(improper_atom2); - memory->destroy(improper_atom3); - memory->destroy(improper_atom4); - - // end of customization section - // -------------------------------------------------------------------- - // delete custom atom arrays for (int i = 0; i < nivector; i++) { diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index 85fdbbbbfe..6a294d3ccf 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -96,6 +96,14 @@ AtomVec::~AtomVec() for (int i = 0; i < nargcopy; i++) delete [] argcopy[i]; delete [] argcopy; + memory->destroy(atom->tag); + memory->destroy(atom->type); + memory->destroy(atom->mask); + memory->destroy(atom->image); + memory->destroy(atom->x); + memory->destroy(atom->v); + memory->destroy(atom->f); + for (int i = 0; i < ngrow; i++) { pdata = mgrow.pdata[i]; datatype = mgrow.datatype[i];