42template <Arch Architecture>
47 bool m_check_complex_residuals;
48 bool m_single_precision;
49 std::pair<std::optional<int>, std::optional<int>> m_tune_limits;
65 [
this]() {
return not actor()->is_double_precision(); }},
67 [
this]() {
return actor()->p3m_params.alpha_L; }},
69 [
this]() {
return actor()->p3m_params.r_cut_iL; }},
71 [
this]() {
return actor()->p3m_params.mesh; }},
73 [
this]() {
return actor()->p3m_params.mesh_off; }},
75 [
this]() {
return actor()->p3m_params.cao; }},
77 [
this]() {
return actor()->p3m_params.accuracy; }},
79 [
this]() {
return actor()->p3m_params.epsilon; }},
81 [
this]() {
return actor()->p3m_params.a; }},
83 [
this]() {
return actor()->p3m_params.alpha; }},
85 [
this]() {
return actor()->p3m_params.r_cut; }},
87 [
this]() {
return actor()->is_tuned(); }},
89 [
this]() {
return m_tune_verbose; }},
91 [
this]() {
return m_tune_timings; }},
95 std::vector<Variant>
retval = {
103 [
this]() {
return m_check_complex_residuals; }},
111 m_tune_limits = {std::nullopt, std::nullopt};
112 if (
params.contains(
"tune_limits")) {
135 throw std::invalid_argument(
"Parameter 'tune_limits' needs 2 values");
137 if (m_tune_limits.first
and *m_tune_limits.first <= 0) {
138 throw std::domain_error(
"Parameter 'tune_limits' must be > 0");
140 if (m_tune_limits.second
and *m_tune_limits.second <= 0) {
141 throw std::domain_error(
"Parameter 'tune_limits' must be > 0");
145 m_check_complex_residuals =
150 throw std::invalid_argument(
151 "P3M GPU only implemented in single-precision mode");
163 m_tune_verbose, m_tune_limits, m_check_complex_residuals);
169 template <
typename FloatType,
class...
Args>
170 void make_handle_impl(
Args &&...
args) {
174 template <
class...
Args>
177 make_handle_impl<
float,
Args...>(std::forward<Args>(
args)...);
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.
This file contains the defaults for ESPResSo.
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
boost::make_recursive_variant< None, bool, int, std::size_t, double, std::string, ObjectRef, Utils::Vector3b, Utils::Vector3i, Utils::Vector2d, Utils::Vector3d, Utils::Vector4d, std::vector< int >, std::vector< double >, std::vector< boost::recursive_variant_ >, std::unordered_map< int, boost::recursive_variant_ >, std::unordered_map< std::string, boost::recursive_variant_ > >::type Variant
Possible types for parameters.
bool is_none(Variant const &v)
P3M algorithm for long-range Coulomb interaction.
static SteepestDescentParameters params
Currently active steepest descent instance.
Structure to hold P3M parameters and some dependent variables.
static constexpr const ReadOnly read_only