39#error "The FFTW3 library shouldn't be visible in this translation unit"
45template <Arch Architecture>
63 [
this]() {
return not actor()->is_double_precision(); }},
65 [
this]() {
return actor()->dp3m_params.alpha_L; }},
67 [
this]() {
return actor()->dp3m_params.r_cut_iL; }},
69 [
this]() {
return actor()->dp3m_params.mesh; }},
71 [
this]() {
return actor()->dp3m_params.mesh_off; }},
73 [
this]() {
return actor()->dp3m_params.cao; }},
75 [
this]() {
return actor()->dp3m_params.accuracy; }},
77 [
this]() {
return actor()->dp3m_params.epsilon; }},
79 [
this]() {
return actor()->dp3m_params.a; }},
81 [
this]() {
return actor()->dp3m_params.alpha; }},
83 [
this]() {
return actor()->dp3m_params.r_cut; }},
85 [
this]() {
return actor()->is_tuned(); }},
87 [
this]() {
return m_tuning.
verbose; }},
89 [
this]() {
return m_tuning.
timings; }},
92#if defined(__clang__) and defined(__cray__)
93 auto const &
range_min = m_tune_limits.first;
94 auto const &
range_max = m_tune_limits.second;
98 std::vector<Variant>
retval = {
112 m_tuning.
limits = {std::nullopt, std::nullopt};
113 if (
params.contains(
"tune_limits")) {
136 throw std::invalid_argument(
"Parameter 'tune_limits' needs 2 values");
139 throw std::domain_error(
"Parameter 'tune_limits' must be > 0");
142 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 magnetostatic actors.
std::shared_ptr< CoreActorClass > actor()
std::shared_ptr< CoreActorClass > m_actor
void do_construct(VariantMap const ¶ms) override
Type to indicate no value in Variant.
Context * context() const
Responsible context.
P3M algorithm for long-range magnetic dipole-dipole interaction.
std::shared_ptr< DipolarP3M > new_dipolar_p3m_heffte(P3MParameters &&p3m_params, TuningParameters const &tuning_params, double prefactor, bool single_precision, Arch arch)
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
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