Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Multi-dimensional operational domain computation #493

Merged
merged 122 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
3507e07
:sparkles: Added I/O coloring to SiDB layout printing
marcelwa Apr 22, 2024
f0ec553
Merge branch 'refs/heads/main' into opdomain-explorer-additions
marcelwa Apr 26, 2024
744f58c
:art: Changed the default operational/non-operational tags to `1` and…
marcelwa Apr 26, 2024
edee07f
:art: Small changes
marcelwa Apr 26, 2024
2bf056f
Merge branch 'refs/heads/main' into opdomain-explorer-additions
marcelwa May 19, 2024
0e19a75
:memo: Update pyfiction docstrings
actions-user May 19, 2024
69eb8f1
:poop: Save commit, stuff doesn't work yet
marcelwa May 22, 2024
2dc2bf8
:sparkles: Exposed `bdl_input_iterator` in pyfiction
marcelwa May 25, 2024
7afa443
:memo: Added RST documentation
marcelwa May 25, 2024
dbb29ff
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa May 25, 2024
76ba036
:memo: Update pyfiction docstrings
actions-user May 25, 2024
a2c0a45
:thread: First attempt to port grid search from execution policies to…
marcelwa Jun 1, 2024
9b56f49
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Jun 24, 2024
6355dcf
:twisted_rightwards_arrows: Merge
marcelwa Jun 24, 2024
afe01f2
:thread: Rewrite `random_sampling` in `operational_domain.hpp` to use…
marcelwa Jun 24, 2024
e97e833
:memo: Update pyfiction docstrings
actions-user Jun 24, 2024
99a43c7
:art: Reduced code duplication; more work can be done here in `grid_s…
marcelwa Jun 24, 2024
fe72795
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Jun 24, 2024
01a0013
:memo: Update pyfiction docstrings
actions-user Jun 24, 2024
f3d507e
:sparkles: Introduce n-dimensional operational domain computation (ne…
marcelwa Jun 27, 2024
8f5e479
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Jun 27, 2024
73f6cca
:memo: Update pyfiction docstrings
actions-user Jun 27, 2024
efaa081
:art: Small code clean up
marcelwa Jun 27, 2024
b23aef4
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Jun 27, 2024
5326399
:sparkles: Added 3D Moore neighborhood
marcelwa Jul 17, 2024
f0b2890
:white_check_mark: Added test cases for 3-dimensional operational dom…
marcelwa Jul 17, 2024
4b13e7f
:sparkles: Support n-dimensional operational domains in `write_operat…
marcelwa Jul 17, 2024
27d06bc
:memo: Update pyfiction docstrings
actions-user Jul 17, 2024
a4c69ee
Merge branch 'refs/heads/main' into opdomain-explorer-additions
marcelwa Jul 18, 2024
6352489
:sparkles: Support n-dimensional operational domains in experiments
marcelwa Jul 18, 2024
f2d7c24
:sparkles: Added Bestagon experiment script
marcelwa Jul 18, 2024
2189358
:sparkles: Enabled Contour Tracing-based operational domain computati…
marcelwa Jul 19, 2024
3493f83
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Jul 19, 2024
7a39e22
:alembic: Added an operational domain computation experiment script f…
marcelwa Jul 19, 2024
9cef201
:alembic: Added 3D versions of the operational domain computation exp…
marcelwa Jul 23, 2024
4fa155b
:memo: Update pyfiction docstrings
actions-user Jul 23, 2024
9c9d5ad
:sparkles: Added a flag to `write_operational_domain` to skip the wri…
marcelwa Jul 23, 2024
d961796
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Jul 23, 2024
413ef1c
:memo: Update pyfiction docstrings
actions-user Jul 23, 2024
6a0fd27
:zap: Performance improvements by reserving vector space prior to ass…
marcelwa Jul 23, 2024
ef0c071
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Jul 23, 2024
328d4cd
:art: Minor consistency fixes
marcelwa Jul 29, 2024
4d09761
:alembic: Small 3D operational domain experiment adjustments
marcelwa Jul 29, 2024
9e08578
:alembic: Increased number of random samples
marcelwa Jul 29, 2024
e1c1bd4
:alembic: Increased resolution for 3D operational domain experiments
marcelwa Jul 29, 2024
1aefb17
:zap: Improved load-balancing in multithreaded grid search-based oper…
marcelwa Aug 8, 2024
57506f2
:memo: Update pyfiction docstrings
actions-user Aug 8, 2024
dfa15d6
:pencil2: Fixed a typo
marcelwa Aug 8, 2024
763f691
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Aug 8, 2024
b3e3ad8
:memo: Fixed a docstring ambiguity
marcelwa Aug 8, 2024
fd2f179
:memo: Update pyfiction docstrings
actions-user Aug 8, 2024
08d8da6
Merge branch 'main' into opdomain-explorer-additions
Drewniok Aug 8, 2024
1894070
:twisted_rightwards_arrows: conduct merge. Python bindings are not up…
Drewniok Aug 8, 2024
78de1d0
🎨 Incorporated pre-commit fixes
pre-commit-ci[bot] Aug 8, 2024
acfd1e0
:memo: Update pyfiction docstrings
actions-user Aug 8, 2024
8ec2bc4
:twisted_rightwards_arrows: adjust some python APIs
Drewniok Aug 8, 2024
416c270
:art: small adjustments after merge.
Drewniok Aug 9, 2024
4eb4a5f
:memo: Update pyfiction docstrings
actions-user Aug 9, 2024
6c3699a
:arrow_up: use submodule versions from main.
Drewniok Aug 9, 2024
aeeed65
🎨 Incorporated pre-commit fixes
pre-commit-ci[bot] Aug 9, 2024
d807dc8
:art: small fix of experiments after merge.
Drewniok Aug 9, 2024
eda1445
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
Drewniok Aug 9, 2024
4aa22ec
Merge branch 'main' into opdomain-explorer-additions
Drewniok Aug 9, 2024
dceca21
:snake: adjust python binding after merge
Drewniok Aug 9, 2024
48eeb08
:bug: use mutex to avoid race conditions.
Drewniok Aug 9, 2024
0344a19
:memo: Update pyfiction docstrings
actions-user Aug 9, 2024
1dd55f3
:thread: use multithreading for grid_search_for_physically_valid_para…
Drewniok Aug 9, 2024
ef37804
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
Drewniok Aug 9, 2024
ab279a1
:memo: fix docu.
Drewniok Aug 9, 2024
42c9564
:memo: Update pyfiction docstrings
actions-user Aug 9, 2024
32fd1c7
:memo: small fix.
Drewniok Aug 9, 2024
db83f6e
Merge branch 'main' into opdomain-explorer-additions
Drewniok Aug 9, 2024
5112815
:memo: fix missing doc-label.
Drewniok Aug 9, 2024
73fecfe
:memo: Update pyfiction docstrings
actions-user Aug 9, 2024
fd429fe
:white_check_mark: unit test for math utils function.
Drewniok Aug 11, 2024
8d0c22f
:white_check_mark: add unit tests.
Drewniok Aug 11, 2024
c444c72
:white_check_mark: add test for parameter point.
Drewniok Aug 12, 2024
24549ba
:art: Improved consistency in naming, docstrings, formatting, etc.
marcelwa Aug 13, 2024
ee14b1a
:memo: Update pyfiction docstrings
actions-user Aug 13, 2024
2b26f38
:art: Remove unnecessary lock guards
marcelwa Aug 13, 2024
96508f7
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Aug 13, 2024
1cb096e
:art: Remove unnecessary lock guards
marcelwa Aug 13, 2024
b5b22be
:thread: Thread-safe value-retrieval from std::atomic types
marcelwa Aug 13, 2024
64c946d
:art: Minor consistency fixes
marcelwa Aug 14, 2024
5283a07
:thread: Switched std::mutex to std::shared_mutex for parallel read a…
marcelwa Aug 14, 2024
9c0dc56
:memo: Update pyfiction docstrings
actions-user Aug 14, 2024
58c5de2
:thread: Removed the need for manual mutexes and locks in operational…
marcelwa Aug 14, 2024
8706b66
:memo: Update pyfiction docstrings
actions-user Aug 14, 2024
44e8242
Merge branch 'main' into opdomain-explorer-additions
Drewniok Aug 16, 2024
32ff699
Merge branch 'main' into opdomain-explorer-additions
marcelwa Aug 16, 2024
51bee38
Merge branch 'main' into opdomain-explorer-additions
Drewniok Aug 17, 2024
d2e13b0
:children_crossing: Added sweep parameter validity checks
marcelwa Aug 19, 2024
59c989a
:bug: Fixed operational domain z-dimension handling in the CLI's `opd…
marcelwa Aug 19, 2024
088bee2
:bug: Fixed command `tt`'s truth table string parsing
marcelwa Aug 19, 2024
0fe136f
:memo: Added documentation on the new `opdom` CLI functionality
marcelwa Aug 19, 2024
1a7eca2
:memo: Updated the operational domain docstrings for flood fill and c…
marcelwa Aug 19, 2024
19ffd5b
:children_crossing: Added checks for step size values (negative, 0) t…
marcelwa Aug 19, 2024
a3da061
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Aug 19, 2024
760f425
:memo: Clarified docstring
marcelwa Aug 19, 2024
8abc94a
:memo: Fixed a documentation copy-paste bug
marcelwa Aug 19, 2024
3debb91
:art: `const`ness and include cleanup
marcelwa Aug 19, 2024
3fc8b94
:memo: Fixed header date in experiment script
marcelwa Aug 19, 2024
06128a2
:memo: Update pyfiction docstrings
actions-user Aug 19, 2024
3d14d54
:bug: Fixed return value of `operational_domain::get_value`
marcelwa Aug 19, 2024
5357338
:snake: Updated pyfiction docstrings with regard to operational domai…
marcelwa Aug 19, 2024
2b9f60f
:memo: Update pyfiction docstrings
actions-user Aug 19, 2024
278cf4b
:memo: Fixed Python documentation for `bdl_input_iterator`
marcelwa Aug 19, 2024
0e88d45
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Aug 19, 2024
193e273
:art: Removed unused include
marcelwa Aug 19, 2024
05ff17e
:art: Moved `contains_parameter_point` and `find_key_with_tolerance` …
marcelwa Aug 19, 2024
e1f608a
:memo: Update pyfiction docstrings
actions-user Aug 19, 2024
bfb5765
:bug: Added missing forward-declaration to fix compiler error
marcelwa Aug 19, 2024
54ca3e2
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Aug 19, 2024
3eb8e38
:memo: Update pyfiction docstrings
actions-user Aug 19, 2024
91f95de
:bug: Fixed compiler error in `determine_physically_valid_parameters`
marcelwa Aug 19, 2024
abdb2c2
Merge remote-tracking branch 'origin/opdomain-explorer-additions' int…
marcelwa Aug 19, 2024
4da7e0b
:art: Incorporated Jan's feedback
marcelwa Aug 20, 2024
b69819c
:art: Restructured code in an effort to circumvent the alice bug that…
marcelwa Aug 20, 2024
dd88794
:memo: Mentioned CLI bug in docstring
marcelwa Aug 20, 2024
080d9bb
:memo: Update pyfiction docstrings
actions-user Aug 20, 2024
780e80f
:snake: Added `sample_writing_mode` to `write_operational_domain`'s P…
marcelwa Aug 20, 2024
e57edd4
Merge branch 'main' into opdomain-explorer-additions
Drewniok Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
//
// Created by marcel on 19.05.24.
//

#ifndef PYFICTION_BDL_INPUT_ITERATOR_HPP
#define PYFICTION_BDL_INPUT_ITERATOR_HPP

#include "pyfiction/documentation.hpp"
#include "pyfiction/types.hpp"

#include <fiction/algorithms/iter/bdl_input_iterator.hpp>
#include <fiction/algorithms/simulation/sidb/detect_bdl_pairs.hpp>

#include <fmt/format.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <cstdint>
#include <string>

namespace pyfiction
{

namespace detail
{

template <typename Lyt>
void bdl_input_iterator(pybind11::module& m, const std::string& lattice)
{
namespace py = pybind11;
using namespace py::literals;

py::class_<fiction::bdl_input_iterator<Lyt>>(m, fmt::format("bdl_input_iterator_{}", lattice).c_str(),
DOC(fiction_bdl_input_iterator))
.def(py::init<const Lyt&, const fiction::detect_bdl_pairs_params&>(), "lyt"_a,
"params"_a = fiction::detect_bdl_pairs_params{}, DOC(fiction_bdl_input_iterator_bdl_input_iterator))
.def(
"__next__",
[](fiction::bdl_input_iterator<Lyt>& self) -> Lyt&
{
if (self >= ((1ull << self.num_input_pairs()) - 1))
{
throw py::stop_iteration();
}

auto result = *self;
++self;
return result;
},
DOC(fiction_bdl_input_iterator_operator_mul))
.def(
"__eq__", [](const fiction::bdl_input_iterator<Lyt>& self, const uint64_t m) -> bool { return self == m; },
"m"_a, DOC(fiction_bdl_input_iterator_operator_eq))
.def(
"__ne__", [](const fiction::bdl_input_iterator<Lyt>& self, const uint64_t m) -> bool { return self != m; },
"m"_a, DOC(fiction_bdl_input_iterator_operator_ne))
.def(
"__lt__", [](const fiction::bdl_input_iterator<Lyt>& self, const uint64_t m) -> bool { return self < m; },
"m"_a, DOC(fiction_bdl_input_iterator_operator_lt))
.def(
"__le__", [](const fiction::bdl_input_iterator<Lyt>& self, const uint64_t m) -> bool { return self <= m; },
"m"_a, DOC(fiction_bdl_input_iterator_operator_le))
.def(
"__gt__", [](const fiction::bdl_input_iterator<Lyt>& self, const uint64_t m) -> bool { return self > m; },
"m"_a, DOC(fiction_bdl_input_iterator_operator_gt))
.def(
"__ge__", [](const fiction::bdl_input_iterator<Lyt>& self, const uint64_t m) -> bool { return self >= m; },
"m"_a, DOC(fiction_bdl_input_iterator_operator_ge))
.def(
"__add__", [](const fiction::bdl_input_iterator<Lyt>& self, const int m) -> fiction::bdl_input_iterator<Lyt>
{ return self + m; }, "m"_a, DOC(fiction_bdl_input_iterator_operator_add))
.def(
"__iadd__",
[](fiction::bdl_input_iterator<Lyt>& self, const int m) -> fiction::bdl_input_iterator<Lyt>&
{
self += m;
return self;
},
"m"_a, DOC(fiction_bdl_input_iterator_operator_iadd))
.def(
"__sub__", [](const fiction::bdl_input_iterator<Lyt>& self, const int m) { return self - m; }, "m"_a,
DOC(fiction_bdl_input_iterator_operator_sub))
.def(
"__isub__",
[](fiction::bdl_input_iterator<Lyt>& self, const int m) -> fiction::bdl_input_iterator<Lyt>&
{
self -= m;
return self;
},
"m"_a, DOC(fiction_bdl_input_iterator_operator_isub))
.def(
"__getitem__", [](const fiction::bdl_input_iterator<Lyt>& self, int m) -> fiction::bdl_input_iterator<Lyt>
{ return self[m]; }, "m"_a, DOC(fiction_bdl_input_iterator_operator_array))

.def("num_input_pairs", &fiction::bdl_input_iterator<Lyt>::num_input_pairs)
.def("get_layout", [](const fiction::bdl_input_iterator<Lyt>& self) -> const Lyt& { return *self; })

;
}

} // namespace detail

inline void bdl_input_iterator(pybind11::module& m)
{
// NOTE be careful with the order of the following calls! Python will resolve the first matching overload!

detail::bdl_input_iterator<py_sidb_100_lattice>(m, "100");
detail::bdl_input_iterator<py_sidb_111_lattice>(m, "111");
}

} // namespace pyfiction

#endif // PYFICTION_BDL_INPUT_ITERATOR_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
#include "pyfiction/types.hpp"

#include <fiction/algorithms/simulation/sidb/detect_bdl_pairs.hpp>
#include <fiction/technology/cell_technologies.hpp>
#include <fiction/traits.hpp>

#include <fmt/format.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <string>

namespace pyfiction
{

Expand Down Expand Up @@ -49,7 +54,9 @@ inline void detect_bdl_pairs(pybind11::module& m)
.def_readwrite("minimum_distance", &fiction::detect_bdl_pairs_params::minimum_distance,
DOC(fiction_detect_bdl_pairs_params_minimum_distance))
.def_readwrite("maximum_distance", &fiction::detect_bdl_pairs_params::maximum_distance,
DOC(fiction_detect_bdl_pairs_params_maximum_distance));
DOC(fiction_detect_bdl_pairs_params_maximum_distance))

;

// NOTE be careful with the order of the following calls! Python will resolve the first matching overload!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,9 @@ inline void determine_physically_valid_parameters(pybind11::module& m)

py::class_<fiction::operational_domain<fiction::parameter_point, uint64_t>>(m, "physically_valid_parameters_domain",
DOC(fiction_operational_domain))
// todo add docu
.def(py::init<>())
.def_readwrite("x_dimension_parameter",
&fiction::operational_domain<fiction::parameter_point, uint64_t>::x_dimension,
DOC(fiction_operational_domain_x_dimension))
.def_readwrite("y_dimension_parameter",
&fiction::operational_domain<fiction::parameter_point, uint64_t>::y_dimension,
DOC(fiction_operational_domain_y_dimension))
.def_readwrite("dimensions", &fiction::operational_domain<fiction::parameter_point, uint64_t>::dimensions)

.def(
"get_excited_state_number_for_parameter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
#include "pyfiction/documentation.hpp"
#include "pyfiction/types.hpp"

#include <fiction/algorithms/simulation/sidb/is_operational.hpp>
#include <fiction/algorithms/simulation/sidb/operational_domain.hpp>

#include <pybind11/operators.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

#include <string>
#include <vector>

namespace pyfiction
{
Expand Down Expand Up @@ -51,18 +52,10 @@ inline void operational_domain(pybind11::module& m)
namespace py = pybind11;
using namespace pybind11::literals;

py::enum_<fiction::sweep_parameter>(m, "sweep_parameter", DOC(fiction_sweep_parameter))
.value("EPSILON_R", fiction::sweep_parameter::EPSILON_R, DOC(fiction_sweep_parameter_EPSILON_R))
.value("LAMBDA_TF", fiction::sweep_parameter::LAMBDA_TF, DOC(fiction_sweep_parameter_LAMBDA_TF))
.value("MU_MINUS", fiction::sweep_parameter::MU_MINUS, DOC(fiction_sweep_parameter_MU_MINUS))

;

py::class_<fiction::parameter_point>(m, "parameter_point", DOC(fiction_parameter_point))
.def(py::init<>())
.def(py::init<const double, const double>(), "x_val"_a, "y_val"_a)
.def_readwrite("x", &fiction::parameter_point::x, DOC(fiction_parameter_point_x))
.def_readwrite("y", &fiction::parameter_point::y, DOC(fiction_parameter_point_y))
.def(py::init<>(), DOC(fiction_parameter_point_parameter_point))
.def(py::init<const std::vector<double>>(), "values"_a, DOC(fiction_parameter_point_parameter_point_2))
.def_readwrite("parameters", &fiction::parameter_point::parameters, DOC(fiction_parameter_point))

.def(py::self == py::self, "other"_a, DOC(fiction_parameter_point_operator_eq))
.def(py::self != py::self, "other"_a, DOC(fiction_parameter_point_operator_ne))
Expand All @@ -72,19 +65,44 @@ inline void operational_domain(pybind11::module& m)

;

py::enum_<fiction::sweep_parameter>(m, "sweep_parameter", DOC(fiction_sweep_parameter))
.value("EPSILON_R", fiction::sweep_parameter::EPSILON_R, DOC(fiction_sweep_parameter_EPSILON_R))
.value("LAMBDA_TF", fiction::sweep_parameter::LAMBDA_TF, DOC(fiction_sweep_parameter_LAMBDA_TF))
.value("MU_MINUS", fiction::sweep_parameter::MU_MINUS, DOC(fiction_sweep_parameter_MU_MINUS))

;

py::class_<fiction::operational_domain<fiction::parameter_point, fiction::operational_status>>(
m, "operational_domain", DOC(fiction_operational_domain))
.def(py::init<>())
.def_readwrite("x_dimension",
&fiction::operational_domain<fiction::parameter_point, fiction::operational_status>::x_dimension,
DOC(fiction_operational_domain_x_dimension))
.def_readwrite("y_dimension",
&fiction::operational_domain<fiction::parameter_point, fiction::operational_status>::y_dimension,
DOC(fiction_operational_domain_y_dimension))
.def_readwrite("dimensions",
&fiction::operational_domain<fiction::parameter_point, fiction::operational_status>::dimensions,
DOC(fiction_operational_domain_dimensions))
.def_readwrite(
"operational_values",
&fiction::operational_domain<fiction::parameter_point, fiction::operational_status>::operational_values,
DOC(fiction_operational_domain_operational_values));
DOC(fiction_operational_domain_operational_values))

.def("get_value",
&fiction::operational_domain<fiction::parameter_point, fiction::operational_status>::get_value, "point"_a,
DOC(fiction_operational_domain_get_value))

;

py::class_<fiction::operational_domain_value_range>(m, "operational_domain_value_range",
DOC(fiction_operational_domain_value_range))
.def(py::init<fiction::sweep_parameter>(), "dimension"_a)
.def(py::init<fiction::sweep_parameter, double, double, double>(), "dimension"_a, "min"_a, "max"_a, "step"_a)
.def_readwrite("dimension", &fiction::operational_domain_value_range::dimension,
DOC(fiction_operational_domain_value_range_dimension))
.def_readwrite("min", &fiction::operational_domain_value_range::min,
DOC(fiction_operational_domain_value_range_dimension))
.def_readwrite("max", &fiction::operational_domain_value_range::max,
DOC(fiction_operational_domain_value_range_max))
.def_readwrite("step", &fiction::operational_domain_value_range::step,
DOC(fiction_operational_domain_value_range_step))

;

py::class_<fiction::operational_domain_params>(m, "operational_domain_params",
DOC(fiction_operational_domain_params))
Expand All @@ -93,42 +111,30 @@ inline void operational_domain(pybind11::module& m)
DOC(fiction_operational_domain_params_simulation_parameters))
.def_readwrite("sim_engine", &fiction::operational_domain_params::sim_engine,
DOC(fiction_operational_domain_params_sim_engine))
.def_readwrite("x_dimension", &fiction::operational_domain_params::x_dimension,
DOC(fiction_operational_domain_params_x_dimension))
.def_readwrite("x_min", &fiction::operational_domain_params::x_min,
DOC(fiction_operational_domain_params_x_min))
.def_readwrite("x_max", &fiction::operational_domain_params::x_max,
DOC(fiction_operational_domain_params_x_max))
.def_readwrite("x_step", &fiction::operational_domain_params::x_step,
DOC(fiction_operational_domain_params_x_step))
.def_readwrite("y_dimension", &fiction::operational_domain_params::y_dimension,
DOC(fiction_operational_domain_params_y_dimension))
.def_readwrite("y_min", &fiction::operational_domain_params::y_min,
DOC(fiction_operational_domain_params_y_min))
.def_readwrite("y_max", &fiction::operational_domain_params::y_max,
DOC(fiction_operational_domain_params_y_max))
.def_readwrite("y_step", &fiction::operational_domain_params::y_step,
DOC(fiction_operational_domain_params_y_step))
.def_readwrite("sweep_dimensions", &fiction::operational_domain_params::sweep_dimensions,
DOC(fiction_operational_domain_params_sweep_dimensions))
.def_readwrite("bdl_params", &fiction::operational_domain_params::bdl_params,
DOC(fiction_operational_domain_params_bdl_params))

;

py::class_<fiction::operational_domain_stats>(m, "operational_domain_stats", DOC(fiction_operational_domain_stats))
.def(py::init<>())
.def_readwrite("time_total", &fiction::operational_domain_stats::time_total,
DOC(fiction_operational_domain_stats_duration))
.def_readwrite("num_simulator_invocations", &fiction::operational_domain_stats::num_simulator_invocations,
DOC(fiction_operational_domain_stats_num_simulator_invocations))
.def_readwrite("num_evaluated_parameter_combinations",
&fiction::operational_domain_stats::num_evaluated_parameter_combinations,
DOC(fiction_operational_domain_stats_num_evaluated_parameter_combinations))
.def_readwrite("num_operational_parameter_combinations",
&fiction::operational_domain_stats::num_operational_parameter_combinations,
DOC(fiction_operational_domain_stats_num_operational_parameter_combinations))
.def_readwrite("num_non_operational_parameter_combinations",
&fiction::operational_domain_stats::num_non_operational_parameter_combinations,
DOC(fiction_operational_domain_stats_num_non_operational_parameter_combinations));
.def_readonly("time_total", &fiction::operational_domain_stats::time_total,
DOC(fiction_operational_domain_stats_duration))
.def_readonly("num_simulator_invocations", &fiction::operational_domain_stats::num_simulator_invocations,
DOC(fiction_operational_domain_stats_num_simulator_invocations))
.def_readonly("num_evaluated_parameter_combinations",
&fiction::operational_domain_stats::num_evaluated_parameter_combinations,
DOC(fiction_operational_domain_stats_num_evaluated_parameter_combinations))
.def_readonly("num_operational_parameter_combinations",
&fiction::operational_domain_stats::num_operational_parameter_combinations,
DOC(fiction_operational_domain_stats_num_operational_parameter_combinations))
.def_readonly("num_non_operational_parameter_combinations",
&fiction::operational_domain_stats::num_non_operational_parameter_combinations,
DOC(fiction_operational_domain_stats_num_non_operational_parameter_combinations))

;

// NOTE be careful with the order of the following calls! Python will resolve the first matching overload!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,24 @@ inline void write_operational_domain(pybind11::module& m)
namespace py = pybind11;
using namespace py::literals;

py::enum_<fiction::write_operational_domain_params::sample_writing_mode>(
m, "sample_writing_mode", DOC(fiction_write_operational_domain_params_sample_writing_mode))
.value("ALL_SAMPLES", fiction::write_operational_domain_params::sample_writing_mode::ALL_SAMPLES,
DOC(fiction_write_operational_domain_params_sample_writing_mode_ALL_SAMPLES))
.value("OPERATIONAL_ONLY", fiction::write_operational_domain_params::sample_writing_mode::OPERATIONAL_ONLY,
DOC(fiction_write_operational_domain_params_sample_writing_mode_OPERATIONAL_ONLY))

;

py::class_<fiction::write_operational_domain_params>(m, "write_operational_domain_params",
DOC(fiction_write_operational_domain_params))
.def(py::init<>())
.def_readwrite("operational_tag", &fiction::write_operational_domain_params::operational_tag,
DOC(fiction_write_operational_domain_params_operational_tag))
.def_readwrite("non_operational_tag", &fiction::write_operational_domain_params::non_operational_tag,
DOC(fiction_write_operational_domain_params_non_operational_tag))
.def_readwrite("writing_mode", &fiction::write_operational_domain_params::writing_mode,
DOC(fiction_write_operational_domain_params_writing_mode))

;

Expand Down
Loading
Loading