|
23 | 23 | * |
24 | 24 | * BSD-style license, see pybind11 LICENSE file. |
25 | 25 | */ |
26 | | - |
27 | | -#include <pybind11/pybind11.h> |
28 | | -#include <pybind11/stl.h> |
29 | | -#include <pybind11/stl_bind.h> |
30 | | - |
31 | | -#include "openPMD/Iteration.hpp" |
32 | | -#include "openPMD/Mesh.hpp" |
33 | | -#include "openPMD/ParticlePatches.hpp" |
34 | | -#include "openPMD/ParticleSpecies.hpp" |
35 | | -#include "openPMD/Record.hpp" |
36 | | -#include "openPMD/Series.hpp" |
37 | | -#include "openPMD/backend/BaseRecord.hpp" |
38 | | -#include "openPMD/backend/BaseRecordComponent.hpp" |
39 | 26 | #include "openPMD/backend/Container.hpp" |
40 | | -#include "openPMD/backend/MeshRecordComponent.hpp" |
41 | | -#include "openPMD/backend/PatchRecord.hpp" |
42 | | -#include "openPMD/backend/PatchRecordComponent.hpp" |
| 27 | + |
| 28 | +#include "openPMD/binding/python/Common.hpp" |
43 | 29 |
|
44 | 30 | #include <cstddef> |
45 | 31 | #include <memory> |
46 | 32 | #include <sstream> |
47 | 33 | #include <string> |
48 | 34 | #include <utility> |
49 | 35 |
|
50 | | -namespace py = pybind11; |
51 | | -using namespace openPMD; |
52 | | - |
53 | 36 | namespace detail |
54 | 37 | { |
55 | 38 | /* based on std_bind.h in pybind11 |
@@ -156,27 +139,6 @@ bind_container(py::handle scope, std::string const &name, Args &&...args) |
156 | 139 | } |
157 | 140 | } // namespace detail |
158 | 141 |
|
159 | | -using PyIterationContainer = Series::IterationsContainer_t; |
160 | | -using PyMeshContainer = Container<Mesh>; |
161 | | -using PyPartContainer = Container<ParticleSpecies>; |
162 | | -using PyPatchContainer = Container<ParticlePatches>; |
163 | | -using PyRecordContainer = Container<Record>; |
164 | | -using PyPatchRecordContainer = Container<PatchRecord>; |
165 | | -using PyRecordComponentContainer = Container<RecordComponent>; |
166 | | -using PyMeshRecordComponentContainer = Container<MeshRecordComponent>; |
167 | | -using PyPatchRecordComponentContainer = Container<PatchRecordComponent>; |
168 | | -using PyBaseRecordComponentContainer = Container<BaseRecordComponent>; |
169 | | -PYBIND11_MAKE_OPAQUE(PyIterationContainer) |
170 | | -PYBIND11_MAKE_OPAQUE(PyMeshContainer) |
171 | | -PYBIND11_MAKE_OPAQUE(PyPartContainer) |
172 | | -PYBIND11_MAKE_OPAQUE(PyPatchContainer) |
173 | | -PYBIND11_MAKE_OPAQUE(PyRecordContainer) |
174 | | -PYBIND11_MAKE_OPAQUE(PyPatchRecordContainer) |
175 | | -PYBIND11_MAKE_OPAQUE(PyRecordComponentContainer) |
176 | | -PYBIND11_MAKE_OPAQUE(PyMeshRecordComponentContainer) |
177 | | -PYBIND11_MAKE_OPAQUE(PyPatchRecordComponentContainer) |
178 | | -PYBIND11_MAKE_OPAQUE(PyBaseRecordComponentContainer) |
179 | | - |
180 | 142 | void init_Container(py::module &m) |
181 | 143 | { |
182 | 144 | ::detail::bind_container<PyIterationContainer>(m, "Iteration_Container"); |
|
0 commit comments