git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@622 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -108,59 +108,9 @@ void AtomVecAngle::grow(int n)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecAngle::reset_ptrs()
|
||||
void AtomVecAngle::reset_special()
|
||||
{
|
||||
tag = atom->tag;
|
||||
type = atom->type;
|
||||
mask = atom->mask;
|
||||
image = atom->image;
|
||||
x = atom->x;
|
||||
v = atom->v;
|
||||
f = atom->f;
|
||||
|
||||
molecule = atom->molecule;
|
||||
nspecial = atom->nspecial;
|
||||
special = atom->special;
|
||||
|
||||
num_bond = atom->num_bond;
|
||||
bond_type = atom->bond_type;
|
||||
bond_atom = atom->bond_atom;
|
||||
|
||||
num_angle = atom->num_angle;
|
||||
angle_type = atom->angle_type;
|
||||
angle_atom1 = atom->angle_atom1;
|
||||
angle_atom2 = atom->angle_atom2;
|
||||
angle_atom3 = atom->angle_atom3;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
zero auxiliary data for owned atom I
|
||||
data in copy(), not including tag,type,mask,image,x,v
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecAngle::zero_owned(int i)
|
||||
{
|
||||
molecule[i] = 0;
|
||||
num_bond[i] = 0;
|
||||
num_angle[i] = 0;
|
||||
nspecial[i][0] = 0;
|
||||
nspecial[i][1] = 0;
|
||||
nspecial[i][2] = 0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
zero auxiliary data for n ghost atoms
|
||||
data in border(), not including x,tag,type,mask
|
||||
grow() is here since zero_ghost called first in hybrid::unpack_border()
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecAngle::zero_ghost(int n, int first)
|
||||
{
|
||||
int last = first + n;
|
||||
for (int i = first; i < last; i++) {
|
||||
if (i == nmax) atom->avec->grow(0);
|
||||
molecule[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -492,17 +442,6 @@ int AtomVecAngle::size_restart()
|
||||
return n;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
size of restart data for atom I
|
||||
do not include extra data stored by fixes, included by caller
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecAngle::size_restart_one(int i)
|
||||
{
|
||||
int n = 14 + 2*num_bond[i] + 4*num_angle[i];
|
||||
return n;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
pack atom I's data for restart file including extra quantities
|
||||
xyz must be 1st 3 values, so that read_restart can test on them
|
||||
@ -609,7 +548,7 @@ int AtomVecAngle::unpack_restart(double *buf)
|
||||
set other values to defaults
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecAngle::create_atom(int itype, double *coord, int ihybrid)
|
||||
void AtomVecAngle::create_atom(int itype, double *coord)
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
if (nlocal == nmax) grow(0);
|
||||
@ -637,8 +576,7 @@ void AtomVecAngle::create_atom(int itype, double *coord, int ihybrid)
|
||||
initialize other atom quantities
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecAngle::data_atom(double *coord, int imagetmp, char **values,
|
||||
int ihybrid)
|
||||
void AtomVecAngle::data_atom(double *coord, int imagetmp, char **values)
|
||||
{
|
||||
int nlocal = atom->nlocal;
|
||||
if (nlocal == nmax) grow(0);
|
||||
@ -669,6 +607,24 @@ void AtomVecAngle::data_atom(double *coord, int imagetmp, char **values,
|
||||
atom->nlocal++;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
unpack hybrid quantities from one line in Atoms section of data file
|
||||
initialize other atom quantities for this sub-style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecAngle::data_atom_hybrid(int nlocal, char **values)
|
||||
{
|
||||
molecule[nlocal] = atoi(values[0]);
|
||||
|
||||
v[nlocal][0] = 0.0;
|
||||
v[nlocal][1] = 0.0;
|
||||
v[nlocal][2] = 0.0;
|
||||
num_bond[nlocal] = 0;
|
||||
num_angle[nlocal] = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
return # of bytes of allocated memory
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user