-
Notifications
You must be signed in to change notification settings - Fork 0
/
mom_sh_source_const.h
83 lines (59 loc) · 1.96 KB
/
mom_sh_source_const.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
// -*- C++ -*-
/*! \file
* \brief Shell source construction
*/
#ifndef __mom_sh_source_const_h__
#define __mom_sh_source_const_h__
#include "meas/sources/source_construction.h"
#include "io/xml_group_reader.h"
namespace Chroma
{
//! Name and registration
/*! @ingroup sources */
namespace MomShellQuarkSourceConstEnv
{
bool registerAll();
//! Return the name
std::string getName();
//! Point source parameters
/*! @ingroup sources */
struct Params
{
Params();
Params(XMLReader& in, const std::string& path);
void writeXML(XMLWriter& out, const std::string& path) const;
bool quark_smear_lastP; /*!< Flag controlling order of smearing */
GroupXML_t quark_smearing; /*!< xml std::string holding smearing params */
GroupXML_t quark_displacement; /*!< displacement xml */
GroupXML_t link_smearing; /*!< link smearing xml */
int j_decay; /*!< Decay direction */
multi1d<int> t_srce; /*!< source location */
};
//! Shell source construction
/*! @ingroup sources
*
* Create a shell quark source
*/
template<typename T>
class SourceConst : public QuarkSourceConstruction<T>
{
public:
//! Full constructor
SourceConst(const Params& p) : params(p) {}
//! Construct the source
T operator()(const multi1d<LatticeColorMatrix>& u) const;
private:
//! Hide partial constructor
SourceConst() {}
private:
Params params; /*!< source params */
};
} // end namespace ShellQuarkSourceConstEnv
//! Reader
/*! @ingroup sources */
void read(XMLReader& xml, const std::string& path, MomShellQuarkSourceConstEnv::Params& param);
//! Writer
/*! @ingroup sources */
void write(XMLWriter& xml, const std::string& path, const MomShellQuarkSourceConstEnv::Params& param);
} // end namespace Chroma
#endif