silence several compiler warnings

This commit is contained in:
Axel Kohlmeyer 2017-05-19 15:13:19 -04:00
parent c2bf3269ac
commit 6ef79d3715
2 changed files with 31 additions and 34 deletions

View File

@ -38,12 +38,12 @@ enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC};
FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
id_pe(NULL), pe(NULL), xprev(NULL), xnext(NULL), fnext(NULL),
tangent(NULL), springF(NULL), xsend(NULL), xrecv(NULL),
id_pe(NULL), pe(NULL), nlenall(NULL), xprev(NULL), xnext(NULL),
fnext(NULL), springF(NULL), tangent(NULL), xsend(NULL), xrecv(NULL),
fsend(NULL), frecv(NULL), tagsend(NULL), tagrecv(NULL),
xsendall(NULL), xrecvall(NULL), fsendall(NULL), frecvall(NULL),
tagsendall(NULL), tagrecvall(NULL), counts(NULL),
displacements(NULL),nlenall(NULL)
displacements(NULL)
{
@ -248,7 +248,6 @@ void FixNEB::min_post_force(int vflag)
{
double vprev,vnext,vmax,vmin;
double delxp,delyp,delzp,delxn,delyn,delzn;
double delta1[3],delta2[3];
double vIni =0.0;
vprev=vnext=veng = pe->compute_scalar();
@ -314,8 +313,6 @@ void FixNEB::min_post_force(int vflag)
nlen = 0.0;
double tlen = 0.0;
double gradnextlen = 0.0;
double dotFreeEndIniOld = 0.0;
double dotFreeEndFinalOld = 0.0;
dotgrad = gradlen = dotpath = dottangrad = 0.0;
@ -440,7 +437,7 @@ void FixNEB::min_post_force(int vflag)
gradlen = sqrt(bufout[3]);
gradnextlen = sqrt(bufout[4]);
dotpath = bufout[5];
dottangrag = bufout[6];
dottangrad = bufout[6];
dotgrad = bufout[7];
// normalize tangent vector
@ -557,7 +554,6 @@ void FixNEB::min_post_force(int vflag)
if (ireplica == 0 || ireplica == nreplica-1) return ;
double AngularContr;
double thetapath;
dotpath = dotpath/(plen*nlen);
AngularContr = 0.5 *(1+cos(MY_PI * dotpath));
@ -579,8 +575,6 @@ void FixNEB::min_post_force(int vflag)
MPI_Allreduce(&dot,&dotall,1,MPI_DOUBLE,MPI_SUM,world);
dot=dotall;
// double prefactor, prefSpring;
double ToDisp;
if (ireplica == rclimber)
prefactor = -2.0*dot;
else {

View File

@ -214,30 +214,33 @@ void NEB::run()
update->minimize->setup();
if (me_universe == 0) {
if (universe->uscreen)
if (Verbose)
if (universe->uscreen) {
if (Verbose) {
fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce "
"GradV0 GradV1 GradVc "
"EBF EBR RDT "
"RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n");
else
"GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... "
"RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 "
"ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 "
"... ReplicaForceN MaxAtomForceN\n");
} else {
fprintf(universe->uscreen,"Step MaxReplicaForce MaxAtomForce "
"GradV0 GradV1 GradVc "
"EBF EBR RDT "
"RD1 PE1 RD2 PE2 ... RDN PEN\n");
if (universe->ulogfile)
if (Verbose)
fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce "
"GradV0 GradV1 GradVc "
"EBF EBR RDT "
"RD1 PE1 RD2 PE2 ... RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 ... ReplicaForceN MaxAtomForceN\n");
else
"GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... "
"RDN PEN\n");
}
}
if (universe->ulogfile) {
if (Verbose) {
fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce "
"GradV0 GradV1 GradVc "
"EBF EBR RDT "
"RD1 PE1 RD2 PE2 ... RDN PEN\n");
"GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... "
"RDN PEN pathangle1 angletangrad1 anglegrad1 gradV1 "
"ReplicaForce1 MaxAtomForce1 pathangle2 angletangrad2 "
"... ReplicaForceN MaxAtomForceN\n");
} else {
fprintf(universe->ulogfile,"Step MaxReplicaForce MaxAtomForce "
"GradV0 GradV1 GradVc EBF EBR RDT RD1 PE1 RD2 PE2 ... "
"RDN PEN\n");
}
}
}
print_status();