Use varargs version of Error:all() and Error::one() where applicable
This commit is contained in:
@ -272,15 +272,15 @@ void FixRestrain::restrain_bond(int m)
|
||||
if (newton_bond) {
|
||||
if (i2 == -1 || i2 >= nlocal) return;
|
||||
if (i1 == -1)
|
||||
error->one(FLERR,fmt::format("Restrain atoms {} {} missing on "
|
||||
error->one(FLERR,"Restrain atoms {} {} missing on "
|
||||
"proc {} at step {}", ids[m][0],ids[m][1],
|
||||
comm->me,update->ntimestep));
|
||||
comm->me,update->ntimestep);
|
||||
} else {
|
||||
if ((i1 == -1 || i1 >= nlocal) && (i2 == -1 || i2 >= nlocal)) return;
|
||||
if (i1 == -1 || i2 == -1)
|
||||
error->one(FLERR,fmt::format("Restrain atoms {} {} missing on "
|
||||
error->one(FLERR,"Restrain atoms {} {} missing on "
|
||||
"proc {} at step {}", ids[m][0],ids[m][1],
|
||||
comm->me,update->ntimestep));
|
||||
comm->me,update->ntimestep);
|
||||
}
|
||||
|
||||
delx = x[i1][0] - x[i2][0];
|
||||
@ -345,15 +345,15 @@ void FixRestrain::restrain_lbound(int m)
|
||||
if (newton_bond) {
|
||||
if (i2 == -1 || i2 >= nlocal) return;
|
||||
if (i1 == -1)
|
||||
error->one(FLERR,fmt::format("Restrain atoms {} {} missing on "
|
||||
error->one(FLERR,"Restrain atoms {} {} missing on "
|
||||
"proc {} at step {}",ids[m][0],ids[m][1],
|
||||
comm->me,update->ntimestep));
|
||||
comm->me,update->ntimestep);
|
||||
} else {
|
||||
if ((i1 == -1 || i1 >= nlocal) && (i2 == -1 || i2 >= nlocal)) return;
|
||||
if (i1 == -1 || i2 == -1)
|
||||
error->one(FLERR,fmt::format("Restrain atoms {} {} missing on "
|
||||
error->one(FLERR,"Restrain atoms {} {} missing on "
|
||||
"proc {} at step {}",ids[m][0],ids[m][1],
|
||||
comm->me,update->ntimestep));
|
||||
comm->me,update->ntimestep);
|
||||
}
|
||||
|
||||
delx = x[i1][0] - x[i2][0];
|
||||
@ -427,16 +427,16 @@ void FixRestrain::restrain_angle(int m)
|
||||
if (newton_bond) {
|
||||
if (i2 == -1 || i2 >= nlocal) return;
|
||||
if (i1 == -1 || i3 == -1)
|
||||
error->one(FLERR,fmt::format("Restrain atoms {} {} {} missing on "
|
||||
error->one(FLERR,"Restrain atoms {} {} {} missing on "
|
||||
"proc {} at step {}",ids[m][0],ids[m][1],
|
||||
ids[m][2],comm->me,update->ntimestep));
|
||||
ids[m][2],comm->me,update->ntimestep);
|
||||
} else {
|
||||
if ((i1 == -1 || i1 >= nlocal) && (i2 == -1 || i2 >= nlocal) &&
|
||||
(i3 == -1 || i3 >= nlocal)) return;
|
||||
if (i1 == -1 || i2 == -1 || i3 == -1)
|
||||
error->one(FLERR,fmt::format("Restrain atoms {} {} {} missing on "
|
||||
error->one(FLERR,"Restrain atoms {} {} {} missing on "
|
||||
"proc {} at step {}",ids[m][0],ids[m][1],
|
||||
ids[m][2],comm->me,update->ntimestep));
|
||||
ids[m][2],comm->me,update->ntimestep);
|
||||
}
|
||||
|
||||
// 1st bond
|
||||
@ -547,18 +547,18 @@ void FixRestrain::restrain_dihedral(int m)
|
||||
if (newton_bond) {
|
||||
if (i2 == -1 || i2 >= nlocal) return;
|
||||
if (i1 == -1 || i3 == -1 || i4 == -1)
|
||||
error->one(FLERR,fmt::format("Restrain atoms {} {} {} {} missing on "
|
||||
error->one(FLERR,"Restrain atoms {} {} {} {} missing on "
|
||||
"proc {} at step {}",ids[m][0],ids[m][1],
|
||||
ids[m][2],ids[m][3],comm->me,
|
||||
update->ntimestep));
|
||||
update->ntimestep);
|
||||
} else {
|
||||
if ((i1 == -1 || i1 >= nlocal) && (i2 == -1 || i2 >= nlocal) &&
|
||||
(i3 == -1 || i3 >= nlocal) && (i4 == -1 || i3 >= nlocal)) return;
|
||||
if (i1 == -1 || i2 == -1 || i3 == -1 || i4 == -1)
|
||||
error->one(FLERR,fmt::format("Restrain atoms {} {} {} {} missing on "
|
||||
error->one(FLERR,"Restrain atoms {} {} {} {} missing on "
|
||||
"proc {} at step {}",ids[m][0],ids[m][1],
|
||||
ids[m][2],ids[m][3],comm->me,
|
||||
update->ntimestep));
|
||||
update->ntimestep);
|
||||
}
|
||||
|
||||
// 1st bond
|
||||
|
||||
Reference in New Issue
Block a user