improve flow of control and remove redundant checks
This commit is contained in:
@ -1823,9 +1823,7 @@ void AtomVec::write_data(FILE *fp, int n, double **buf)
|
||||
if (atom->types_style == Atom::LABELS &&
|
||||
atom->peratom[mdata_atom.index[nn]].name == "type") {
|
||||
fmt::print(fp," {}",atom->lmap->typelabel[ubuf(buf[i][j++]).i-1]);
|
||||
continue;
|
||||
}
|
||||
fmt::print(fp, " {}", ubuf(buf[i][j++]).i);
|
||||
} else fmt::print(fp, " {}", ubuf(buf[i][j++]).i);
|
||||
} else {
|
||||
for (m = 0; m < cols; m++) fmt::print(fp, " {}", ubuf(buf[i][j++]).i);
|
||||
}
|
||||
|
||||
@ -1626,10 +1626,7 @@ void Input::kspace_style()
|
||||
|
||||
void Input::labelmap()
|
||||
{
|
||||
if (narg < 2 || (narg % 2 == 0)) error->all(FLERR,"Illegal labelmap command");
|
||||
if (domain->box_exist == 0)
|
||||
error->all(FLERR,"Labelmap command before simulation box is defined");
|
||||
|
||||
if (domain->box_exist == 0) error->all(FLERR,"Labelmap command before simulation box is defined");
|
||||
if (!atom->labelmapflag) atom->add_label_map();
|
||||
atom->lmap->modify_lmap(narg,arg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user