Merge pull request #875 from akohlmey/collected-small-fixes

Collected small changes and bug fixes for the next patch release
This commit is contained in:
Steve Plimpton
2018-05-03 11:28:00 -06:00
committed by GitHub
31 changed files with 190 additions and 46 deletions

View File

@ -480,10 +480,13 @@ void *lammps_extract_atom(void *ptr, char *name)
compute's internal data structure for the entity
caller should cast it to (double *) for a scalar or vector
caller should cast it to (double **) for an array
for per-atom or local data, returns a pointer to the
for per-atom or local vector/array data, returns a pointer to the
compute's internal data structure for the entity
caller should cast it to (double *) for a vector
caller should cast it to (double **) for an array
for local data, accessing scalar data for the compute (type = 0),
returns a pointer that should be cast to (int *) which points to
an int with the number of local rows, i.e. the length of the local array.
returns a void pointer to the compute's internal data structure
for the entity which the caller can cast to the proper data type
returns a NULL if id is not recognized or style/type not supported
@ -541,6 +544,11 @@ void *lammps_extract_compute(void *ptr, char *id, int style, int type)
if (style == 2) {
if (!compute->local_flag) return NULL;
if (type == 0) {
if (compute->invoked_local != lmp->update->ntimestep)
compute->compute_local();
return (void *) &compute->size_local_rows;
}
if (type == 1) {
if (compute->invoked_local != lmp->update->ntimestep)
compute->compute_local();