don't use doubles as boolean

This commit is contained in:
Axel Kohlmeyer
2025-06-28 02:34:58 -04:00
parent 8726deb9b6
commit 0cd4ea4d04
2 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ void ComputeDisplaceAtom::refresh()
int nlocal = atom->nlocal;
for (int i = 0; i < nlocal; i++)
if (varatom[i]) domain->unmap(x[i],image[i],xoriginal[i]);
if (varatom[i] != 0.0) domain->unmap(x[i],image[i],xoriginal[i]);
}
/* ----------------------------------------------------------------------

View File

@ -441,7 +441,7 @@ void Finish::end(int flag)
double fraction,flop3,flop1;
if (nsteps) {
if (time_kspace) fraction = time3d/time_kspace*100.0;
if (time_kspace != 0.0) fraction = time3d/time_kspace*100.0;
else fraction = 0.0;
flop3 = nfft*nflops/1.0e9/(time3d/nsteps);
flop1 = nfft*nflops/1.0e9/(time1d/nsteps);