move enum{IGNORE,WARN,ERROR) into Thermo class and use Thermo:: namespace to reference it

This commit is contained in:
Axel Kohlmeyer 2018-05-09 18:11:31 -04:00
parent dde271db36
commit d8138a5b4c
19 changed files with 66 additions and 73 deletions

View File

@ -37,8 +37,6 @@ using namespace LAMMPS_NS;
#define BONDDELTA 10000
#define LB_FACTOR 1.5
enum{IGNORE,WARN,ERROR}; // same as thermo.cpp
/* ---------------------------------------------------------------------- */
template<class DeviceType>
@ -288,7 +286,7 @@ void NeighBondKokkos<DeviceType>::bond_all()
}
} while (h_fail_flag());
if (nmissing && lostbond == ERROR) {
if (nmissing && lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Bond atoms missing on proc %d at step " BIGINT_FORMAT,
me,update->ntimestep);
@ -296,7 +294,7 @@ void NeighBondKokkos<DeviceType>::bond_all()
}
if (neighbor->cluster_check) bond_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
@ -317,7 +315,7 @@ void NeighBondKokkos<DeviceType>::operator()(TagNeighBondBondAll, const int &i,
int atom1 = map_array(bond_atom(i,m));
if (atom1 == -1) {
nmissing++;
if (lostbond == ERROR) return;
if (lostbond == Thermo::ERROR) return;
continue;
}
atom1 = closest_image(i,atom1);
@ -383,7 +381,7 @@ void NeighBondKokkos<DeviceType>::bond_partial()
}
} while (h_fail_flag());
if (nmissing && lostbond == ERROR) {
if (nmissing && lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Bond atoms missing on proc %d at step " BIGINT_FORMAT,
me,update->ntimestep);
@ -391,7 +389,7 @@ void NeighBondKokkos<DeviceType>::bond_partial()
}
if (neighbor->cluster_check) bond_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
@ -413,7 +411,7 @@ void NeighBondKokkos<DeviceType>::operator()(TagNeighBondBondPartial, const int
int atom1 = map_array(bond_atom(i,m));
if (atom1 == -1) {
nmissing++;
if (lostbond == ERROR) return;
if (lostbond == Thermo::ERROR) return;
continue;
}
atom1 = closest_image(i,atom1);
@ -505,7 +503,7 @@ void NeighBondKokkos<DeviceType>::angle_all()
}
} while (h_fail_flag());
if (nmissing && lostbond == ERROR) {
if (nmissing && lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Angle atoms missing on proc %d at step " BIGINT_FORMAT,
me,update->ntimestep);
@ -513,7 +511,7 @@ void NeighBondKokkos<DeviceType>::angle_all()
}
if (neighbor->cluster_check) angle_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
@ -536,7 +534,7 @@ void NeighBondKokkos<DeviceType>::operator()(TagNeighBondAngleAll, const int &i,
int atom3 = map_array(angle_atom3(i,m));
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
nmissing++;
if (lostbond == ERROR) return;
if (lostbond == Thermo::ERROR) return;
continue;
}
atom1 = closest_image(i,atom1);
@ -607,7 +605,7 @@ void NeighBondKokkos<DeviceType>::angle_partial()
}
} while (h_fail_flag());
if (nmissing && lostbond == ERROR) {
if (nmissing && lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Angle atoms missing on proc %d at step " BIGINT_FORMAT,
me,update->ntimestep);
@ -615,7 +613,7 @@ void NeighBondKokkos<DeviceType>::angle_partial()
}
if (neighbor->cluster_check) angle_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
@ -639,7 +637,7 @@ void NeighBondKokkos<DeviceType>::operator()(TagNeighBondAnglePartial, const int
int atom3 = map_array(angle_atom3(i,m));
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
nmissing++;
if (lostbond == ERROR) return;
if (lostbond == Thermo::ERROR) return;
continue;
}
atom1 = closest_image(i,atom1);
@ -749,7 +747,7 @@ void NeighBondKokkos<DeviceType>::dihedral_all()
}
} while (h_fail_flag());
if (nmissing && lostbond == ERROR) {
if (nmissing && lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Dihedral atoms missing on proc %d at step " BIGINT_FORMAT,
me,update->ntimestep);
@ -757,7 +755,7 @@ void NeighBondKokkos<DeviceType>::dihedral_all()
}
if (neighbor->cluster_check) dihedral_check(neighbor->ndihedrallist,v_dihedrallist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
@ -781,7 +779,7 @@ void NeighBondKokkos<DeviceType>::operator()(TagNeighBondDihedralAll, const int
int atom4 = map_array(dihedral_atom4(i,m));
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) return;
if (lostbond == Thermo::ERROR) return;
continue;
}
atom1 = closest_image(i,atom1);
@ -856,7 +854,7 @@ void NeighBondKokkos<DeviceType>::dihedral_partial()
}
} while (h_fail_flag());
if (nmissing && lostbond == ERROR) {
if (nmissing && lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Dihedral atoms missing on proc %d at step " BIGINT_FORMAT,
me,update->ntimestep);
@ -864,7 +862,7 @@ void NeighBondKokkos<DeviceType>::dihedral_partial()
}
if (neighbor->cluster_check) dihedral_check(neighbor->ndihedrallist,v_dihedrallist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
@ -889,7 +887,7 @@ void NeighBondKokkos<DeviceType>::operator()(TagNeighBondDihedralPartial, const
int atom4 = map_array(dihedral_atom4(i,m));
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) return;
if (lostbond == Thermo::ERROR) return;
continue;
}
atom1 = closest_image(i,atom1);
@ -1020,7 +1018,7 @@ void NeighBondKokkos<DeviceType>::improper_all()
}
} while (h_fail_flag());
if (nmissing && lostbond == ERROR) {
if (nmissing && lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Improper atoms missing on proc %d at step " BIGINT_FORMAT,
me,update->ntimestep);
@ -1028,7 +1026,7 @@ void NeighBondKokkos<DeviceType>::improper_all()
}
if (neighbor->cluster_check) dihedral_check(neighbor->nimproperlist,v_improperlist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
@ -1052,7 +1050,7 @@ void NeighBondKokkos<DeviceType>::operator()(TagNeighBondImproperAll, const int
int atom4 = map_array(improper_atom4(i,m));
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) return;
if (lostbond == Thermo::ERROR) return;
continue;
}
atom1 = closest_image(i,atom1);
@ -1127,7 +1125,7 @@ void NeighBondKokkos<DeviceType>::improper_partial()
}
} while (h_fail_flag());
if (nmissing && lostbond == ERROR) {
if (nmissing && lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Improper atoms missing on proc %d at step " BIGINT_FORMAT,
me,update->ntimestep);
@ -1135,7 +1133,7 @@ void NeighBondKokkos<DeviceType>::improper_partial()
}
if (neighbor->cluster_check) dihedral_check(neighbor->nimproperlist,v_improperlist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
@ -1160,7 +1158,7 @@ void NeighBondKokkos<DeviceType>::operator()(TagNeighBondImproperPartial, const
int atom4 = map_array(improper_atom4(i,m));
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) return;
if (lostbond == Thermo::ERROR) return;
continue;
}
atom1 = closest_image(i,atom1);

View File

@ -45,7 +45,6 @@ using namespace LAMMPS_NS;
using namespace MathConst;
enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp
enum{IGNORE,WARN,ERROR}; // same as thermo.cpp
enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files
#define BIG 1.0e20
@ -762,7 +761,7 @@ void Domain::image_check()
if (k == -1) {
nmissing++;
if (lostbond == ERROR)
if (lostbond == Thermo::ERROR)
error->one(FLERR,"Bond atom missing in image check");
continue;
}
@ -785,7 +784,7 @@ void Domain::image_check()
if (flagall && comm->me == 0)
error->warning(FLERR,"Inconsistent image flags");
if (lostbond == WARN) {
if (lostbond == Thermo::WARN) {
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all && comm->me == 0)
@ -861,7 +860,7 @@ void Domain::box_too_small_check()
if (k == -1) {
nmissing++;
if (lostbond == ERROR)
if (lostbond == Thermo::ERROR)
error->one(FLERR,"Bond atom missing in box size check");
continue;
}
@ -875,7 +874,7 @@ void Domain::box_too_small_check()
}
}
if (lostbond == WARN) {
if (lostbond == Thermo::WARN) {
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all && comm->me == 0)

View File

@ -31,8 +31,6 @@ class NTopo : protected Pointers {
bigint memory_usage();
protected:
enum{IGNORE,WARN,ERROR}; // same as thermo.cpp
int me,nprocs;
int maxbond,maxangle,maxdihedral,maximproper;
int cluster_check; // copy from Neighbor

View File

@ -58,7 +58,7 @@ void NTopoAngleAll::build()
atom3 = atom->map(angle_atom3[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Angle atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
@ -86,7 +86,7 @@ void NTopoAngleAll::build()
}
if (cluster_check) angle_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -59,7 +59,7 @@ void NTopoAnglePartial::build()
atom3 = atom->map(angle_atom3[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Angle atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
@ -87,7 +87,7 @@ void NTopoAnglePartial::build()
}
if (cluster_check) angle_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -76,7 +76,7 @@ void NTopoAngleTemplate::build()
atom3 = atom->map(angle_atom3[iatom][m]+tagprev);
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Angle atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
@ -106,7 +106,7 @@ void NTopoAngleTemplate::build()
}
if (cluster_check) angle_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -55,7 +55,7 @@ void NTopoBondAll::build()
atom1 = atom->map(bond_atom[i][m]);
if (atom1 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
@ -78,7 +78,7 @@ void NTopoBondAll::build()
}
if (cluster_check) bond_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -56,7 +56,7 @@ void NTopoBondPartial::build()
atom1 = atom->map(bond_atom[i][m]);
if (atom1 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
@ -79,7 +79,7 @@ void NTopoBondPartial::build()
}
if (cluster_check) bond_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -72,7 +72,7 @@ void NTopoBondTemplate::build()
atom1 = atom->map(bond_atom[iatom][m]+tagprev);
if (atom1 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
@ -96,7 +96,7 @@ void NTopoBondTemplate::build()
}
if (cluster_check) bond_check();
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -60,7 +60,7 @@ void NTopoDihedralAll::build()
atom4 = atom->map(dihedral_atom4[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Dihedral atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
@ -93,7 +93,7 @@ void NTopoDihedralAll::build()
}
if (cluster_check) dihedral_check(ndihedrallist,dihedrallist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -62,7 +62,7 @@ void NTopoDihedralPartial::build()
atom4 = atom->map(dihedral_atom4[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Dihedral atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
@ -95,7 +95,7 @@ void NTopoDihedralPartial::build()
}
if (cluster_check) dihedral_check(ndihedrallist,dihedrallist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -78,7 +78,7 @@ void NTopoDihedralTemplate::build()
atom4 = atom->map(dihedral_atom4[iatom][m]+tagprev);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Dihedral atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
@ -114,7 +114,7 @@ void NTopoDihedralTemplate::build()
}
if (cluster_check) dihedral_check(ndihedrallist,dihedrallist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -60,7 +60,7 @@ void NTopoImproperAll::build()
atom4 = atom->map(improper_atom4[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Improper atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
@ -93,7 +93,7 @@ void NTopoImproperAll::build()
}
if (cluster_check) dihedral_check(nimproperlist,improperlist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -62,7 +62,7 @@ void NTopoImproperPartial::build()
atom4 = atom->map(improper_atom4[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Improper atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
@ -95,7 +95,7 @@ void NTopoImproperPartial::build()
}
if (cluster_check) dihedral_check(nimproperlist,improperlist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -78,7 +78,7 @@ void NTopoImproperTemplate::build()
atom4 = atom->map(improper_atom4[iatom][m]+tagprev);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == ERROR) {
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Improper atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
@ -114,7 +114,7 @@ void NTopoImproperTemplate::build()
}
if (cluster_check) dihedral_check(nimproperlist,improperlist);
if (lostbond == IGNORE) return;
if (lostbond == Thermo::IGNORE) return;
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);

View File

@ -72,7 +72,6 @@ using namespace MathConst;
#define ONE "step temp epair emol etotal press"
#define MULTI "etotal ke temp pe ebond eangle edihed eimp evdwl ecoul elong press"
enum{IGNORE,WARN,ERROR}; // same as several files
enum{ONELINE,MULTILINE};
enum{INT,FLOAT,BIGINT};
enum{SCALAR,VECTOR,ARRAY};
@ -98,7 +97,7 @@ Thermo::Thermo(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
modified = 0;
normuserflag = 0;
lineflag = ONELINE;
lostflag = lostbond = ERROR;
lostflag = lostbond = Thermo::ERROR;
lostbefore = 0;
flushflag = 0;
@ -427,14 +426,14 @@ bigint Thermo::lost_check()
if (ntotal == atom->natoms) return ntotal;
// if not checking or already warned, just return
if (lostflag == IGNORE) return ntotal;
if (lostflag == WARN && lostbefore == 1) {
if (lostflag == Thermo::IGNORE) return ntotal;
if (lostflag == Thermo::WARN && lostbefore == 1) {
return ntotal;
}
// error message
if (lostflag == ERROR) {
if (lostflag == Thermo::ERROR) {
char str[64];
sprintf(str,
"Lost atoms: original " BIGINT_FORMAT " current " BIGINT_FORMAT,
@ -536,17 +535,17 @@ void Thermo::modify_params(int narg, char **arg)
} else if (strcmp(arg[iarg],"lost") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command");
if (strcmp(arg[iarg+1],"ignore") == 0) lostflag = IGNORE;
else if (strcmp(arg[iarg+1],"warn") == 0) lostflag = WARN;
else if (strcmp(arg[iarg+1],"error") == 0) lostflag = ERROR;
if (strcmp(arg[iarg+1],"ignore") == 0) lostflag = Thermo::IGNORE;
else if (strcmp(arg[iarg+1],"warn") == 0) lostflag = Thermo::WARN;
else if (strcmp(arg[iarg+1],"error") == 0) lostflag = Thermo::ERROR;
else error->all(FLERR,"Illegal thermo_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"lost/bond") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command");
if (strcmp(arg[iarg+1],"ignore") == 0) lostbond = IGNORE;
else if (strcmp(arg[iarg+1],"warn") == 0) lostbond = WARN;
else if (strcmp(arg[iarg+1],"error") == 0) lostbond = ERROR;
if (strcmp(arg[iarg+1],"ignore") == 0) lostbond = Thermo::IGNORE;
else if (strcmp(arg[iarg+1],"warn") == 0) lostbond = Thermo::WARN;
else if (strcmp(arg[iarg+1],"error") == 0) lostbond = Thermo::ERROR;
else error->all(FLERR,"Illegal thermo_modify command");
iarg += 2;

View File

@ -33,6 +33,8 @@ class Thermo : protected Pointers {
int lostflag; // IGNORE,WARN,ERROR
int lostbond; // ditto for atoms in bonds
enum {IGNORE,WARN,ERROR};
Thermo(class LAMMPS *, int, char **);
~Thermo();
void init();

View File

@ -36,7 +36,6 @@
using namespace LAMMPS_NS;
enum{IGNORE,WARN,ERROR}; // same as thermo.cpp
enum{II,IJ};
/* ---------------------------------------------------------------------- */
@ -153,7 +152,7 @@ void WriteData::write(char *file)
bigint nblocal = atom->nlocal;
bigint natoms;
MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (natoms != atom->natoms && output->thermo->lostflag == ERROR)
if (natoms != atom->natoms && output->thermo->lostflag == Thermo::ERROR)
error->all(FLERR,"Atom count is inconsistent, cannot write data file");
// sum up bond,angle,dihedral,improper counts

View File

@ -63,8 +63,6 @@ enum{VERSION,SMALLINT,TAGINT,BIGINT,
ATOM_ID,ATOM_MAP_STYLE,ATOM_MAP_USER,ATOM_SORTFREQ,ATOM_SORTBIN,
COMM_MODE,COMM_CUTOFF,COMM_VEL,NO_PAIR};
enum{IGNORE,WARN,ERROR}; // same as thermo.cpp
/* ---------------------------------------------------------------------- */
WriteRestart::WriteRestart(LAMMPS *lmp) : Pointers(lmp)
@ -252,7 +250,7 @@ void WriteRestart::write(char *file)
bigint nblocal = atom->nlocal;
MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (natoms != atom->natoms && output->thermo->lostflag == ERROR)
if (natoms != atom->natoms && output->thermo->lostflag == Thermo::ERROR)
error->all(FLERR,"Atom count is inconsistent, cannot write restart file");
// open single restart file or base file for multiproc case