git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12076 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -1002,6 +1002,34 @@ void AtomVecHybrid::write_vel(FILE *fp, int n, double **buf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
assign an index to named atom property and return index
|
||||||
|
returned value encodes which sub-style and index returned by sub-style
|
||||||
|
return -1 if name is unknown to any sub-styles
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
int AtomVecHybrid::property_atom(char *name)
|
||||||
|
{
|
||||||
|
for (int k = 0; k < nstyles; k++) {
|
||||||
|
int index = styles[k]->property_atom(name);
|
||||||
|
if (index >= 0) return index*nstyles + k;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
pack per-atom data into buf for ComputePropertyAtom
|
||||||
|
index maps to data specific to this atom style
|
||||||
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void AtomVecHybrid::pack_property_atom(int multiindex, double *buf,
|
||||||
|
int nvalues, int groupbit)
|
||||||
|
{
|
||||||
|
int k = multiindex % nstyles;
|
||||||
|
int index = multiindex/nstyles;
|
||||||
|
styles[k]->pack_property_atom(index,buf,nvalues,groupbit);
|
||||||
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
allstyles = list of all atom styles in this LAMMPS executable
|
allstyles = list of all atom styles in this LAMMPS executable
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -63,6 +63,8 @@ class AtomVecHybrid : public AtomVec {
|
|||||||
void write_data(FILE *, int, double **);
|
void write_data(FILE *, int, double **);
|
||||||
void pack_vel(double **);
|
void pack_vel(double **);
|
||||||
void write_vel(FILE *, int, double **);
|
void write_vel(FILE *, int, double **);
|
||||||
|
int property_atom(char *);
|
||||||
|
void pack_property_atom(int, double *, int, int);
|
||||||
bigint memory_usage();
|
bigint memory_usage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user