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

This commit is contained in:
sjplimp
2011-01-06 23:23:37 +00:00
parent 3cd5ef56fc
commit 01db59bea3
23 changed files with 83 additions and 54 deletions

View File

@ -348,7 +348,7 @@ void *lammps_extract_variable(void *ptr, char *name, char *group)
int lammps_get_natoms(void *ptr)
{
LAMMPS *lmp = (LAMMPS *) ptr;
if (lmp->atom->natoms > MAXINT32) return 0;
if (lmp->atom->natoms > MAXSMALLINT) return 0;
int natoms = static_cast<int> (lmp->atom->natoms);
return natoms;
}
@ -362,7 +362,7 @@ void lammps_get_coords(void *ptr, double *coords)
// error if tags are not defined or not consecutive
if (lmp->atom->tag_enable == 0 || lmp->atom->tag_consecutive() == 0) return;
if (lmp->atom->natoms > MAXINT32) return;
if (lmp->atom->natoms > MAXSMALLINT) return;
int natoms = static_cast<int> (lmp->atom->natoms);
double *copy = new double[3*natoms];
@ -394,7 +394,7 @@ void lammps_put_coords(void *ptr, double *coords)
// error if no map defined by LAMMPS
if (lmp->atom->map_style == 0) return;
if (lmp->atom->natoms > MAXINT32) return;
if (lmp->atom->natoms > MAXSMALLINT) return;
int natoms = static_cast<int> (lmp->atom->natoms);
double **x = lmp->atom->x;