CNT package
The tubular potential model (TPM) force field for Carbon Nanotubes (CNTs) package.
This commit is contained in:
16
src/atom.cpp
16
src/atom.cpp
@ -108,6 +108,12 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp)
|
||||
cc = cc_flux = NULL;
|
||||
edpd_temp = edpd_flux = edpd_cv = NULL;
|
||||
|
||||
// USER-CNT package
|
||||
|
||||
length = NULL;
|
||||
buckling = NULL;
|
||||
bond_cnt = NULL;
|
||||
|
||||
// USER-SMD
|
||||
|
||||
contact_radius = NULL;
|
||||
@ -367,6 +373,11 @@ Atom::~Atom()
|
||||
|
||||
for (int i = 0; i < nmolecule; i++) delete molecules[i];
|
||||
memory->sfree(molecules);
|
||||
|
||||
// USER-CNT package
|
||||
memory->destroy(length);
|
||||
memory->destroy(buckling);
|
||||
memory->destroy(bond_cnt);
|
||||
|
||||
// delete per-type arrays
|
||||
|
||||
@ -2284,6 +2295,11 @@ void *Atom::extract(char *name)
|
||||
|
||||
if (strcmp(name,"dpdTheta") == 0) return (void *) dpdTheta;
|
||||
if (strcmp(name,"edpd_temp") == 0) return (void *) edpd_temp;
|
||||
|
||||
// USER-CNT package
|
||||
if (strcmp(name,"length") == 0) return (void *) length;
|
||||
if (strcmp(name,"buckling") == 0) return (void *) buckling;
|
||||
if (strcmp(name,"bond_cnt") == 0) return (void *) bond_cnt;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user