rename nall class member to numall to avoid confusion with the common convention nall = atom->nlocal+atom->nghost
This commit is contained in:
@ -182,9 +182,9 @@ void NEB::run()
|
|||||||
if (ineb == modify->nfix) error->all(FLERR,"NEB requires use of fix neb");
|
if (ineb == modify->nfix) error->all(FLERR,"NEB requires use of fix neb");
|
||||||
|
|
||||||
fneb = (FixNEB *) modify->fix[ineb];
|
fneb = (FixNEB *) modify->fix[ineb];
|
||||||
if (Verbose) nall =7;
|
if (Verbose) numall =7;
|
||||||
else nall = 4;
|
else numall = 4;
|
||||||
memory->create(all,nreplica,nall,"neb:all");
|
memory->create(all,nreplica,numall,"neb:all");
|
||||||
rdist = new double[nreplica];
|
rdist = new double[nreplica];
|
||||||
|
|
||||||
// initialize LAMMPS
|
// initialize LAMMPS
|
||||||
@ -582,7 +582,7 @@ void NEB::print_status()
|
|||||||
MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots);
|
MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots);
|
||||||
}
|
}
|
||||||
|
|
||||||
double one[nall];
|
double one[numall];
|
||||||
one[0] = fneb->veng;
|
one[0] = fneb->veng;
|
||||||
one[1] = fneb->plen;
|
one[1] = fneb->plen;
|
||||||
one[2] = fneb->nlen;
|
one[2] = fneb->nlen;
|
||||||
@ -598,8 +598,8 @@ void NEB::print_status()
|
|||||||
|
|
||||||
if (output->thermo->normflag) one[0] /= atom->natoms;
|
if (output->thermo->normflag) one[0] /= atom->natoms;
|
||||||
if (me == 0)
|
if (me == 0)
|
||||||
MPI_Allgather(one,nall,MPI_DOUBLE,&all[0][0],nall,MPI_DOUBLE,roots);
|
MPI_Allgather(one,numall,MPI_DOUBLE,&all[0][0],numall,MPI_DOUBLE,roots);
|
||||||
MPI_Bcast(&all[0][0],nall*nreplica,MPI_DOUBLE,0,world);
|
MPI_Bcast(&all[0][0],numall*nreplica,MPI_DOUBLE,0,world);
|
||||||
|
|
||||||
rdist[0] = 0.0;
|
rdist[0] = 0.0;
|
||||||
for (int i = 1; i < nreplica; i++)
|
for (int i = 1; i < nreplica; i++)
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class NEB : protected Pointers {
|
|||||||
char *infile; // name of file containing final state
|
char *infile; // name of file containing final state
|
||||||
|
|
||||||
class FixNEB *fneb;
|
class FixNEB *fneb;
|
||||||
int nall; // per-replica dimension of array all
|
int numall; // per-replica dimension of array all
|
||||||
double **all; // PE,plen,nlen,gradvnorm from each replica
|
double **all; // PE,plen,nlen,gradvnorm from each replica
|
||||||
double *rdist; // normalize reaction distance, 0 to 1
|
double *rdist; // normalize reaction distance, 0 to 1
|
||||||
double *freplica; // force on an image
|
double *freplica; // force on an image
|
||||||
|
|||||||
Reference in New Issue
Block a user