ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Public Member Functions | |
CoulombTuningAlgorithm (System::System &system, auto &input_p3m, double prefactor, int timings) | |
void | on_solver_change () const override |
void | setup_logger (bool verbose) override |
std::optional< std::string > | layer_correction_veto_r_cut (double r_cut) const override |
std::tuple< double, double, double, double > | calculate_accuracy (Utils::Vector3i const &mesh, int cao, double r_cut_iL) const override |
void | determine_mesh_limits () override |
TuningAlgorithm::Parameters | get_time () override |
Public Member Functions inherited from TuningAlgorithm | |
TuningAlgorithm (System::System &system, double prefactor, int timings) | |
virtual | ~TuningAlgorithm ()=default |
void | determine_r_cut_limits () |
Determine a sensible range for the real-space cutoff. | |
void | determine_cao_limits (int initial_cao) |
Determine a sensible range for the charge assignment order. | |
void | commit (Utils::Vector3i const &mesh, int cao, double r_cut_iL, double alpha_L) |
Write tuned parameters to the P3M parameter struct. | |
void | tune () |
Protected Member Functions | |
P3MParameters & | get_params () override |
Protected Member Functions inherited from TuningAlgorithm | |
auto | get_n_trials () |
void | increment_n_trials () |
void | reset_n_trials () |
double | get_m_time (Utils::Vector3i const &mesh, int &tuned_cao, double &tuned_r_cut_iL, double &tuned_alpha_L, double &tuned_accuracy) |
Get the optimal alpha and the corresponding computation time for a fixed mesh . | |
double | get_mc_time (Utils::Vector3i const &mesh, int cao, double &tuned_r_cut_iL, double &tuned_alpha_L, double &tuned_accuracy) |
Get the optimal alpha and the corresponding computation time for a fixed mesh and cao . | |
Additional Inherited Members | |
Protected Attributes inherited from TuningAlgorithm | |
System::System & | m_system |
double | m_prefactor |
std::unique_ptr< TuningLogger > | m_logger = nullptr |
int | cao_min = -1 |
int | cao_max = -1 |
int | cao_best = -1 |
double | m_r_cut_iL_min = -1. |
double | m_r_cut_iL_max = -1. |
Static Protected Attributes inherited from TuningAlgorithm | |
static auto constexpr | time_granularity = 2. |
Granularity of the time measurement (milliseconds). | |
static auto constexpr | max_n_consecutive_trials = 20 |
Maximal number of consecutive trials that don't improve runtime. | |
static auto constexpr | time_sentinel = std::numeric_limits<double>::max() |
Value for invalid time measurements. | |
|
inline |
|
inlineoverridevirtual |
Implements TuningAlgorithm.
Definition at line 636 of file p3m.cpp.
References P3MParameters::accuracy, System::System::box_geo, comm_cart, Utils::Array< T, N >::data(), GPU, TuningAlgorithm::m_prefactor, TuningAlgorithm::m_system, Utils::Vector< T, N >::norm(), p3m_k_space_error(), p3m_k_space_error_gpu(), p3m_real_space_error(), p3m_data_struct< FloatType >::params, p3m_data_struct_coulomb< FloatType >::sum_q2, p3m_data_struct_coulomb< FloatType >::sum_qpart, and this_node.
|
inlineoverridevirtual |
Implements TuningAlgorithm.
Definition at line 676 of file p3m.cpp.
References System::System::box_geo, Utils::Vector< T, N >::broadcast(), TuningAlgorithm::m_logger, TuningAlgorithm::m_system, P3MParameters::mesh, p3m_data_struct< FloatType >::params, and p3m_data_struct_coulomb< FloatType >::sum_qpart.
Referenced by CoulombP3MImpl< FloatType, Architecture >::tune().
|
inlineoverrideprotectedvirtual |
Implements TuningAlgorithm.
Definition at line 602 of file p3m.cpp.
References p3m_data_struct< FloatType >::params.
|
inlineoverridevirtual |
Implements TuningAlgorithm.
Definition at line 709 of file p3m.cpp.
References System::System::box_geo, TuningAlgorithm::cao_best, System::System::coulomb, TuningAlgorithm::get_m_time(), TuningAlgorithm::get_n_trials(), Coulomb::Solver::impl, TuningAlgorithm::m_r_cut_iL_max, TuningAlgorithm::m_system, TuningAlgorithm::max_n_consecutive_trials, P3MParameters::mesh, TuningAlgorithm::Parameters::mesh, p3m_data_struct< FloatType >::params, TuningAlgorithm::reset_n_trials(), TuningAlgorithm::time_granularity, and TuningAlgorithm::time_sentinel.
|
inlineoverridevirtual |
Implements TuningAlgorithm.
Definition at line 627 of file p3m.cpp.
References System::System::coulomb, Coulomb::Solver::impl, and TuningAlgorithm::m_system.
|
inlineoverridevirtual |
Implements TuningAlgorithm.
Definition at line 609 of file p3m.cpp.
References TuningAlgorithm::m_system, and System::System::on_coulomb_change().
|
inlineoverridevirtual |
Implements TuningAlgorithm.
Definition at line 611 of file p3m.cpp.
References P3MParameters::accuracy, System::System::box_geo, TuningLogger::Coulomb, GPU, TuningAlgorithm::m_logger, TuningAlgorithm::m_prefactor, TuningAlgorithm::m_system, p3m_data_struct< FloatType >::params, p3m_data_struct_coulomb< FloatType >::sum_q2, p3m_data_struct_coulomb< FloatType >::sum_qpart, and this_node.
Referenced by CoulombP3MImpl< FloatType, Architecture >::tune().