4#include "gauge_field.h"
5#include "dirac/Hasenbusch.h"
9template <
typename vector_type,
typename DIRAC_OP>
12 int MRE_size = old_chi_inv.size();
13 double M[MRE_size][MRE_size];
19 for (
int i = 0; i < MRE_size; i++) {
21 basis[i][
ALL] = old_chi_inv[i][X];
23 for (
int j = 0; j < i; j++) {
24 double vdot = 0, norm = 0;
26 norm += basis[i][X].rdot(basis[i][X]);
27 vdot += basis[j][X].rdot(basis[i][X]);
29 if (norm * norm > 1e-32) {
30 onsites(D.par) { basis[i][X] = basis[i][X] - vdot / norm * basis[j][X]; }
36 for (
int i = 0; i < MRE_size; i++) {
38 D.apply(basis[i], Dchi);
40 for (
int j = 0; j < MRE_size; j++) {
42 onsites(D.par) { sum += basis[j][X].rdot(DDchi[X]); }
47 for (
int i = 0; i < MRE_size; i++) {
49 onsites(D.par) { sum += basis[i][X].rdot(chi[X]); }
54 for (
int i = 0; i < MRE_size; i++) {
56 if (M[i][i] * M[i][i] > 1e-32) {
58 double diag_inv = 1.0 / M[i][i];
59 for (
int j = 0; j < MRE_size; j++) {
64 for (
int k = 0; k < MRE_size; k++)
67 for (
int j = 0; j < MRE_size; j++) {
68 M[k][j] -=
weight * M[i][j];
75 for (
int j = 0; j < MRE_size; j++) {
83 for (
int i = 0; i < MRE_size; i++)
85 onsites(D.par) { psi[X] = basis[i][X] + v[i] * basis[i][X]; }
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
Field< A > dagger() const
Returns dagger or Hermitian conjugate of Field depending on how it is defined for Field type T.
constexpr Parity ALL
bit pattern: 011
double weight(double OP)
process 0 interface to "weight function" for the user accessing the weights.