forked from etmc/tmLQCD
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoperator.h
142 lines (124 loc) · 4.57 KB
/
operator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/***********************************************************************
*
* Copyright (C) 2009 Carsten Urbach
*
* This file is part of tmLQCD.
*
* tmLQCD is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* tmLQCD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with tmLQCD. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************/
#ifndef _OPERATOR_H
#define _OPERATOR_H
#include "io/utils.h"
#include "solver/dirac_operator_eigenvectors.h"
#include "su3.h"
#include "solver/solver_params.h"
#include "operator_types.h"
#include "misc_types.h"
#define max_no_operators 50
typedef struct {
/* ID of the operator */
int type;
int id;
/* for overlap */
int n_cheby;
int deg_poly;
int no_ev;
SloppyPrecision sloppy_precision;
int even_odd_flag;
int solver;
int N_s;
int initialised;
int rel_prec;
int maxiter;
int iterations;
int prop_precision;
int write_prop_flag;
int no_flavours;
int DownProp;
int no_ev_index;
ExternalInverter external_inverter;
CompressionType compression_type;
int error_code;
double kappa;
/* for twisted */
double mu;
double mubar;
/* for 2 flavour twisted */
double epsbar;
/* solver residue */
double eps_sq;
/* clover coefficient */
double c_sw;
/* precision reached during inversion */
double reached_prec;
/* for the overlap */
double m;
double s;
double ev_qnorm;
double ev_minev;
double ev_prec;
int ev_readwrite;
/* generic place for sources */
spinor *sr0, *sr1, *sr2, *sr3;
/* generic place for propagators */
spinor *prop0, *prop1, *prop2, *prop3;
/*solver parameters struct*/
solver_params_t solver_params;
/* multiple masses for CGMMS */
double extra_masses[MAX_EXTRA_MASSES];
int no_extra_masses;
/* chebyshef coefficients for the overlap */
double * coefs;
/* various versions of the Dirac operator */
/* ---------------------------------------*/
//even-even part of the even-odd operator
void (*applyMee) (spinor * const, spinor * const, double const);
//inverse of the even-even part of the even-odd operator
void (*applyMeeInv) (spinor * const, spinor * const, double const);
//full operator M acting on a spinor given as even and odd parts separately
void (*applyM) (spinor * const, spinor * const, spinor * const, spinor * const);
//full operator Q=gamma5*M on a spinor given as even and odd parts separately
void (*applyQ) (spinor * const, spinor * const, spinor * const, spinor * const);
//either: the full operator Q^+ on lexiographic spinor
//or : eo-preconditioned Q^+ on odd part of an eo ordered spinor
void (*applyQp) (spinor * const, spinor * const);
//either : the full operator Q^- on lexiographic spinor
//or : eo-preconditioned Q^- on odd part of an eo ordered spinor
void (*applyQm) (spinor * const, spinor * const);
//either: the full operator Q^+*Q^- on lexiographic spinor
//or : eo-preconditioned Q^+*Q^- on odd part of an eo ordered spinor
void (*applyQsq) (spinor * const, spinor * const);
//either: the full operator M^+ on lexiographic spinor
//or : eo-preconditioned M^+ on odd part of an eo ordered spinor
void (*applyMp) (spinor * const, spinor * const);
//either: the full operator M^- on lexiographic spinor
//or : eo-preconditioned M^- on odd part of an eo ordered spinor
void (*applyMm) (spinor * const, spinor * const);
//EO preconditoned Hermitian operator for the non-degenerate doublet (more explanantion needed here).
void (*applyDbQsq) (spinor * const, spinor * const, spinor * const, spinor * const);
/* the generic invert function */
void (*inverter) (const int op_id, const int index_start, const int write_prop);
/* write the propagator */
void (*write_prop) (const int op_id, const int index_start, const int append_);
char * conf_input;
spinorPrecWS *precWS;
} operator;
/* operator list defined in operator.c */
extern operator operator_list[max_no_operators];
extern int no_operators;
int add_operator(const int type);
int init_operators();
void op_set_globals(const int op_id);
void op_backup_restore_globals(const backup_restore_t mode);
#endif