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
parent 3eb045688b
commit 86daf16069
23 changed files with 149 additions and 54 deletions

View File

@ -23,6 +23,8 @@
#include "group.h"
#include "update.h"
#include "domain.h"
#include "input.h"
#include "variable.h"
#include "memory.h"
#include "error.h"
@ -436,6 +438,24 @@ void Modify::post_run()
for (int i = 0; i < nfix; i++) fix[i]->post_run();
}
/* ----------------------------------------------------------------------
create_attribute call
invoked when an atom is added to system during a run
necessary so that fixes and computes that store per-atom
state can initialize that state for the new atom N
computes can store per-atom state via a fix like fix STORE
compute has the create_attribute flag, not fix STORE
------------------------------------------------------------------------- */
void Modify::create_attribute(int n)
{
for (int i = 0; i < nfix; i++)
if (fix[i]->create_attribute) fix[i]->set_arrays(n);
for (int i = 0; i < ncompute; i++)
if (compute[i]->create_attribute) compute[i]->set_arrays(n);
input->variable->set_arrays(n);
}
/* ----------------------------------------------------------------------
setup rRESPA pre_force call, only for relevant fixes
------------------------------------------------------------------------- */