fix(python-bindings): Updated python bindings to new interface
The python bindings now work with the polymorphic reaction class and the CVODE solver
This commit is contained in:
@@ -39,3 +39,12 @@ std::vector<std::tuple<std::string, std::string>> PyDynamicNetworkSolverStrategy
|
||||
describe_callback_context // Method name
|
||||
);
|
||||
}
|
||||
|
||||
std::vector<std::tuple<std::string, std::string>> PySolverContextBase::describe() const {
|
||||
using DescriptionVector = std::vector<std::tuple<std::string, std::string>>;
|
||||
PYBIND11_OVERRIDE_PURE(
|
||||
DescriptionVector,
|
||||
gridfire::solver::SolverContextBase,
|
||||
describe
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,4 +12,9 @@ class PyDynamicNetworkSolverStrategy final : public gridfire::solver::DynamicNet
|
||||
gridfire::NetOut evaluate(const gridfire::NetIn &netIn) override;
|
||||
void set_callback(const std::any &callback) override;
|
||||
[[nodiscard]] std::vector<std::tuple<std::string, std::string>> describe_callback_context() const override;
|
||||
};
|
||||
|
||||
class PySolverContextBase final : public gridfire::solver::SolverContextBase {
|
||||
public:
|
||||
[[nodiscard]] std::vector<std::tuple<std::string, std::string>> describe() const override;
|
||||
};
|
||||
Reference in New Issue
Block a user