mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 13:40:46 +01:00
Merge branch 'master' into hadrons
This commit is contained in:
commit
d08d93c44c
@ -84,7 +84,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout<<GridLogIterative << std::setprecision(4)<< "ConjugateGradient: k=0 residual "<<cp<<" rsq"<<rsq<<std::endl;
|
std::cout<<GridLogIterative << std::setprecision(4)<< "ConjugateGradient: k=0 residual "<<cp<<" target "<<rsq<<std::endl;
|
||||||
|
|
||||||
GridStopWatch LinalgTimer;
|
GridStopWatch LinalgTimer;
|
||||||
GridStopWatch MatrixTimer;
|
GridStopWatch MatrixTimer;
|
||||||
@ -115,7 +115,7 @@ public:
|
|||||||
p = p*b+r;
|
p = p*b+r;
|
||||||
|
|
||||||
LinalgTimer.Stop();
|
LinalgTimer.Stop();
|
||||||
std::cout<<GridLogIterative<<"ConjugateGradient: Iteration " <<k<<" residual "<<cp<< " target"<< rsq<<std::endl;
|
std::cout<<GridLogIterative<<"ConjugateGradient: Iteration " <<k<<" residual "<<cp<< " target "<< rsq<<std::endl;
|
||||||
|
|
||||||
// Stopping condition
|
// Stopping condition
|
||||||
if ( cp <= rsq ) {
|
if ( cp <= rsq ) {
|
||||||
@ -132,9 +132,9 @@ public:
|
|||||||
|
|
||||||
std::cout<<GridLogMessage<<"ConjugateGradient: Converged on iteration " <<k
|
std::cout<<GridLogMessage<<"ConjugateGradient: Converged on iteration " <<k
|
||||||
<<" computed residual "<<sqrt(cp/ssq)
|
<<" computed residual "<<sqrt(cp/ssq)
|
||||||
<<" true residual "<<true_residual
|
<<" true residual " <<true_residual
|
||||||
<<" target "<<Tolerance<<std::endl;
|
<<" target "<<Tolerance<<std::endl;
|
||||||
std::cout<<GridLogMessage<<" Time elapsed: Total "<< SolverTimer.Elapsed() << " Matrix "<<MatrixTimer.Elapsed() << " Linalg "<<LinalgTimer.Elapsed();
|
std::cout<<GridLogMessage<<"Time elapsed: Total "<< SolverTimer.Elapsed() << " Matrix "<<MatrixTimer.Elapsed() << " Linalg "<<LinalgTimer.Elapsed();
|
||||||
std::cout<<std::endl;
|
std::cout<<std::endl;
|
||||||
|
|
||||||
assert(true_residual/Tolerance < 1000.0);
|
assert(true_residual/Tolerance < 1000.0);
|
||||||
|
@ -152,7 +152,7 @@ template<class vobj> inline void sliceSum(const Lattice<vobj> &Data,std::vector<
|
|||||||
assert(grid!=NULL);
|
assert(grid!=NULL);
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
std::cout<<GridLogMessage<<"WARNING ! SliceSum is unthreaded "<<grid->SumArraySize()<<" threads "<<std::endl;
|
// std::cout<<GridLogMessage<<"WARNING ! SliceSum is unthreaded "<<grid->SumArraySize()<<" threads "<<std::endl;
|
||||||
|
|
||||||
const int Nd = grid->_ndimension;
|
const int Nd = grid->_ndimension;
|
||||||
const int Nsimd = grid->Nsimd();
|
const int Nsimd = grid->Nsimd();
|
||||||
|
@ -60,6 +60,31 @@ namespace Grid {
|
|||||||
"-Gamma5 ",
|
"-Gamma5 ",
|
||||||
" "
|
" "
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SpinMatrix makeGammaProd(const unsigned int i)
|
||||||
|
{
|
||||||
|
SpinMatrix g;
|
||||||
|
|
||||||
|
g = 1.;
|
||||||
|
if (i & 0x1)
|
||||||
|
{
|
||||||
|
g = g*Gamma(Gamma::GammaMatrix::GammaX);
|
||||||
|
}
|
||||||
|
if (i & 0x2)
|
||||||
|
{
|
||||||
|
g = g*Gamma(Gamma::GammaMatrix::GammaY);
|
||||||
|
}
|
||||||
|
if (i & 0x4)
|
||||||
|
{
|
||||||
|
g = g*Gamma(Gamma::GammaMatrix::GammaZ);
|
||||||
|
}
|
||||||
|
if (i & 0x8)
|
||||||
|
{
|
||||||
|
g = g*Gamma(Gamma::GammaMatrix::GammaT);
|
||||||
|
}
|
||||||
|
|
||||||
|
return g;
|
||||||
|
}
|
||||||
|
|
||||||
// void sprojMul( vHalfSpinColourVector &out,vColourMatrix &u, vSpinColourVector &in){
|
// void sprojMul( vHalfSpinColourVector &out,vColourMatrix &u, vSpinColourVector &in){
|
||||||
// vHalfSpinColourVector hspin;
|
// vHalfSpinColourVector hspin;
|
||||||
|
@ -82,7 +82,10 @@ namespace QCD {
|
|||||||
GammaMatrix _g;
|
GammaMatrix _g;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Make gamma products (Chroma convention)
|
||||||
|
SpinMatrix makeGammaProd(const unsigned int i);
|
||||||
|
|
||||||
/* Gx
|
/* Gx
|
||||||
* 0 0 0 i
|
* 0 0 0 i
|
||||||
* 0 0 i 0
|
* 0 0 i 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user