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

This commit is contained in:
sjplimp 2013-01-14 15:56:34 +00:00
parent 1087ef306e
commit 4c71fc2311
4 changed files with 20 additions and 15 deletions

View File

@ -511,12 +511,6 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) :
MINUSPI = -MY_PI;
TWOPI = 2.0*MY_PI;
// atom style pointers to particles that store extra info
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
avec_line = (AtomVecLine *) atom->style_match("line");
avec_tri = (AtomVecTri *) atom->style_match("tri");
// print statistics
int nsum = 0;
@ -599,6 +593,12 @@ void FixRigid::init()
triclinic = domain->triclinic;
// atom style pointers to particles that store extra info
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
avec_line = (AtomVecLine *) atom->style_match("line");
avec_tri = (AtomVecTri *) atom->style_match("tri");
// warn if more than one rigid fix
int count = 0;

View File

@ -344,6 +344,15 @@ ComputePropertyAtom::~ComputePropertyAtom()
/* ---------------------------------------------------------------------- */
void ComputePropertyAtom::init()
{
avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
avec_line = (AtomVecLine *) atom->style_match("line");
avec_tri = (AtomVecTri *) atom->style_match("tri");
}
/* ---------------------------------------------------------------------- */
void ComputePropertyAtom::compute_peratom()
{
invoked_peratom = update->ntimestep;

View File

@ -28,7 +28,7 @@ class ComputePropertyAtom : public Compute {
public:
ComputePropertyAtom(class LAMMPS *, int, char **);
~ComputePropertyAtom();
void init() {}
void init();
void compute_peratom();
double memory_usage();

View File

@ -131,14 +131,6 @@ FixLangevin::FixLangevin(LAMMPS *lmp, int narg, char **arg) :
} else error->all(FLERR,"Illegal fix langevin command");
}
// error check
if (aflag) {
avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
if (!avec)
error->all(FLERR,"Fix langevin angmom requires atom style ellipsoid");
}
// set temperature = NULL, user can override via fix_modify if wants bias
id_temp = NULL;
@ -213,6 +205,10 @@ void FixLangevin::init()
}
if (aflag) {
avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
if (!avec)
error->all(FLERR,"Fix langevin angmom requires atom style ellipsoid");
int *ellipsoid = atom->ellipsoid;
int *mask = atom->mask;
int nlocal = atom->nlocal;