55 const std::string
test_name =
"SF_fAfP.Boundary_Meson_2ptFunction";
59 const std::string filename_input =
"test_SF_fAfP_Boundary_Meson_2ptFunction.yaml";
60 const std::string filename_output =
"stdout";
62 class Parameters_Test_SF_fAfP :
public Parameters {
64 Parameters_Test_SF_fAfP()
66 Register_string(
"gauge_config_status",
"NULL");
67 Register_string(
"gauge_config_type_input",
"NULL");
68 Register_string(
"config_filename_input",
"NULL");
70 Register_string(
"verbose_level",
"NULL");
72 Register_double(
"expected_result", 0.0);
80 #ifdef USE_TESTMANAGER_AUTOREGISTER
82 #if defined(USE_OPENMP) || defined(USE_GROUP_SU2)
121 const string str_gconf_status = params_test->
get_string(
"gauge_config_status");
122 const string str_gconf_read = params_test->
get_string(
"gauge_config_type_input");
123 const string readfile = params_test->
get_string(
"config_filename_input");
124 const string str_vlevel = params_test->
get_string(
"verbose_level");
126 const bool do_check = params_test->
is_set(
"expected_result");
127 const double expected_result = do_check ? params_test->
get_double(
"expected_result") : 0.0;
129 const string str_gmset_type = params_clover->
get_string(
"gamma_matrix_type");
130 const string str_proj_type = params_proj->
get_string(
"projection_type");
131 const string str_smear_type = params_smear->
get_string(
"smear_type");
132 const string str_solver_type = params_solver->
get_string(
"solver_type");
137 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
138 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
139 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
140 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
141 vout.
general(vl,
" gmset_type = %s\n", str_gmset_type.c_str());
142 vout.
general(vl,
" proj_type = %s\n", str_proj_type.c_str());
143 vout.
general(vl,
" smear_type = %s\n", str_smear_type.c_str());
144 vout.
general(vl,
" solver_type = %s\n", str_solver_type.c_str());
152 vout.
crucial(vl,
"%s: Input parameters have not been set.\n", test_name.c_str());
161 if (str_gconf_status ==
"Continue") {
163 }
else if (str_gconf_status ==
"Cold_start") {
165 }
else if (str_gconf_status ==
"Hot_start") {
166 int i_seed_noise = 1234567;
170 vout.
crucial(vl,
"%s: unsupported gconf status \"%s\".\n", test_name.c_str(), str_gconf_status.c_str());
217 std::vector<Field_F> H(Nc * Nd);
218 std::vector<Field_F> Hpr(Nc * Nd);
226 vout.
general(vl,
" color spin Nconv diff diff2\n");
228 for (
int icolor = 0; icolor < Nc; ++icolor) {
229 for (
int ispin = 0; ispin < Nd / 2; ++ispin) {
230 source->
set_t0(b, icolor, ispin);
232 int idx = icolor + Nc * ispin;
233 fprop_lex->
invert_D(xq, b, Nconv, diff);
238 fopr_smear->
mult(y, xq);
243 icolor, ispin, Nconv, diff, diff2);
250 for (
int ispin = Nd / 2; ispin < Nd; ++ispin) {
251 source->
set_tT(b, icolor, ispin);
253 int idx = icolor + Nc * ispin;
254 fprop_lex->
invert_D(xq, b, Nconv, diff);
259 fopr_smear->
mult(y, xq);
264 icolor, ispin, Nconv, diff, diff2);
275 for (
int t = 0; t < 2; ++t) {
276 int site = index.
site(0, 0, 0, t);
277 for (
int c1 = 0; c1 < Nc; ++c1) {
278 for (
int c0 = 0; c0 < Nc; ++c0) {
279 for (
int s1 = 0; s1 < Nd; ++s1) {
280 for (
int s0 = 0; s0 < Nd; ++s0) {
283 H[c0 + Nc * s0].cmp_r(c1, s1, site),
284 H[c0 + Nc * s0].cmp_i(c1, s1, site));
290 for (
int t = 0; t < 2; ++t) {
291 int site = index.
site(0, 0, 0, t);
292 for (
int c1 = 0; c1 < Nc; ++c1) {
293 for (
int c0 = 0; c0 < Nc; ++c0) {
294 for (
int s1 = 0; s1 < Nd; ++s1) {
295 for (
int s0 = 0; s0 < Nd; ++s0) {
298 Hpr[c0 + Nc * s0].cmp_r(c1, s1, site),
299 Hpr[c0 + Nc * s0].cmp_i(c1, s1, site));
309 vout.
general(vl,
"boundary 2-point correlator with SF BC:\n");
312 double result = corr.
fAfP(H, Hpr);
320 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
Random number generator base on M-series.
const std::string test_name
void set_config(Field *U)
setting pointer to configuration
void detailed(const char *format,...)
void set(const int jin, const int site, const int jex, double v)
int site(const int &x, const int &y, const int &z, const int &t) const
void general(const char *format,...)
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
Two-point correlator for Wilson-type fermions with SF BC.
virtual void set_parameters(const Parameters &)=0
static Parameters * New(const std::string &realm)
void read_file(Field *U, const string &filename)
void set_random(RandomNumbers *rand)
int boundary_meson_2ptFunction(void)
void set_tT(Field_F &src, int ic, int id)
Set the 3D wall source at t=T-1.
Wilson-type fermion field.
virtual void set_parameters(const Parameters ¶ms)=0
static bool RegisterTest(const std::string &key, const Test_function func)
virtual void invert_D(Field &, const Field &, int &, double &)=0
Field * getptr_smearedConfig(int i_smear)
get pointer to i-th smeared config (0th is original thin link)
double fAfP(const std::vector< Field_F > &sq1, const std::vector< Field_F > &sq2)
bool is_set(const string &) const
void set_t0(Field_F &src, int ic, int id)
Set the 3D wall source at t=1.
double get_double(const string &key) const
void set_parameters(const Parameters ¶ms)
virtual void set_parameters(const Parameters &)=0
int non_NULL(const std::string v)
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Get quark propagator for Fopr with lexical site index.
void set_config(Field *U)
set pointer to original thin link variable
int get_Nsmear()
get number of applied smearing operation
void crucial(const char *format,...)
virtual void set_parameters(const Parameters ¶ms)=0
void Register_Parameters(const string &, Parameters *const)
Manager of smeared configurations.
int verify(const double result, const double expected, double eps)
virtual void mult(Field &, const Field &)=0
multiplies fermion operator to a given field (2nd argument)
void set_parameters(const Parameters ¶ms)
set parameters, must be called before set_config
virtual void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
static void read(const std::string ¶ms_file, Parameters *params)
GaugeConfig class for file I/O of gauge configuration.
string get_string(const string &key) const
virtual void set_config(Field *U)=0
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
static VerboseLevel set_verbose_level(const std::string &str)