22#ifndef ESPRESSO_SRC_CORE_P3M_TUNING_LOGGER_HPP
23#define ESPRESSO_SRC_CORE_P3M_TUNING_LOGGER_HPP
27#if defined(P3M) || defined(DP3M)
38 : m_verbose{verbose}, m_name{std::move(name)}, m_mode{mode} {}
42 std::printf(
"mesh cao r_cut_iL alpha_L err "
43 "rs_err ks_err time [ms]\n");
47 template <
typename... Types>
50 row(parameter_set...);
51 std::printf(
" %-8.2f\n", time);
55 template <
typename... Types>
56 void log_skip(std::string reason, Types... parameter_set)
const {
58 row(parameter_set...);
59 std::printf(
" %s\n", reason.c_str());
65 std::printf(
"%-4d %-3d cao too large for this mesh\n", mesh, cao);
70 int n_particles,
double sum_prop)
const {
72 std::string particle_trait;
73 std::string particle_property;
76 particle_trait =
"charged";
77 particle_property =
"Sum[q_i^2]";
80 particle_trait =
"magnetic";
81 particle_property =
"Sum[mu_i^2]";
84 std::printf(
"%s tune parameters: Accuracy goal = %.5e prefactor = %.5e\n"
85 "System: box_l = %.5e # %s part = %d %s = %.5e\n",
86 m_name.c_str(), accuracy, prefactor, box_l,
87 particle_trait.c_str(), n_particles,
88 particle_property.c_str(), sum_prop);
93 double alpha_L,
double accuracy,
double time)
const {
96 "\nresulting parameters: mesh: (%d, %d, %d), cao: %d, r_cut_iL: %.4e,"
97 "\n alpha_L: %.4e, accuracy: %.4e, time: %.2f\n",
98 mesh[0], mesh[1], mesh[2], cao, r_cut_iL, alpha_L, accuracy, time);
104 std::printf(
"fixed cao %d\n", cao);
110 std::printf(
"fixed r_cut_iL %f\n", r_cut_iL);
116 std::printf(
"fixed mesh (%d, %d, %d)\n", mesh[0], mesh[1], mesh[2]);
127 void row(
int mesh,
int cao,
double r_cut_iL,
double alpha_L,
double accuracy,
128 double rs_err,
double ks_err)
const {
129 std::printf(
"%-4d %-3d %.5e %.5e %.3e %.3e %.3e", mesh, cao, r_cut_iL,
130 alpha_L, accuracy, rs_err, ks_err);
Vector implementation and trait types for boost qvm interoperability.
TuningLogger(bool verbose, std::string name, Mode mode)
void tuning_goals(double accuracy, double prefactor, double box_l, int n_particles, double sum_prop) const
void log_tuning_start() const
void report_fixed_mesh(Utils::Vector3i const &mesh) const
void log_cao_too_large(int mesh, int cao) const
void log_skip(std::string reason, Types... parameter_set) const
void report_fixed_cao(int cao) const
void tuning_results(Utils::Vector3i const &mesh, int cao, double r_cut_iL, double alpha_L, double accuracy, double time) const
void log_success(double time, Types... parameter_set) const
void report_fixed_r_cut_iL(double r_cut_iL) const
This file contains the defaults for ESPResSo.