16 #ifdef USE_FACTORY_AUTOREGISTER
18 bool init = ForceSmear_APE_SF::register_factory();
34 std::vector<double> phi, phipr;
65 const std::vector<double>& phi,
66 const std::vector<double>& phipr)
85 for (
int mu = 0; mu <
m_Ndim; ++mu) {
86 for (
int nu = 0; nu <
m_Ndim; ++nu) {
93 for (
int i = 0; i < 3; ++i) {
102 double Lx_inv = 1.0 / double(Lx);
103 double c0r = cos(phi[0] * Lx_inv);
104 double c0i = sin(phi[0] * Lx_inv);
105 double c1r = cos(phi[1] * Lx_inv);
106 double c1i = sin(phi[1] * Lx_inv);
107 double c2r = cos(phi[2] * Lx_inv);
108 double c2i = sin(phi[2] * Lx_inv);
114 c0r = cos(phipr[0] * Lx_inv);
115 c0i = sin(phipr[0] * Lx_inv);
116 c1r = cos(phipr[1] * Lx_inv);
117 c1i = sin(phipr[1] * Lx_inv);
118 c2r = cos(phipr[2] * Lx_inv);
119 c2i = sin(phipr[2] * Lx_inv);
130 const std::vector<double>& phi,
131 const std::vector<double>& phipr)
135 for (
int mu = 0; mu <
m_Ndim; ++mu) {
153 for (
int mu = 0; mu <
m_Ndim; ++mu) {
154 for (
int nu = 0; nu <
m_Ndim; ++nu) {
161 for (
int i = 0; i < 3; ++i) {
170 double Lx_inv = 1.0 / double(Lx);
171 double c0r = cos(phi[0] * Lx_inv);
172 double c0i = sin(phi[0] * Lx_inv);
173 double c1r = cos(phi[1] * Lx_inv);
174 double c1i = sin(phi[1] * Lx_inv);
175 double c2r = cos(phi[2] * Lx_inv);
176 double c2i = sin(phi[2] * Lx_inv);
182 c0r = cos(phipr[0] * Lx_inv);
183 c0i = sin(phipr[0] * Lx_inv);
184 c1r = cos(phipr[1] * Lx_inv);
185 c1i = sin(phipr[1] * Lx_inv);
186 c2r = cos(phipr[2] * Lx_inv);
187 c2i = sin(phipr[2] * Lx_inv);
206 for (
int mu = 0; mu <
m_Ndim; ++mu) {
207 for (
int nu = 0; nu <
m_Ndim; ++nu) {
244 assert(Sigmap.
nin() == (2 * Nc * Nc));
248 for (
int mu = 0; mu <
m_Ndim; ++mu) {
253 for (
int mu = 0; mu <
m_Ndim; ++mu) {
257 for (
int nu = 0; nu <
m_Ndim; ++nu) {
258 if (nu == mu)
continue;
267 copy(sigmap_tmp, 0, Sigmap, mu);
273 alpha, sigmap_tmp, C,
m_U[mu]);
274 copy(Sigma, mu, Xi, 0);
277 for (
int mu = 0; mu <
m_Ndim; ++mu) {
278 for (
int nu = 0; nu <
m_Ndim; ++nu) {
279 if (nu == mu)
continue;
286 axpy(Sigma, mu,
rho, sigma_tmp, 0);
311 const int mu,
const int nu)
332 axpy(Sigma_mu, 1.0, vt3);
338 axpy(Sigma_mu, 1.0, vt3);
351 axpy(Sigma_mu, 1.0, vt2);
365 const int mu,
const int nu)
388 axpy(c, 0, 1.0, v1, 0);