HILA
Loading...
Searching...
No Matches
Hasenbusch.h
1#ifndef __HASENBUSCH_H__
2#define __HASENBUSCH_H__
3
4#include "staggered.h"
5#include "wilson.h"
6
7/* The Hasenbusch method for updating fermion fields:
8 * Split the Dirac determinant into two parts,
9 * D_h1 = D + mh and
10 * D_h2 = D * 1 / (D + mh)
11 */
12
13/// This operator applies D + mh. It is
14/// necessary for defining the inverse 1/(D+mh)
15template <typename Dirac_type> class Hasenbusch_operator {
16 public:
17 using vector_type = typename Dirac_type::vector_type;
19
20 Dirac_type D;
21 Parity par;
22 double h_parameter;
23 Hasenbusch_operator(Dirac_type &d, double hasenbusch_parameter) : D(d) {
24 h_parameter = hasenbusch_parameter;
25 par = D.par;
26 }
28 h_parameter = h.h_parameter;
29 par = D.par;
30 }
31
32 template <typename H_type, typename matrix>
33 Hasenbusch_operator(H_type &h, matrix &mat) : D(h.D, mat) {
34 h_parameter = h.h_parameter;
35 par = D.par;
36 }
37
38 inline void apply(const Field<vector_type> &in, Field<vector_type> &out) {
39 D.apply(in, out);
40 out[D.par] = out[X] + h_parameter * in[X];
41 }
42
43 inline void dagger(const Field<vector_type> &in, Field<vector_type> &out) {
44 D.dagger(in, out);
45 out[D.par] = out[X] + h_parameter * in[X];
46 }
47
48 template <typename momtype>
49 inline void force(const Field<vector_type> &chi, const Field<vector_type> &psi,
50 Field<momtype> (&force)[NDIM], int sign) {
51 D.force(chi, psi, force, sign);
52 }
53};
54
55#endif
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
Definition field.h:61
Field< A > dagger() const
Returns dagger or Hermitian conjugate of Field depending on how it is defined for Field type T.
Definition field.h:1123
Parity
Parity enum with values EVEN, ODD, ALL; refers to parity of the site. Parity of site (x,...