new library functions

This commit is contained in:
Steve Plimpton
2016-10-27 09:34:04 -06:00
parent efaa8feab5
commit d9891abdf4
44 changed files with 1341 additions and 211 deletions

View File

@ -908,27 +908,9 @@ void ReadDump::process_atoms(int n)
}
}
// invoke set_arrays() for fixes/computes/variables
// that need initialization of attributes of new atoms
// same as in CreateAtoms
// don't use modify->create_attributes() since would be inefficient
// for large number of atoms
nlocal = atom->nlocal;
for (int m = 0; m < modify->nfix; m++) {
Fix *fix = modify->fix[m];
if (fix->create_attribute)
for (i = nlocal_previous; i < nlocal; i++)
fix->set_arrays(i);
}
for (int m = 0; m < modify->ncompute; m++) {
Compute *compute = modify->compute[m];
if (compute->create_attribute)
for (i = nlocal_previous; i < nlocal; i++)
compute->set_arrays(i);
}
for (int i = nlocal_previous; i < nlocal; i++)
input->variable->set_arrays(i);
// init per-atom fix/compute/variable values for created atoms
atom->data_fix_compute_variable(nlocal_previous,atom->nlocal);
}
/* ----------------------------------------------------------------------