14 template<
typename AFIELD>
16 =
"Action_F_Rational_alt";
19 template<
typename AFIELD>
27 template<
typename AFIELD>
35 template<
typename AFIELD>
38 const string str_vlevel = params.
get_string(
"verbose_level");
44 template<
typename AFIELD>
48 m_fopr_langev->set_config(U);
49 m_fopr_H->set_config(U);
50 m_fopr_force_MD->set_config(U);
55 template<
typename AFIELD>
58 const int NinF = m_fopr_langev->field_nin();
59 const int NvolF = m_fopr_langev->field_nvol();
60 const int NexF = m_fopr_langev->field_nex();
63 m_psf.reset(NinF, NvolF, NexF);
65 vout.
general(m_vl,
" %s: %s\n", class_name.c_str(), m_label.c_str());
67 Field xi(NinF, NvolF, NexF);
70 AFIELD xiA(NinF, NvolF, NexF);
72 Index_lex_alt<real_t, AFIELD::IMPL> index_alt;
76 if (m_fopr_langev->needs_convert()) {
77 m_fopr_langev->convert(xiA, xi);
83 m_fopr_langev->set_config(m_U);
84 m_fopr_langev->mult(m_psf, xiA);
86 double xi2 = xi.
norm();
87 double H_psf = xi2 * xi2;
89 vout.
general(m_vl,
" H_Frational = %18.8f\n", H_psf);
90 vout.
general(m_vl,
" H_F/dof = %18.8f\n", H_psf / size_psf);
97 template<
typename AFIELD>
100 const int NinF = m_fopr_H->field_nin();
101 const int NvolF = m_fopr_H->field_nvol();
102 const int NexF = m_fopr_H->field_nex();
105 vout.
general(m_vl,
" %s: %s\n", class_name.c_str(), m_label.c_str());
107 AFIELD v1(NinF, NvolF, NexF);
108 m_fopr_H->set_config(m_U);
109 m_fopr_H->mult(v1, m_psf);
111 double H_psf =
dot(v1, m_psf);
113 vout.
general(m_vl,
" H_Frational = %18.8f\n", H_psf);
114 vout.
general(m_vl,
" H_F/dof = %18.8f\n", H_psf / size_psf);
121 template<
typename AFIELD>
124 vout.
general(m_vl,
" %s: %s\n", class_name.c_str(), m_label.c_str());
130 const int Nin = m_U->nin();
131 const int Nvol = m_U->nvol();
132 const int Nex = m_U->nex();
134 assert(force.
nin() == Nin);
135 assert(force.
nvol() == Nvol);
136 assert(force.
nex() == Nex);
138 AFIELD force1(Nin, Nvol, Nex);
140 m_fopr_force_MD->set_config(m_U);
141 m_fopr_force_MD->force_core(force1, m_psf);
143 Index_lex_alt<real_t, AFIELD::IMPL> index_lex;
149 double Fave, Fmax, Fdev;
150 force.
stat(Fave, Fmax, Fdev);
151 vout.
general(m_vl,
" Fave = %12.6f Fmax = %12.6f Fdev = %12.6f\n",
156 vout.
general(m_vl,
" elapsed time: %12.6f [sec]\n", elapsed_time);