git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11938 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define DELTA 16384
|
||||
#define DELTA_BONUS 8192
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -84,7 +85,7 @@ void AtomVec::init()
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
grow nmax
|
||||
grow nmax so it is a multiple of DELTA
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVec::grow_nmax()
|
||||
@ -93,6 +94,17 @@ void AtomVec::grow_nmax()
|
||||
nmax += DELTA;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
grow nmax_bonus so it is a multiple of DELTA_BONUS
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int AtomVec::grow_nmax_bonus(int nmax_bonus)
|
||||
{
|
||||
nmax_bonus = nmax_bonus/DELTA_BONUS * DELTA_BONUS;
|
||||
nmax_bonus += DELTA_BONUS;
|
||||
return nmax_bonus;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
unpack one line from Velocities section of data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
@ -140,6 +140,7 @@ class AtomVec : protected Pointers {
|
||||
};
|
||||
|
||||
void grow_nmax();
|
||||
int grow_nmax_bonus(int);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -28,8 +28,6 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define DELTA_BONUS 8192
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
AtomVecBody::AtomVecBody(LAMMPS *lmp) : AtomVec(lmp)
|
||||
@ -159,7 +157,7 @@ void AtomVecBody::grow_reset()
|
||||
|
||||
void AtomVecBody::grow_bonus()
|
||||
{
|
||||
nmax_bonus += DELTA_BONUS;
|
||||
nmax_bonus = grow_nmax_bonus(nmax_bonus);
|
||||
if (nmax_bonus < 0 || nmax_bonus > MAXSMALLINT)
|
||||
error->one(FLERR,"Per-processor system is too big");
|
||||
|
||||
|
||||
@ -31,8 +31,6 @@
|
||||
using namespace LAMMPS_NS;
|
||||
using namespace MathConst;
|
||||
|
||||
#define DELTA_BONUS 8192
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
AtomVecEllipsoid::AtomVecEllipsoid(LAMMPS *lmp) : AtomVec(lmp)
|
||||
@ -114,7 +112,7 @@ void AtomVecEllipsoid::grow_reset()
|
||||
|
||||
void AtomVecEllipsoid::grow_bonus()
|
||||
{
|
||||
nmax_bonus += DELTA_BONUS;
|
||||
nmax_bonus = grow_nmax_bonus(nmax_bonus);
|
||||
if (nmax_bonus < 0 || nmax_bonus > MAXSMALLINT)
|
||||
error->one(FLERR,"Per-processor system is too big");
|
||||
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define DELTA_BONUS 10000
|
||||
#define EPSILON 0.001
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -123,7 +122,7 @@ void AtomVecLine::grow_reset()
|
||||
|
||||
void AtomVecLine::grow_bonus()
|
||||
{
|
||||
nmax_bonus += DELTA_BONUS;
|
||||
nmax_bonus = grow_nmax_bonus(nmax_bonus);
|
||||
if (nmax_bonus < 0 || nmax_bonus > MAXSMALLINT)
|
||||
error->one(FLERR,"Per-processor system is too big");
|
||||
|
||||
|
||||
@ -27,7 +27,6 @@
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define DELTA_BONUS 10000
|
||||
#define EPSILON 0.001
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -124,7 +123,7 @@ void AtomVecTri::grow_reset()
|
||||
|
||||
void AtomVecTri::grow_bonus()
|
||||
{
|
||||
nmax_bonus += DELTA_BONUS;
|
||||
nmax_bonus = grow_nmax_bonus(nmax_bonus);
|
||||
if (nmax_bonus < 0 || nmax_bonus > MAXSMALLINT)
|
||||
error->one(FLERR,"Per-processor system is too big");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user