forked from lijiext/lammps
Merge pull request #504 from andeplane/hexorder_fix
Using correct ndegree instead of nnn
This commit is contained in:
commit
1ec9e588ff
|
@ -248,7 +248,7 @@ inline void ComputeHexOrderAtom::calc_qn_complex(double delx, double dely, doubl
|
|||
double x = delx*rinv;
|
||||
double y = dely*rinv;
|
||||
std::complex<double> z(x, y);
|
||||
std::complex<double> zn = pow(z, nnn);
|
||||
std::complex<double> zn = pow(z, ndegree);
|
||||
u = real(zn);
|
||||
v = imag(zn);
|
||||
}
|
||||
|
@ -259,9 +259,9 @@ inline void ComputeHexOrderAtom::calc_qn_complex(double delx, double dely, doubl
|
|||
inline void ComputeHexOrderAtom::calc_qn_trig(double delx, double dely, double &u, double &v) {
|
||||
double ntheta;
|
||||
if(fabs(delx) <= MY_EPSILON) {
|
||||
if(dely > 0.0) ntheta = nnn * MY_PI / 2.0;
|
||||
else ntheta = nnn * 3.0 * MY_PI / 2.0;
|
||||
} else ntheta = nnn * atan(dely / delx);
|
||||
if(dely > 0.0) ntheta = ndegree * MY_PI / 2.0;
|
||||
else ntheta = ndegree * 3.0 * MY_PI / 2.0;
|
||||
} else ntheta = ndegree * atan(dely / delx);
|
||||
u = cos(ntheta);
|
||||
v = sin(ntheta);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue