silence compiler warnings. avoid uninitialized access.
This commit is contained in:
@ -416,7 +416,7 @@ void MLIAPDescriptorSNAP::read_paramfile(char *paramfilename)
|
|||||||
if ((keywd == "elems") || (keywd == "radelems") || (keywd == "welems") ||
|
if ((keywd == "elems") || (keywd == "radelems") || (keywd == "welems") ||
|
||||||
(keywd == "rinnerelems") || (keywd == "drinnerelems")) {
|
(keywd == "rinnerelems") || (keywd == "drinnerelems")) {
|
||||||
|
|
||||||
if ((nelementsflag == 0) || (words.count() != nelements + 1))
|
if ((nelementsflag == 0) || ((int)words.count() != nelements + 1))
|
||||||
error->all(FLERR, "Incorrect SNAP parameter file");
|
error->all(FLERR, "Incorrect SNAP parameter file");
|
||||||
|
|
||||||
if (comm->me == 0) utils::logmesg(lmp, "SNAP keyword {} \n", utils::trim(line));
|
if (comm->me == 0) utils::logmesg(lmp, "SNAP keyword {} \n", utils::trim(line));
|
||||||
|
|||||||
@ -35,7 +35,7 @@ enum{SCALAR,VECTOR,ARRAY};
|
|||||||
ComputeSnap::ComputeSnap(LAMMPS *lmp, int narg, char **arg) :
|
ComputeSnap::ComputeSnap(LAMMPS *lmp, int narg, char **arg) :
|
||||||
Compute(lmp, narg, arg), cutsq(nullptr), list(nullptr), snap(nullptr),
|
Compute(lmp, narg, arg), cutsq(nullptr), list(nullptr), snap(nullptr),
|
||||||
snapall(nullptr), snap_peratom(nullptr), radelem(nullptr), wjelem(nullptr),
|
snapall(nullptr), snap_peratom(nullptr), radelem(nullptr), wjelem(nullptr),
|
||||||
snaptr(nullptr), rinnerelem(nullptr), drinnerelem(nullptr)
|
rinnerelem(nullptr), drinnerelem(nullptr), snaptr(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
array_flag = 1;
|
array_flag = 1;
|
||||||
|
|||||||
@ -63,8 +63,6 @@ ComputeTempDeform::~ComputeTempDeform()
|
|||||||
|
|
||||||
void ComputeTempDeform::init()
|
void ComputeTempDeform::init()
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
// check fix deform remap settings
|
// check fix deform remap settings
|
||||||
|
|
||||||
auto fixes = modify->get_fix_by_style("^deform");
|
auto fixes = modify->get_fix_by_style("^deform");
|
||||||
|
|||||||
@ -435,7 +435,6 @@ void DumpLocal::parse_fields(int narg, char **arg)
|
|||||||
vtype[iarg] = Dump::INT;
|
vtype[iarg] = Dump::INT;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
int n;
|
|
||||||
ArgInfo argi(arg[iarg],ArgInfo::COMPUTE|ArgInfo::FIX);
|
ArgInfo argi(arg[iarg],ArgInfo::COMPUTE|ArgInfo::FIX);
|
||||||
computefixflag = 1;
|
computefixflag = 1;
|
||||||
vtype[iarg] = Dump::DOUBLE;
|
vtype[iarg] = Dump::DOUBLE;
|
||||||
|
|||||||
@ -459,6 +459,7 @@ void Finish::end(int flag)
|
|||||||
time3d,fraction,flop3,flop1);
|
time3d,fraction,flop3,flop1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nneigh = nneighfull = 0;
|
||||||
if (histoflag) {
|
if (histoflag) {
|
||||||
std::string mesg = "\n";
|
std::string mesg = "\n";
|
||||||
tmp = atom->nlocal;
|
tmp = atom->nlocal;
|
||||||
@ -479,7 +480,7 @@ void Finish::end(int flag)
|
|||||||
mesg += "\n";
|
mesg += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = neighbor->get_nneigh_half();
|
tmp = nneigh = neighbor->get_nneigh_half();
|
||||||
if (tmp < 0.0) tmp = 0.0;
|
if (tmp < 0.0) tmp = 0.0;
|
||||||
stats(1,&tmp,&ave,&max,&min,10,histo);
|
stats(1,&tmp,&ave,&max,&min,10,histo);
|
||||||
if (me == 0) {
|
if (me == 0) {
|
||||||
@ -489,7 +490,7 @@ void Finish::end(int flag)
|
|||||||
mesg += "\n";
|
mesg += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = neighbor->get_nneigh_full();
|
tmp = nneighfull = neighbor->get_nneigh_full();
|
||||||
if (tmp >= 0.0) {
|
if (tmp >= 0.0) {
|
||||||
stats(1,&tmp,&ave,&max,&min,10,histo);
|
stats(1,&tmp,&ave,&max,&min,10,histo);
|
||||||
if (me == 0) {
|
if (me == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user