diff --git a/src/KOKKOS/atom_kokkos.cpp b/src/KOKKOS/atom_kokkos.cpp index f40b9c324a..5fb9840a48 100644 --- a/src/KOKKOS/atom_kokkos.cpp +++ b/src/KOKKOS/atom_kokkos.cpp @@ -265,7 +265,7 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols) index = nivector; nivector++; ivname = (char **) memory->srealloc(ivname,nivector*sizeof(char *), - "atom:ivname"); + "atom:ivname"); int n = strlen(name) + 1; ivname[index] = new char[n]; strcpy(ivname[index],name); @@ -277,7 +277,7 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols) index = ndvector; ndvector++; dvname = (char **) memory->srealloc(dvname,ndvector*sizeof(char *), - "atom:dvname"); + "atom:dvname"); int n = strlen(name) + 1; dvname[index] = new char[n]; strcpy(dvname[index],name); @@ -292,12 +292,12 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols) index = niarray; niarray++; ianame = (char **) memory->srealloc(ianame,niarray*sizeof(char *), - "atom:ianame"); + "atom:ianame"); int n = strlen(name) + 1; ianame[index] = new char[n]; strcpy(ianame[index],name); iarray = (int ***) memory->srealloc(iarray,niarray*sizeof(int **), - "atom:iarray"); + "atom:iarray"); memory->create(iarray[index],nmax,cols,"atom:iarray"); icols = (int *) memory->srealloc(icols,niarray*sizeof(int),"atom:icols"); @@ -307,12 +307,12 @@ int AtomKokkos::add_custom(const char *name, int flag, int cols) index = ndarray; ndarray++; daname = (char **) memory->srealloc(daname,ndarray*sizeof(char *), - "atom:daname"); + "atom:daname"); int n = strlen(name) + 1; daname[index] = new char[n]; strcpy(daname[index],name); darray = (double ***) memory->srealloc(darray,ndarray*sizeof(double **), - "atom:darray"); + "atom:darray"); memory->create(darray[index],nmax,cols,"atom:darray"); dcols = (int *) memory->srealloc(dcols,ndarray*sizeof(int),"atom:dcols"); diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 3f70d242b1..7446c65c04 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -1042,16 +1042,16 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == DVEC) { - i = nfield + ithresh; + i = nfield + ithresh; int iwhich = custom[field2index[i]]; ptr = atom->dvector[iwhich]; - nstride = 1; + nstride = 1; } else if (thresh_array[ithresh] == IARRAY) { i = nfield + ithresh; int iwhich = custom[field2index[i]]; int **iarray = atom->iarray[iwhich]; - int icol = argindex[i] - 1; + int icol = argindex[i] - 1; for (i = 0; i < nlocal; i++) dchoose[i] = iarray[i][icol]; ptr = dchoose; @@ -1061,8 +1061,8 @@ int DumpCustom::count() i = nfield + ithresh; int iwhich = custom[field2index[i]]; double **darray = atom->darray[iwhich]; - ptr = &darray[0][argindex[i]-1]; - nstride = atom->dcols[iwhich]; + ptr = &darray[0][argindex[i]-1]; + nstride = atom->dcols[iwhich]; } // unselect atoms that don't meet threshold criterion diff --git a/src/fix_group.cpp b/src/fix_group.cpp index c15f2590c5..1e7225bcef 100644 --- a/src/fix_group.cpp +++ b/src/fix_group.cpp @@ -77,7 +77,7 @@ idregion(nullptr), idvar(nullptr), idprop(nullptr) iprop = atom->find_custom(arg[iarg+1],flag,cols); if (iprop < 1 || cols) error->all(FLERR,"Custom per-atom vector for group dynamic " - "does not exist"); + "does not exist"); propflag = 1; delete [] idprop; idprop = utils::strdup(arg[iarg+1]); @@ -246,8 +246,8 @@ void FixGroup::set_group() if (regionflag && !region->match(x[i][0],x[i][1],x[i][2])) inflag = 0; if (varflag && var[i] == 0.0) inflag = 0; if (propflag) { - if (!proptype && ivector[i] == 0) inflag = 0; - if (proptype && dvector[i] == 0.0) inflag = 0; + if (!proptype && ivector[i] == 0) inflag = 0; + if (proptype && dvector[i] == 0.0) inflag = 0; } } else inflag = 0; diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 1e583a4ec9..7df49f4bc4 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -449,23 +449,23 @@ void FixPropertyAtom::write_data_section(int /*mth*/, FILE *fp, if (style[nv] == MOLECULE) fprintf(fp," " TAGINT_FORMAT,(tagint) ubuf(buf[i][icol++]).i); else if (style[nv] == CHARGE) - fprintf(fp," %g",buf[i][icol++]); + fprintf(fp," %g",buf[i][icol++]); else if (style[nv] == RMASS) - fprintf(fp," %g",buf[i][icol++]); + fprintf(fp," %g",buf[i][icol++]); else if (style[nv] == IVEC) fprintf(fp," %d",(int) ubuf(buf[i][icol++]).i); else if (style[nv] == DVEC) - fprintf(fp," %g",buf[i][icol++]); + fprintf(fp," %g",buf[i][icol++]); else if (style[nv] == IARRAY) { - ncol = cols[nv]; - for (k = 0; k < ncol; k++) - fprintf(fp," %d",(int) ubuf(buf[i][icol+k]).i); - icol += ncol; + ncol = cols[nv]; + for (k = 0; k < ncol; k++) + fprintf(fp," %d",(int) ubuf(buf[i][icol+k]).i); + icol += ncol; } else if (style[nv] == DARRAY) { - ncol = cols[nv]; - for (k = 0; k < ncol; k++) - fprintf(fp," %g",buf[i][icol+k]); - icol += ncol; + ncol = cols[nv]; + for (k = 0; k < ncol; k++) + fprintf(fp," %g",buf[i][icol+k]); + icol += ncol; } } fprintf(fp,"\n"); @@ -557,11 +557,11 @@ void FixPropertyAtom::copy_arrays(int i, int j, int /*delflag*/) else if (style[nv] == IARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - atom->iarray[index[nv]][j][k] = atom->iarray[index[nv]][i][k]; + atom->iarray[index[nv]][j][k] = atom->iarray[index[nv]][i][k]; } else if (style[nv] == DARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - atom->darray[index[nv]][j][k] = atom->darray[index[nv]][i][k]; + atom->darray[index[nv]][j][k] = atom->darray[index[nv]][i][k]; } } } @@ -611,16 +611,16 @@ int FixPropertyAtom::pack_border(int n, int *list, double *buf) ncol = cols[nv]; for (i = 0; i < n; i++) { j = list[i]; - for (k = 0; k < ncol; k++) - buf[m++] = ubuf(iarray[j][k]).d; + for (k = 0; k < ncol; k++) + buf[m++] = ubuf(iarray[j][k]).d; } } else if (style[nv] == DARRAY) { double **darray = atom->darray[index[nv]]; ncol = cols[nv]; for (i = 0; i < n; i++) { j = list[i]; - for (k = 0; k < ncol; k++) - buf[m++] = darray[j][k]; + for (k = 0; k < ncol; k++) + buf[m++] = darray[j][k]; } } } @@ -668,15 +668,15 @@ int FixPropertyAtom::unpack_border(int n, int first, double *buf) ncol = cols[nv]; last = first + n; for (i = first; i < last; i++) - for (k = 0; k < ncol; k++) - iarray[i][k] = (int) ubuf(buf[m++]).i; + for (k = 0; k < ncol; k++) + iarray[i][k] = (int) ubuf(buf[m++]).i; } else if (style[nv] == DARRAY) { double **darray = atom->darray[index[nv]]; ncol = cols[nv]; last = first + n; for (i = first; i < last; i++) - for (k = 0; k < ncol; k++) - darray[i][k] = buf[m++]; + for (k = 0; k < ncol; k++) + darray[i][k] = buf[m++]; } } @@ -701,11 +701,11 @@ int FixPropertyAtom::pack_exchange(int i, double *buf) else if (style[nv] == IARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - buf[m++] = ubuf(atom->iarray[index[nv]][i][k]).d; + buf[m++] = ubuf(atom->iarray[index[nv]][i][k]).d; } else if (style[nv] == DARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - buf[m++] = atom->darray[index[nv]][i][k]; + buf[m++] = atom->darray[index[nv]][i][k]; } } @@ -735,11 +735,11 @@ int FixPropertyAtom::unpack_exchange(int nlocal, double *buf) else if (style[nv] == IARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - atom->iarray[index[nv]][nlocal][k] = (int) ubuf(buf[m++]).i; + atom->iarray[index[nv]][nlocal][k] = (int) ubuf(buf[m++]).i; } else if (style[nv] == DARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - atom->darray[index[nv]][nlocal][k] = buf[m++]; + atom->darray[index[nv]][nlocal][k] = buf[m++]; } } @@ -768,11 +768,11 @@ int FixPropertyAtom::pack_restart(int i, double *buf) else if (style[nv] == IARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - buf[m++] = ubuf(atom->iarray[index[nv]][i][k]).d; + buf[m++] = ubuf(atom->iarray[index[nv]][i][k]).d; } else if (style[nv] == DARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - buf[m++] = atom->darray[index[nv]][i][k]; + buf[m++] = atom->darray[index[nv]][i][k]; } } @@ -809,11 +809,11 @@ void FixPropertyAtom::unpack_restart(int nlocal, int nth) else if (style[nv] == IARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - atom->iarray[index[nv]][nlocal][k] = (int) ubuf(extra[nlocal][m++]).i; + atom->iarray[index[nv]][nlocal][k] = (int) ubuf(extra[nlocal][m++]).i; } else if (style[nv] == DARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - atom->darray[index[nv]][nlocal][k] = extra[nlocal][m++]; + atom->darray[index[nv]][nlocal][k] = extra[nlocal][m++]; } } }