1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 20:27:06 +01:00

Lattice matrix exponential ok

This commit is contained in:
neo
2015-06-17 20:41:07 +09:00
parent 9c846bb0c7
commit 09757cbf0c
9 changed files with 136 additions and 89 deletions

View File

@ -1,4 +1,3 @@
#ifndef GRID_LATTICE_ET_H
#define GRID_LATTICE_ET_H

View File

@ -24,5 +24,18 @@ PARALLEL_FOR_LOOP
return ret;
}
template<class obj> Lattice<obj> expMat(const Lattice<obj> &rhs, ComplexD alpha, Integer Nexp = DEFAULT_MAT_EXP){
Lattice<obj> ret(rhs._grid);
ret.checkerboard = rhs.checkerboard;
conformable(ret,rhs);
PARALLEL_FOR_LOOP
for(int ss=0;ss<rhs._grid->oSites();ss++){
ret._odata[ss]=Exponentiate(rhs._odata[ss],alpha, Nexp);
}
return ret;
}
}
#endif