|
@@ -31,22 +31,24 @@ PYBIND11_MODULE(FDEM1D, m) {
|
31
|
31
|
m.doc() = "Python binding of Lemma::FDEM1D, additional details can be found at https://lemmasoftware.org";
|
32
|
32
|
|
33
|
33
|
|
34
|
|
- py::class_<Lemma::WireAntenna, std::shared_ptr<Lemma::WireAntenna> > WireAntenna(m, "WireAntenna"); //, py::dynamic_attr());
|
|
34
|
+ py::class_<Lemma::WireAntenna, std::shared_ptr<Lemma::WireAntenna> > WireAntenna(m, "WireAntenna");
|
35
|
35
|
|
36
|
36
|
// lifecycle
|
37
|
37
|
WireAntenna.def(py::init(&Lemma::WireAntenna::NewSP))
|
38
|
|
- .def("Serialize", &Lemma::WireAntenna::Print, "YAML representation of the class")
|
39
|
38
|
.def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::WireAntenna::DeSerialize), "Construct object from yaml representation")
|
40
|
39
|
|
41
|
40
|
// print
|
|
41
|
+ .def("Serialize", &Lemma::WireAntenna::Print, "YAML representation of the class")
|
42
|
42
|
.def("__repr__", &Lemma::WireAntenna::Print)
|
43
|
43
|
|
44
|
44
|
// modifiers
|
45
|
45
|
.def("SetNumberOfPoints", &Lemma::WireAntenna::SetNumberOfPoints, "Sets the number of points comprising the antenna")
|
46
|
46
|
.def("SetPoint", py::overload_cast<const int&, const Lemma::Real&, const Lemma::Real&, const Lemma::Real&>(&Lemma::WireAntenna::SetPoint), "Sets a point in the antenna")
|
47
|
|
- .def("SetPoint", py::overload_cast<const int&, const Lemma::Vector3r&>(&Lemma::WireAntenna::SetPoint), "Sets a point in the antenna")
|
|
47
|
+ .def("SetPoint", py::overload_cast<const int&, const Lemma::Vector3r&>(&Lemma::WireAntenna::SetPoint),
|
|
48
|
+ "Sets a point in the antenna")
|
48
|
49
|
.def("SetNumberOfTurns", &Lemma::WireAntenna::SetNumberOfTurns, "Sets the number of turns of the antenna")
|
49
|
|
- .def("SetNumberOfFrequencies", &Lemma::WireAntenna::SetNumberOfFrequencies, "Sets the number of frequencies of the transmitter")
|
|
50
|
+ .def("SetNumberOfFrequencies", &Lemma::WireAntenna::SetNumberOfFrequencies,
|
|
51
|
+ "Sets the number of frequencies of the transmitter")
|
50
|
52
|
.def("SetFrequency", &Lemma::WireAntenna::SetFrequency, "Sets a single frequency of the transmitter")
|
51
|
53
|
.def("SetCurrent", &Lemma::WireAntenna::SetCurrent, "Sets the current of the transmitter in amps")
|
52
|
54
|
|
|
@@ -54,20 +56,24 @@ PYBIND11_MODULE(FDEM1D, m) {
|
54
|
56
|
.def("GetCurrent", &Lemma::WireAntenna::GetCurrent, "Returns the current of the transmitter in amps")
|
55
|
57
|
.def("GetPoints", &Lemma::WireAntenna::GetPoints, "Returns the points defining the transmitter")
|
56
|
58
|
.def("GetNumberOfDipoles", &Lemma::WireAntenna::GetNumberOfDipoles, "Returns the number of dipoles defining the transmitter")
|
57
|
|
- .def("GetNumberOfFrequencies", &Lemma::WireAntenna::GetNumberOfFrequencies, "Returns the number of frequencies for the transmitter")
|
|
59
|
+ .def("GetNumberOfFrequencies", &Lemma::WireAntenna::GetNumberOfFrequencies,
|
|
60
|
+ "Returns the number of frequencies for the transmitter")
|
58
|
61
|
.def("IsHorizontallyPlanar", &Lemma::WireAntenna::IsHorizontallyPlanar, "Returns true if the transmitter is flat")
|
59
|
62
|
.def("GetName", &Lemma::WireAntenna::GetName, "Returns the class name of the object")
|
60
|
63
|
|
61
|
64
|
// operations
|
62
|
|
- .def("ApproximateWithElectricDipoles", &Lemma::WireAntenna::ApproximateWithElectricDipoles, "Approximates loop with electric dipoles")
|
|
65
|
+ .def("ApproximateWithElectricDipoles", &Lemma::WireAntenna::ApproximateWithElectricDipoles,
|
|
66
|
+ "Approximates loop with electric dipoles")
|
63
|
67
|
|
64
|
68
|
;
|
65
|
69
|
|
66
|
|
- py::class_<Lemma::PolygonalWireAntenna, std::shared_ptr<Lemma::PolygonalWireAntenna> > PolygonalWireAntenna(m, "PolygonalWireAntenna", WireAntenna); //, py::dynamic_attr())
|
|
70
|
+ py::class_<Lemma::PolygonalWireAntenna, std::shared_ptr<Lemma::PolygonalWireAntenna> > PolygonalWireAntenna(m,
|
|
71
|
+ "PolygonalWireAntenna", WireAntenna);
|
67
|
72
|
|
68
|
73
|
// lifecycle
|
69
|
74
|
PolygonalWireAntenna.def(py::init(&Lemma::PolygonalWireAntenna::NewSP))
|
70
|
|
- .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::PolygonalWireAntenna::DeSerialize), "Construct object from yaml representation")
|
|
75
|
+ .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::PolygonalWireAntenna::DeSerialize),
|
|
76
|
+ "Construct object from yaml representation")
|
71
|
77
|
|
72
|
78
|
// print
|
73
|
79
|
.def("__repr__", &Lemma::PolygonalWireAntenna::Print)
|
|
@@ -76,14 +82,23 @@ PYBIND11_MODULE(FDEM1D, m) {
|
76
|
82
|
// accessors
|
77
|
83
|
.def("GetName", &Lemma::PolygonalWireAntenna::GetName, "Returns the name of the class")
|
78
|
84
|
|
79
|
|
- // modifiers
|
80
|
|
- //.def("SetNumberOfPoints", &Lemma::WireAntenna::SetNumberOfPoints, "Sets the number of points comprising the antenna")
|
81
|
|
-
|
82
|
85
|
// operations
|
83
|
|
- .def("ApproximateWithElectricDipoles", &Lemma::PolygonalWireAntenna::ApproximateWithElectricDipoles, "Approximates loop with series of electric dipoles around loop")
|
|
86
|
+ .def("ApproximateWithElectricDipoles", &Lemma::PolygonalWireAntenna::ApproximateWithElectricDipoles,
|
|
87
|
+ "Approximates loop with series of electric dipoles around loop")
|
84
|
88
|
|
85
|
89
|
;
|
86
|
90
|
|
|
91
|
+ //py::class_<Lemma::DipoleSource, std::shared_ptr<Lemma::DipoleSource> > DipoleSource(m, "DipoleSource");
|
|
92
|
+
|
|
93
|
+ // lifecycle
|
|
94
|
+ //DipoleSource.def(py::init(&Lemma::DipoleSource::NewSP))
|
|
95
|
+ //.def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::DipoleSource::DeSerialize), "Construct object from yaml representation")
|
|
96
|
+
|
|
97
|
+ // print
|
|
98
|
+ //.def("Serialize", &Lemma::DipoleSource::Print, "YAML representation of the class")
|
|
99
|
+ //.def("__repr__", &Lemma::DipoleSource::Print)
|
|
100
|
+
|
|
101
|
+ //;
|
87
|
102
|
}
|
88
|
103
|
|
89
|
104
|
|