1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-09 13:40:46 +01:00

Fix phase convention adjustment error (and make no assumptions about node layout)

This commit is contained in:
Michael Marshall 2019-12-04 09:59:58 +00:00
parent 188e12ffbb
commit 15119eaf03

View File

@ -90,7 +90,6 @@ inline void MakeLowerDimGrid( std::unique_ptr<GridCartesian> &up, GridCartesian
/************************************************************************************* /*************************************************************************************
Rotate eigenvectors into our phase convention Rotate eigenvectors into our phase convention
First component of first eigenvector is real and positive First component of first eigenvector is real and positive
TODO: Should this be in Distil.hpp?
*************************************************************************************/ *************************************************************************************/
inline void RotateEigen(std::vector<LatticeColourVector> & evec) inline void RotateEigen(std::vector<LatticeColourVector> & evec)
@ -113,12 +112,9 @@ inline void RotateEigen(std::vector<LatticeColourVector> & evec)
for( int k = 0 ; k < evec.size() ; k++ ) for( int k = 0 ; k < evec.size() ; k++ )
evec[k] *= phase; evec[k] *= phase;
// Get rid of the rounding error in imaginary phase on the very first site // Get rid of the rounding error in imaginary phase on the very first site
if(grid->IsBoss()) peekSite(cv0, evec[0], siteFirst);
{ cv0()()(0).imag(0); // this should be zero after the phase multiply - force it to be so
peekSite(cv0, evec[0], siteFirst); pokeSite(cv0, evec[0], siteFirst);
cv0()()(0).imag(0); // this should be zero after the phase multiply - force it to be so
pokeLocalSite(cv0, evec[0], siteFirst);
}
} }
} }
} }