You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found an error in the following function ( source/apps/chem/gth_pseudopotential.h:290-307). It looks like the l=1, m=1 case is not checked or computed.
This is probably not performance critical code, but why is there so much computation with constants here? I doubt the complier will optimize them away.
double_complex operator()(const coord_3d& r) const {
const double x = r[0]-center[0]; const double y = r[1]-center[1]; const double z = r[2]-center[2];
double rr = std::sqrt(x*x + y*y + z*z);
double PI = constants::pi;
if (l == 0) {
return (1./2.)*std::sqrt(1./PI);
} else if (l == 1) {
if (m == -1) {
return (1./2.)*std::sqrt(3./2./PI)*double_complex(x, -y)/rr;
}
if (m == 0) {
return (1./2.)*std::sqrt(3./PI)*z/rr;
}
if (m == -1) {
return -(1./2.)*std::sqrt(3./2./PI)*double_complex(x, y)/rr;
}
}
}
The text was updated successfully, but these errors were encountered:
I found an error in the following function ( source/apps/chem/gth_pseudopotential.h:290-307). It looks like the l=1, m=1 case is not checked or computed.
This is probably not performance critical code, but why is there so much computation with constants here? I doubt the complier will optimize them away.
The text was updated successfully, but these errors were encountered: