git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13262 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -26,6 +26,7 @@ action () {
|
|||||||
|
|
||||||
touch ../accelerator_kokkos.h
|
touch ../accelerator_kokkos.h
|
||||||
touch ../memory.h
|
touch ../memory.h
|
||||||
|
touch ../special.cpp
|
||||||
|
|
||||||
# list of files with optional dependcies
|
# list of files with optional dependcies
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
/* ----------------------------------------------------------------------
|
</* ----------------------------------------------------------------------
|
||||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||||
http://lammps.sandia.gov, Sandia National Laboratories
|
http://lammps.sandia.gov, Sandia National Laboratories
|
||||||
Steve Plimpton, sjplimp@sandia.gov
|
Steve Plimpton, sjplimp@sandia.gov
|
||||||
@ -69,57 +69,57 @@ PairEAM::PairEAM(LAMMPS *lmp) : Pair(lmp)
|
|||||||
|
|
||||||
PairEAM::~PairEAM()
|
PairEAM::~PairEAM()
|
||||||
{
|
{
|
||||||
if (!copymode) {
|
if (copymode) return;
|
||||||
memory->destroy(rho);
|
|
||||||
memory->destroy(fp);
|
|
||||||
|
|
||||||
if (allocated) {
|
memory->destroy(rho);
|
||||||
memory->destroy(setflag);
|
memory->destroy(fp);
|
||||||
memory->destroy(cutsq);
|
|
||||||
delete [] map;
|
|
||||||
delete [] type2frho;
|
|
||||||
memory->destroy(type2rhor);
|
|
||||||
memory->destroy(type2z2r);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (funcfl) {
|
if (allocated) {
|
||||||
for (int i = 0; i < nfuncfl; i++) {
|
memory->destroy(setflag);
|
||||||
delete [] funcfl[i].file;
|
memory->destroy(cutsq);
|
||||||
memory->destroy(funcfl[i].frho);
|
delete [] map;
|
||||||
memory->destroy(funcfl[i].rhor);
|
delete [] type2frho;
|
||||||
memory->destroy(funcfl[i].zr);
|
memory->destroy(type2rhor);
|
||||||
}
|
memory->destroy(type2z2r);
|
||||||
memory->sfree(funcfl);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (setfl) {
|
|
||||||
for (int i = 0; i < setfl->nelements; i++) delete [] setfl->elements[i];
|
|
||||||
delete [] setfl->elements;
|
|
||||||
delete [] setfl->mass;
|
|
||||||
memory->destroy(setfl->frho);
|
|
||||||
memory->destroy(setfl->rhor);
|
|
||||||
memory->destroy(setfl->z2r);
|
|
||||||
delete setfl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fs) {
|
|
||||||
for (int i = 0; i < fs->nelements; i++) delete [] fs->elements[i];
|
|
||||||
delete [] fs->elements;
|
|
||||||
delete [] fs->mass;
|
|
||||||
memory->destroy(fs->frho);
|
|
||||||
memory->destroy(fs->rhor);
|
|
||||||
memory->destroy(fs->z2r);
|
|
||||||
delete fs;
|
|
||||||
}
|
|
||||||
|
|
||||||
memory->destroy(frho);
|
|
||||||
memory->destroy(rhor);
|
|
||||||
memory->destroy(z2r);
|
|
||||||
|
|
||||||
memory->destroy(frho_spline);
|
|
||||||
memory->destroy(rhor_spline);
|
|
||||||
memory->destroy(z2r_spline);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (funcfl) {
|
||||||
|
for (int i = 0; i < nfuncfl; i++) {
|
||||||
|
delete [] funcfl[i].file;
|
||||||
|
memory->destroy(funcfl[i].frho);
|
||||||
|
memory->destroy(funcfl[i].rhor);
|
||||||
|
memory->destroy(funcfl[i].zr);
|
||||||
|
}
|
||||||
|
memory->sfree(funcfl);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (setfl) {
|
||||||
|
for (int i = 0; i < setfl->nelements; i++) delete [] setfl->elements[i];
|
||||||
|
delete [] setfl->elements;
|
||||||
|
delete [] setfl->mass;
|
||||||
|
memory->destroy(setfl->frho);
|
||||||
|
memory->destroy(setfl->rhor);
|
||||||
|
memory->destroy(setfl->z2r);
|
||||||
|
delete setfl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fs) {
|
||||||
|
for (int i = 0; i < fs->nelements; i++) delete [] fs->elements[i];
|
||||||
|
delete [] fs->elements;
|
||||||
|
delete [] fs->mass;
|
||||||
|
memory->destroy(fs->frho);
|
||||||
|
memory->destroy(fs->rhor);
|
||||||
|
memory->destroy(fs->z2r);
|
||||||
|
delete fs;
|
||||||
|
}
|
||||||
|
|
||||||
|
memory->destroy(frho);
|
||||||
|
memory->destroy(rhor);
|
||||||
|
memory->destroy(z2r);
|
||||||
|
|
||||||
|
memory->destroy(frho_spline);
|
||||||
|
memory->destroy(rhor_spline);
|
||||||
|
memory->destroy(z2r_spline);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
</* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||||
http://lammps.sandia.gov, Sandia National Laboratories
|
http://lammps.sandia.gov, Sandia National Laboratories
|
||||||
Steve Plimpton, sjplimp@sandia.gov
|
Steve Plimpton, sjplimp@sandia.gov
|
||||||
|
|||||||
Reference in New Issue
Block a user