code issues

This commit is contained in:
iafoss
2020-03-25 20:18:07 -04:00
parent c793db66d2
commit fa4ef70829
56 changed files with 1275 additions and 2252 deletions

View File

@ -375,7 +375,12 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Compute property/atom floating point "
"vector does not exist");
pack_choice[i] = &ComputePropertyAtom::pack_dname;
}
else if (strcmp(arg[iarg],"buckling") == 0) {
if (!atom->mesont_flag)
error->all(FLERR,"Compute property/atom for "
"atom property that isn't allocated");
pack_choice[i] = &ComputePropertyAtom::pack_buckling;
// check if atom style recognizes keyword
} else {
@ -1774,6 +1779,21 @@ void ComputePropertyAtom::pack_corner3z(int n)
/* ---------------------------------------------------------------------- */
void ComputePropertyAtom::pack_buckling(int n)
{
int *buckling = atom->buckling;
int *mask = atom->mask;
int nlocal = atom->nlocal;
for (int i = 0; i < nlocal; i++) {
if (mask[i] & groupbit) buf[n] = static_cast<double>(buckling[i]);
else buf[n] = 0.0;
n += nvalues;
}
}
/* ---------------------------------------------------------------------- */
void ComputePropertyAtom::pack_nbonds(int n)
{
int *num_bond = atom->num_bond;