use portable logic operators

This commit is contained in:
Axel Kohlmeyer
2021-10-07 12:23:17 -04:00
parent 3661b8cd50
commit 4f17082d74
6 changed files with 6 additions and 6 deletions

View File

@ -643,7 +643,7 @@ void PairE3B::checkInputs(const double &bondL)
if (k2 == NOT_SET) error->all(FLERR, "K2 keyword missing");
//now test that values are within acceptable ranges
if (k2 < 0.0 or k3 < 0.0) error->all(FLERR, "exponential decay is negative");
if (k2 < 0.0 || k3 < 0.0) error->all(FLERR, "exponential decay is negative");
if (bondL < 0.0) error->all(FLERR, "OH bond length is negative");
if (rc2 < 0.0 || rc3 < 0.0 || rs < 0.0) error->all(FLERR, "potential cutoff is negative");
if (rs > rc3) error->all(FLERR, "potential switching distance is larger than cutoff");

View File

@ -2075,7 +2075,7 @@ void FixRxKokkos<DeviceType>::computeLocalTemperature()
// Local list views. (This isn't working!)
NeighListKokkos<DeviceType>* k_list = static_cast<NeighListKokkos<DeviceType>*>(list);
if (not(list->kokkos))
if (!list->kokkos)
error->one(FLERR,"list is not a Kokkos list\n");
//typename ArrayTypes<DeviceType>::t_neighbors_2d d_neighbors = k_list->d_neighbors;

View File

@ -388,7 +388,7 @@ char *FixMDIEngine::engine_mode(const char *node)
// respond to commands from the driver
while (not exit_flag and not local_exit_flag) {
while (!exit_flag && !local_exit_flag) {
// read the next command from the driver
// all procs call this, but only proc 0 receives the command

View File

@ -132,7 +132,7 @@ void MLIAPModelPython::connect_param_counts()
void MLIAPModelPython::compute_gradients(MLIAPData *data)
{
if (not model_loaded) { error->all(FLERR, "Model not loaded."); }
if (!model_loaded) { error->all(FLERR, "Model not loaded."); }
PyGILState_STATE gstate = PyGILState_Ensure();
MLIAPPY_compute_gradients(this, data);

View File

@ -274,7 +274,7 @@ void DumpNetCDF::openfile()
if (append_flag && !multifile) {
// Fixme! Perform checks if dimensions and variables conform with
// data structure standard.
if (not platform::file_is_readable(filecurrent))
if (!platform::file_is_readable(filecurrent))
error->all(FLERR, "cannot append to non-existent file {}",filecurrent);
if (singlefile_opened) return;

View File

@ -272,7 +272,7 @@ void DumpNetCDFMPIIO::openfile()
if (append_flag && !multifile) {
// Fixme! Perform checks if dimensions and variables conform with
// data structure standard.
if (not platform::file_is_readable(filecurrent))
if (!platform::file_is_readable(filecurrent))
error->all(FLERR, "cannot append to non-existent file {}", filecurrent);
MPI_Offset index[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS];