41 std::unique_ptr<VariantMap> m_params;
45 auto &coulomb = system.coulomb;
48 coulomb.impl->extension = std::nullopt;
49 coulomb.impl->solver = std::nullopt;
50 system.on_coulomb_change();
53 void reset_extension() {
55 auto &coulomb = system.coulomb;
57 coulomb.impl->extension = std::nullopt;
58 system.on_coulomb_change();
62 auto const &
params = *m_params;
77 if (
context()->is_head_node()) {
78 throw std::runtime_error(
79 "Cannot change solver when an extension is active");
86 auto actor = get_value<ObjectRef>(v);
87 auto leaf = std::dynamic_pointer_cast<System::Leaf>(actor);
90 actor->do_call_method(
"activate", {});
100 auto actor = get_value<ObjectRef>(v);
101 auto leaf = std::dynamic_pointer_cast<System::Leaf>(actor);
104 actor->do_call_method(
"activate", {});
115 m_params = std::make_unique<VariantMap>(
params);
121 if (
name ==
"clear") {
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.