20 #include "lib/Tools/math_Sign_Zolotarev_Omega.h"
26 template<
typename AFIELD>
28 =
"AFopr_OptimalDomainwall";
30 template<
typename AFIELD>
33 vout.
general(m_vl,
"Initialization of %s:\n", class_name.c_str());
42 m_foprdw =
new AFopr_Domainwall_General<AFIELD>(params);
44 set_parameters(params);
49 template<
typename AFIELD>
56 template<
typename AFIELD>
60 const string str_vlevel = params.
get_string(
"verbose_level");
65 string str_gmset_type;
70 double lambda_min, lambda_max;
73 err_optional += params.
fetch_string(
"gamma_matrix_type", str_gmset_type);
77 err += params.
fetch_int(
"extent_of_5th_dimension", Ns);
85 vout.
crucial(m_vl,
"Error at %s: input parameter not found.\n",
90 set_parameters(mq, M0, Ns, bc, b, c, lambda_min, lambda_max);
95 template<
typename AFIELD>
100 const vector<int> bc,
103 const double lambda_min,
104 const double lambda_max)
111 m_boundary.resize(m_Ndim);
112 assert(bc.size() == m_Ndim);
113 for(
int mu = 0; mu < m_Ndim; ++mu){
114 m_boundary[mu] = bc[mu];
117 vout.
general(m_vl,
"Parameters specific to %s:\n", class_name.c_str());
120 vout.
general(m_vl,
" lower_bound = %12.8f\n", lambda_min);
121 vout.
general(m_vl,
" upper_bound = %12.8f\n", lambda_max);
125 set_optimalDomainwall(b, c, lambda_min, lambda_max);
127 m_foprdw->set_coefficients(m_b, m_c);
132 template<
typename AFIELD>
136 const double lambda_min,
137 const double lambda_max)
139 vector<double> omega(m_Ns);
140 double bmax = lambda_max/lambda_min;
143 Math_Sign_Zolotarev_Omega sign_func(m_Ns, bmax);
144 sign_func.get_sign_prms(omega, delta);
146 for(
int is = 0; is < m_Ns; ++is){
147 omega[is] = omega[is]/lambda_min;
150 for(
int k = 0; k < m_Ns; ++k){
153 vout.
general(
" max deviation from 1 = %20.14f\n",delta);
155 for(
int is = 0; is < m_Ns; ++is){
156 m_b[is] = 0.5 * (b * omega[is] + c);
157 m_c[is] = 0.5 * (b * omega[is] - c);
166 if(ith == 0) m_mode = mode;
167 m_foprdw->set_mode(mode);
168 #pragma omp barrier // redundant as the set_mode above has barriers