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
tsdev
changed the title
new gencoupling.m sometimes generates negative hMax2 and causes errors.
spinw.gencoupling() generates negative hMax2 which causes an error
Jun 13, 2017
The code above will trigger the error message saying index exceeds the dimension of cMat. As I said, my understanding is for certain basis vectors, hMax2 can have negative values and so do nC and cDim. This results in empty atom1 and atom2 which eventually reduces the dimension of cMat.
I think
hMax2 = sum(obj.basisvector,2);
can be replaced with
hMax2 = abs(sum(obj.basisvector,2));
to solve this problem.
The text was updated successfully, but these errors were encountered: