use portable logic operators
This commit is contained in:
@ -643,7 +643,7 @@ void PairE3B::checkInputs(const double &bondL)
|
|||||||
if (k2 == NOT_SET) error->all(FLERR, "K2 keyword missing");
|
if (k2 == NOT_SET) error->all(FLERR, "K2 keyword missing");
|
||||||
|
|
||||||
//now test that values are within acceptable ranges
|
//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 (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 (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");
|
if (rs > rc3) error->all(FLERR, "potential switching distance is larger than cutoff");
|
||||||
|
|||||||
@ -2075,7 +2075,7 @@ void FixRxKokkos<DeviceType>::computeLocalTemperature()
|
|||||||
|
|
||||||
// Local list views. (This isn't working!)
|
// Local list views. (This isn't working!)
|
||||||
NeighListKokkos<DeviceType>* k_list = static_cast<NeighListKokkos<DeviceType>*>(list);
|
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");
|
error->one(FLERR,"list is not a Kokkos list\n");
|
||||||
|
|
||||||
//typename ArrayTypes<DeviceType>::t_neighbors_2d d_neighbors = k_list->d_neighbors;
|
//typename ArrayTypes<DeviceType>::t_neighbors_2d d_neighbors = k_list->d_neighbors;
|
||||||
|
|||||||
@ -388,7 +388,7 @@ char *FixMDIEngine::engine_mode(const char *node)
|
|||||||
|
|
||||||
// respond to commands from the driver
|
// 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
|
// read the next command from the driver
|
||||||
// all procs call this, but only proc 0 receives the command
|
// all procs call this, but only proc 0 receives the command
|
||||||
|
|||||||
@ -132,7 +132,7 @@ void MLIAPModelPython::connect_param_counts()
|
|||||||
|
|
||||||
void MLIAPModelPython::compute_gradients(MLIAPData *data)
|
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();
|
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||||
MLIAPPY_compute_gradients(this, data);
|
MLIAPPY_compute_gradients(this, data);
|
||||||
|
|||||||
@ -274,7 +274,7 @@ void DumpNetCDF::openfile()
|
|||||||
if (append_flag && !multifile) {
|
if (append_flag && !multifile) {
|
||||||
// Fixme! Perform checks if dimensions and variables conform with
|
// Fixme! Perform checks if dimensions and variables conform with
|
||||||
// data structure standard.
|
// 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);
|
error->all(FLERR, "cannot append to non-existent file {}",filecurrent);
|
||||||
|
|
||||||
if (singlefile_opened) return;
|
if (singlefile_opened) return;
|
||||||
|
|||||||
@ -272,7 +272,7 @@ void DumpNetCDFMPIIO::openfile()
|
|||||||
if (append_flag && !multifile) {
|
if (append_flag && !multifile) {
|
||||||
// Fixme! Perform checks if dimensions and variables conform with
|
// Fixme! Perform checks if dimensions and variables conform with
|
||||||
// data structure standard.
|
// 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);
|
error->all(FLERR, "cannot append to non-existent file {}", filecurrent);
|
||||||
|
|
||||||
MPI_Offset index[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS];
|
MPI_Offset index[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS];
|
||||||
|
|||||||
Reference in New Issue
Block a user