git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12996 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2015-01-28 15:55:56 +00:00
committed by Pierre de Buyl
parent fc1b0ca9ed
commit 2d25f29063
23 changed files with 149 additions and 54 deletions

View File

@ -31,10 +31,13 @@
#include "update.h"
#include "modify.h"
#include "fix.h"
#include "compute.h"
#include "domain.h"
#include "comm.h"
#include "force.h"
#include "irregular.h"
#include "input.h"
#include "variable.h"
#include "error.h"
#include "memory.h"
@ -902,16 +905,27 @@ void ReadDump::process_atoms(int n)
}
}
// invoke set_arrays() for fixes that need initialization of new atoms
// 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 (m = 0; m < modify->nfix; m++) {
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);
}
/* ----------------------------------------------------------------------