41template <Arch Architecture>
45 bool m_single_precision;
61 [
this]() {
return not actor()->is_double_precision(); }},
63 [
this]() {
return actor()->p3m_params.alpha_L; }},
65 [
this]() {
return actor()->p3m_params.r_cut_iL; }},
67 [
this]() {
return actor()->p3m_params.mesh; }},
69 [
this]() {
return actor()->p3m_params.mesh_off; }},
71 [
this]() {
return actor()->p3m_params.cao; }},
73 [
this]() {
return actor()->p3m_params.accuracy; }},
75 [
this]() {
return actor()->p3m_params.epsilon; }},
77 [
this]() {
return actor()->p3m_params.a; }},
79 [
this]() {
return actor()->p3m_params.alpha; }},
81 [
this]() {
return actor()->p3m_params.r_cut; }},
83 [
this]() {
return actor()->is_tuned(); }},
85 [
this]() {
return m_tuning.
verbose; }},
87 [
this]() {
return m_tuning.
timings; }},
90#if defined(__clang__) and defined(__cray__)
91 auto const &
range_min = m_tune_limits.first;
92 auto const &
range_max = m_tune_limits.second;
96 std::vector<Variant>
retval = {
110 m_tuning.
limits = {std::nullopt, std::nullopt};
111 if (
params.contains(
"tune_limits")) {
134 throw std::invalid_argument(
"Parameter 'tune_limits' needs 2 values");
137 throw std::domain_error(
"Parameter 'tune_limits' must be > 0");
140 throw std::domain_error(
"Parameter 'tune_limits' must be > 0");
void add_parameters(std::vector< AutoParameter > &¶ms)
virtual void parallel_try_catch(std::function< void()> const &cb) const =0
Common interface for electrostatic actors.
std::shared_ptr< CoreActorClass > m_actor
std::shared_ptr< CoreActorClass > actor()
void set_charge_neutrality_tolerance(VariantMap const ¶ms)
void do_construct(VariantMap const ¶ms) override
Type to indicate no value in Variant.
Context * context() const
Responsible context.
constexpr bool is_none(Variant const &v)
constexpr bool is_type(Variant const &v)
Check is a Variant holds a specific type.
T get_value(Variant const &v)
Extract value of specific type T from a Variant.
std::unordered_map< std::string, Variant > VariantMap
P3M algorithm for long-range Coulomb interaction.
std::shared_ptr< CoulombP3M > new_coulomb_p3m_heffte(P3MParameters &&p3m_params, TuningParameters const &tuning_params, double prefactor, bool single_precision, Arch arch)
static SteepestDescentParameters params
Currently active steepest descent instance.
Structure to hold P3M parameters and some dependent variables.
static constexpr const ReadOnly read_only
Recursive variant implementation.
std::pair< std::optional< int >, std::optional< int > > limits