ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig > Class Template Reference

#include <p3m.impl.definitions.hpp>

Inheritance diagram for CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >:
Collaboration diagram for CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >:

Public Member Functions

 CoulombTuningAlgorithm (System::System &system, auto &input_p3m, double prefactor, int timings, decltype(m_tune_limits) tune_limits)
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::optional< std::string > fft_decomposition_veto (Utils::Vector3i const &mesh_size_r_space) 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.

Static Protected Member Functions

static constexpr std::tuple< int, int, int > get_memory_layout ()

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 = 5.
 Granularity of the time measurement (milliseconds).
static auto constexpr max_n_consecutive_trials = 40
 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.

Detailed Description

template<typename FloatType, Arch Architecture, class FFTConfig>
class CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >

Definition at line 784 of file p3m.impl.definitions.hpp.

Constructor & Destructor Documentation

◆ CoulombTuningAlgorithm()

template<typename FloatType, Arch Architecture, class FFTConfig>
CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >::CoulombTuningAlgorithm ( System::System & system,
auto & input_p3m,
double prefactor,
int timings,
decltype(m_tune_limits) tune_limits )
inline

Definition at line 805 of file p3m.impl.definitions.hpp.

References TuningAlgorithm::TuningAlgorithm().

Member Function Documentation

◆ calculate_accuracy()

template<typename FloatType, Arch Architecture, class FFTConfig>
std::tuple< double, double, double, double > CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >::calculate_accuracy ( Utils::Vector3i const & mesh,
int cao,
double r_cut_iL ) const
inlineoverridevirtual

◆ determine_mesh_limits()

template<typename FloatType, Arch Architecture, class FFTConfig>
void CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >::determine_mesh_limits ( )
inlineoverridevirtual

◆ fft_decomposition_veto()

template<typename FloatType, Arch Architecture, class FFTConfig>
std::optional< std::string > CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >::fft_decomposition_veto ( Utils::Vector3i const & mesh_size_r_space) const
inlineoverridevirtual

Reimplemented from TuningAlgorithm.

Definition at line 837 of file p3m.impl.definitions.hpp.

References comm_cart, CUDA, and get_memory_layout().

◆ get_memory_layout()

template<typename FloatType, Arch Architecture, class FFTConfig>
constexpr std::tuple< int, int, int > CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >::get_memory_layout ( )
inlinestaticconstexprprotected

Definition at line 796 of file p3m.impl.definitions.hpp.

Referenced by fft_decomposition_veto().

◆ get_params()

template<typename FloatType, Arch Architecture, class FFTConfig>
P3MParameters & CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >::get_params ( )
inlineoverrideprotectedvirtual

Implements TuningAlgorithm.

Definition at line 794 of file p3m.impl.definitions.hpp.

◆ get_time()

◆ layer_correction_veto_r_cut()

template<typename FloatType, Arch Architecture, class FFTConfig>
std::optional< std::string > CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >::layer_correction_veto_r_cut ( double r_cut) const
inlineoverridevirtual

Implements TuningAlgorithm.

Definition at line 829 of file p3m.impl.definitions.hpp.

References get_actor_by_type(), and TuningAlgorithm::m_system.

◆ on_solver_change()

template<typename FloatType, Arch Architecture, class FFTConfig>
void CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >::on_solver_change ( ) const
inlineoverridevirtual

Implements TuningAlgorithm.

Definition at line 811 of file p3m.impl.definitions.hpp.

References TuningAlgorithm::m_system.

◆ setup_logger()

template<typename FloatType, Arch Architecture, class FFTConfig>
void CoulombTuningAlgorithm< FloatType, Architecture, FFTConfig >::setup_logger ( bool verbose)
inlineoverridevirtual

The documentation for this class was generated from the following file: