replace leading tabs
This commit is contained in:
@ -937,16 +937,16 @@ int DumpCustom::count()
|
||||
nstride = 1;
|
||||
|
||||
} else if (thresh_array[ithresh] == DNAME) {
|
||||
int iwhich,tmp;
|
||||
int iwhich,tmp;
|
||||
i = nfield + ithresh;
|
||||
iwhich = atom->find_custom(id_custom[field2index[i]],tmp);
|
||||
iwhich = atom->find_custom(id_custom[field2index[i]],tmp);
|
||||
ptr = atom->dvector[iwhich];
|
||||
nstride = 1;
|
||||
|
||||
} else if (thresh_array[ithresh] == INAME) {
|
||||
int iwhich,tmp;
|
||||
int iwhich,tmp;
|
||||
i = nfield + ithresh;
|
||||
iwhich = atom->find_custom(id_custom[field2index[i]],tmp);
|
||||
iwhich = atom->find_custom(id_custom[field2index[i]],tmp);
|
||||
|
||||
int *ivector = atom->ivector[iwhich];
|
||||
for (i = 0; i < nlocal; i++)
|
||||
@ -960,87 +960,87 @@ int DumpCustom::count()
|
||||
// copy ptr attribute into thresh_fix if this is first comparison
|
||||
|
||||
if (thresh_last[ithresh] < 0) {
|
||||
lastflag = 0;
|
||||
value = thresh_value[ithresh];
|
||||
lastflag = 0;
|
||||
value = thresh_value[ithresh];
|
||||
} else {
|
||||
lastflag = 1;
|
||||
int ilast = thresh_last[ithresh];
|
||||
values = thresh_fix[ilast]->vstore;
|
||||
ptrhold = ptr;
|
||||
if (thresh_first[ilast]) {
|
||||
thresh_first[ilast] = 0;
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride) values[i] = *ptr;
|
||||
ptr = ptrhold;
|
||||
}
|
||||
lastflag = 1;
|
||||
int ilast = thresh_last[ithresh];
|
||||
values = thresh_fix[ilast]->vstore;
|
||||
ptrhold = ptr;
|
||||
if (thresh_first[ilast]) {
|
||||
thresh_first[ilast] = 0;
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride) values[i] = *ptr;
|
||||
ptr = ptrhold;
|
||||
}
|
||||
}
|
||||
|
||||
if (thresh_op[ithresh] == LT) {
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr >= values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr >= value) choose[i] = 0;
|
||||
}
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr >= values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr >= value) choose[i] = 0;
|
||||
}
|
||||
} else if (thresh_op[ithresh] == LE) {
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr > values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr > value) choose[i] = 0;
|
||||
}
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr > values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr > value) choose[i] = 0;
|
||||
}
|
||||
} else if (thresh_op[ithresh] == GT) {
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr <= values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr <= value) choose[i] = 0;
|
||||
}
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr <= values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr <= value) choose[i] = 0;
|
||||
}
|
||||
} else if (thresh_op[ithresh] == GE) {
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr < values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr < value) choose[i] = 0;
|
||||
}
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr < values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr < value) choose[i] = 0;
|
||||
}
|
||||
} else if (thresh_op[ithresh] == EQ) {
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr != values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr != value) choose[i] = 0;
|
||||
}
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr != values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr != value) choose[i] = 0;
|
||||
}
|
||||
} else if (thresh_op[ithresh] == NEQ) {
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr == values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr == value) choose[i] = 0;
|
||||
}
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr == values[i]) choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && *ptr == value) choose[i] = 0;
|
||||
}
|
||||
} else if (thresh_op[ithresh] == XOR) {
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && (*ptr == 0.0 && values[i] == 0.0) ||
|
||||
(*ptr != 0.0 && values[i] != 0.0))
|
||||
choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && (*ptr == 0.0 && value == 0.0) ||
|
||||
(*ptr != 0.0 && value != 0.0))
|
||||
choose[i] = 0;
|
||||
}
|
||||
if (lastflag) {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && (*ptr == 0.0 && values[i] == 0.0) ||
|
||||
(*ptr != 0.0 && values[i] != 0.0))
|
||||
choose[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride)
|
||||
if (choose[i] && (*ptr == 0.0 && value == 0.0) ||
|
||||
(*ptr != 0.0 && value != 0.0))
|
||||
choose[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// update values stored in threshfix
|
||||
|
||||
if (lastflag) {
|
||||
ptr = ptrhold;
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride) values[i] = *ptr;
|
||||
ptr = ptrhold;
|
||||
for (i = 0; i < nlocal; i++, ptr += nstride) values[i] = *ptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1684,12 +1684,12 @@ int DumpCustom::modify_param(int narg, char **arg)
|
||||
thresh_op = NULL;
|
||||
thresh_value = NULL;
|
||||
thresh_last = NULL;
|
||||
for (int i = 0; i < nthreshlast; i++) {
|
||||
modify->delete_fix(thresh_fixID[i]);
|
||||
delete [] thresh_fixID[i];
|
||||
}
|
||||
thresh_fix = NULL;
|
||||
thresh_fixID = NULL;
|
||||
for (int i = 0; i < nthreshlast; i++) {
|
||||
modify->delete_fix(thresh_fixID[i]);
|
||||
delete [] thresh_fixID[i];
|
||||
}
|
||||
thresh_fix = NULL;
|
||||
thresh_fixID = NULL;
|
||||
thresh_first = NULL;
|
||||
}
|
||||
nthresh = nthreshlast = 0;
|
||||
@ -1950,11 +1950,11 @@ int DumpCustom::modify_param(int narg, char **arg)
|
||||
thresh_last[nthresh] = -1;
|
||||
} else {
|
||||
thresh_fix = (FixStore **)
|
||||
memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStore *),
|
||||
"dump:thresh_fix");
|
||||
memory->srealloc(thresh_fix,(nthreshlast+1)*sizeof(FixStore *),
|
||||
"dump:thresh_fix");
|
||||
thresh_fixID = (char **)
|
||||
memory->srealloc(thresh_fixID,(nthreshlast+1)*sizeof(char *),
|
||||
"dump:thresh_fixID");
|
||||
memory->srealloc(thresh_fixID,(nthreshlast+1)*sizeof(char *),
|
||||
"dump:thresh_fixID");
|
||||
memory->grow(thresh_first,(nthreshlast+1),"dump:thresh_first");
|
||||
|
||||
int n = strlen(id) + strlen("_DUMP_STORE") + 8;
|
||||
|
||||
Reference in New Issue
Block a user