git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13411 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -475,12 +475,13 @@ void ComputeChunkAtom::init()
|
|||||||
error->all(FLERR,"Compute chunk/atom ids once but nchunk is not once");
|
error->all(FLERR,"Compute chunk/atom ids once but nchunk is not once");
|
||||||
|
|
||||||
// create/destroy fix STORE for persistent chunk IDs as needed
|
// create/destroy fix STORE for persistent chunk IDs as needed
|
||||||
|
// need to do this if idsflag = ONCE or locks will be used by other commands
|
||||||
// need to wait until init() so that fix ave/chunk command(s) are in place
|
// need to wait until init() so that fix ave/chunk command(s) are in place
|
||||||
// they increment lockcount if they lock this compute
|
// they increment lockcount if they lock this compute
|
||||||
// fixstore ID = compute-ID + COMPUTE_STORE, fix group = compute group
|
// fixstore ID = compute-ID + COMPUTE_STORE, fix group = compute group
|
||||||
// fixstore initializes all values to 0.0
|
// fixstore initializes all values to 0.0
|
||||||
|
|
||||||
if (lockcount && !fixstore) {
|
if ((idsflag == ONCE || lockcount) && !fixstore) {
|
||||||
int n = strlen(id) + strlen("_COMPUTE_STORE") + 1;
|
int n = strlen(id) + strlen("_COMPUTE_STORE") + 1;
|
||||||
id_fix = new char[n];
|
id_fix = new char[n];
|
||||||
strcpy(id_fix,id);
|
strcpy(id_fix,id);
|
||||||
@ -497,7 +498,7 @@ void ComputeChunkAtom::init()
|
|||||||
delete [] newarg;
|
delete [] newarg;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lockcount && fixstore) {
|
if ((idsflag != ONCE && !lockcount) && fixstore) {
|
||||||
delete fixstore;
|
delete fixstore;
|
||||||
fixstore = NULL;
|
fixstore = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ ComputeGyrationChunk::ComputeGyrationChunk(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
// optional args
|
// optional args
|
||||||
|
|
||||||
tensor = 0;
|
tensor = 0;
|
||||||
int iarg = 3;
|
int iarg = 4;
|
||||||
while (iarg < narg) {
|
while (iarg < narg) {
|
||||||
if (strcmp(arg[iarg],"tensor") == 0) {
|
if (strcmp(arg[iarg],"tensor") == 0) {
|
||||||
tensor = 1;
|
tensor = 1;
|
||||||
|
|||||||
@ -730,6 +730,7 @@ void FixAveChunk::end_of_step()
|
|||||||
// check last so other options can take precedence
|
// check last so other options can take precedence
|
||||||
|
|
||||||
double mvv2e = force->mvv2e;
|
double mvv2e = force->mvv2e;
|
||||||
|
double boltz = force->boltz;
|
||||||
|
|
||||||
if (normflag == ALL) {
|
if (normflag == ALL) {
|
||||||
for (m = 0; m < nchunk; m++) {
|
for (m = 0; m < nchunk; m++) {
|
||||||
@ -744,7 +745,7 @@ void FixAveChunk::end_of_step()
|
|||||||
for (j = 0; j < nvalues; j++) {
|
for (j = 0; j < nvalues; j++) {
|
||||||
if (which[j] == TEMPERATURE)
|
if (which[j] == TEMPERATURE)
|
||||||
values_many[m][j] += mvv2e*values_one[m][j] /
|
values_many[m][j] += mvv2e*values_one[m][j] /
|
||||||
(cdof + adof*count_many[m]);
|
((cdof + adof*count_many[m]) * boltz);
|
||||||
else if (which[j] == DENSITY_NUMBER || which[j] == DENSITY_MASS ||
|
else if (which[j] == DENSITY_NUMBER || which[j] == DENSITY_MASS ||
|
||||||
scaleflag == NOSCALE)
|
scaleflag == NOSCALE)
|
||||||
values_many[m][j] += values_one[m][j];
|
values_many[m][j] += values_one[m][j];
|
||||||
@ -793,7 +794,7 @@ void FixAveChunk::end_of_step()
|
|||||||
if (count_sum[m] > 0.0)
|
if (count_sum[m] > 0.0)
|
||||||
for (j = 0; j < nvalues; j++) {
|
for (j = 0; j < nvalues; j++) {
|
||||||
if (which[j] == TEMPERATURE)
|
if (which[j] == TEMPERATURE)
|
||||||
values_sum[m][j] *= mvv2e / (cdof + adof*count_sum[m]);
|
values_sum[m][j] *= mvv2e / ((cdof + adof*count_sum[m]) * boltz);
|
||||||
else if (which[j] == DENSITY_MASS)
|
else if (which[j] == DENSITY_MASS)
|
||||||
values_sum[m][j] *= mv2d/repeat;
|
values_sum[m][j] *= mv2d/repeat;
|
||||||
else if (which[j] == DENSITY_NUMBER || scaleflag == NOSCALE)
|
else if (which[j] == DENSITY_NUMBER || scaleflag == NOSCALE)
|
||||||
|
|||||||
Reference in New Issue
Block a user