|
@@ -34,7 +34,8 @@ PYBIND11_MODULE(LemmaCore, m) {
|
34
|
34
|
|
35
|
35
|
|
36
|
36
|
RectilinearGrid.def(py::init(&Lemma::RectilinearGrid::NewSP))
|
37
|
|
- .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::RectilinearGrid::DeSerialize), "Construct object from yaml representation")
|
|
37
|
+ .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::RectilinearGrid::DeSerialize),
|
|
38
|
+ "Construct object from yaml representation")
|
38
|
39
|
|
39
|
40
|
|
40
|
41
|
.def("__repr__", &Lemma::RectilinearGrid::Print)
|
|
@@ -58,11 +59,35 @@ PYBIND11_MODULE(LemmaCore, m) {
|
58
|
59
|
.def("SetSpacing", &Lemma::RectilinearGrid::SetSpacing, "Sets the grid spacing in x, y, and z")
|
59
|
60
|
;
|
60
|
61
|
|
|
62
|
+ py::class_<Lemma::RectilinearGridReader, std::shared_ptr<Lemma::RectilinearGridReader> > RectilinearGridReader(m, "RectilinearGridReader");
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+ RectilinearGridReader.def(py::init(&Lemma::RectilinearGridReader::NewSP))
|
|
66
|
+ .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::RectilinearGridReader::DeSerialize),
|
|
67
|
+ "Construct object from yaml representation")
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+ .def("__repr__", &Lemma::RectilinearGridReader::Print)
|
|
71
|
+ .def("Serialize", &Lemma::RectilinearGridReader::Print, "YAML representation of the class")
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+ .def("GetName", &Lemma::RectilinearGridReader::GetName, "Returns the name of the class")
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+ .def("ReadASCIIGridFile", &Lemma::RectilinearGridReader::ReadASCIIGridFile, "Opens file specified by argument")
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+ .def("GetGrid", &Lemma::RectilinearGridReader::GetGrid, "Returns the grid object")
|
|
83
|
+ ;
|
|
84
|
+
|
61
|
85
|
py::class_<Lemma::ASCIIParser, std::shared_ptr<Lemma::ASCIIParser> > ASCIIParser(m, "ASCIIParser");
|
62
|
86
|
|
63
|
87
|
|
64
|
88
|
ASCIIParser.def(py::init(&Lemma::ASCIIParser::NewSP))
|
65
|
|
- .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::ASCIIParser::DeSerialize), "Construct object from yaml representation")
|
|
89
|
+ .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::ASCIIParser::DeSerialize),
|
|
90
|
+ "Construct object from yaml representation")
|
66
|
91
|
|
67
|
92
|
|
68
|
93
|
.def("__repr__", &Lemma::ASCIIParser::Print)
|
|
@@ -90,7 +115,8 @@ PYBIND11_MODULE(LemmaCore, m) {
|
90
|
115
|
|
91
|
116
|
|
92
|
117
|
.def(py::init(&Lemma::CubicSplineInterpolator::NewSP))
|
93
|
|
- .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::CubicSplineInterpolator::DeSerialize), "Construct object from yaml representation")
|
|
118
|
+ .def_static("DeSerialize", py::overload_cast<const std::string&>(&Lemma::CubicSplineInterpolator::DeSerialize),
|
|
119
|
+ "Construct object from yaml representation")
|
94
|
120
|
|
95
|
121
|
|
96
|
122
|
.def("__repr__", &Lemma::CubicSplineInterpolator::Print)
|
|
@@ -103,14 +129,19 @@ PYBIND11_MODULE(LemmaCore, m) {
|
103
|
129
|
|
104
|
130
|
|
105
|
131
|
.def("SetKnots", &Lemma::CubicSplineInterpolator::SetKnots, "Sets the knots to use for interpolation")
|
106
|
|
- .def("ResetKnotOrdinate", &Lemma::CubicSplineInterpolator::ResetKnotOrdinate, "Resets the knots to use for interpolation, when abscissa values haven't changed")
|
|
132
|
+ .def("ResetKnotOrdinate", &Lemma::CubicSplineInterpolator::ResetKnotOrdinate,
|
|
133
|
+ "Resets the knots to use for interpolation, when abscissa values haven't changed")
|
107
|
134
|
|
108
|
135
|
|
109
|
136
|
.def("InterpolateOrderedSet", &Lemma::CubicSplineInterpolator::InterpolateOrderedSet, "Interpolate a monotonically increasing ordered set.")
|
110
|
|
- .def("Integrate", py::overload_cast<const Lemma::Real&, const Lemma::Real& >(&Lemma::CubicSplineInterpolator::Integrate), "Integrates between the arguments using cubic spline values.")
|
111
|
|
- .def("IntegrateN", py::overload_cast<const Lemma::Real&, const Lemma::Real&, const int& >(&Lemma::CubicSplineInterpolator::Integrate), "Integrates the spline from x0 to x1. Uses composite Simpson's rule and n is the number of segments")
|
112
|
|
- .def("Interpolate", py::overload_cast<const Lemma::Real& >(&Lemma::CubicSplineInterpolator::Interpolate), "Interpolation at a single point, x is the interpolation abscissa point, returns the ordinate value at x")
|
113
|
|
- .def("InterpolateI", py::overload_cast<const Lemma::Real&, int& >(&Lemma::CubicSplineInterpolator::Interpolate), "Interpolation at a single point, x is the interpolation abscissa point and i is the knot to begin searchin at returns the ordinate value at x")
|
|
137
|
+ .def("Integrate", py::overload_cast<const Lemma::Real&, const Lemma::Real& >(&Lemma::CubicSplineInterpolator::Integrate),
|
|
138
|
+ "Integrates between the arguments using cubic spline values.")
|
|
139
|
+ .def("IntegrateN", py::overload_cast<const Lemma::Real&, const Lemma::Real&, const int& >(&Lemma::CubicSplineInterpolator::Integrate),
|
|
140
|
+ "Integrates the spline from x0 to x1. Uses composite Simpson's rule and n is the number of segments")
|
|
141
|
+ .def("Interpolate", py::overload_cast<const Lemma::Real& >(&Lemma::CubicSplineInterpolator::Interpolate),
|
|
142
|
+ "Interpolation at a single point, x is the interpolation abscissa point, returns the ordinate value at x")
|
|
143
|
+ .def("InterpolateI", py::overload_cast<const Lemma::Real&, int& >(&Lemma::CubicSplineInterpolator::Interpolate),
|
|
144
|
+ "Interpolation at a single point, x is the interpolation abscissa point and i is the knot to begin searchin at returns the ordinate value at x")
|
114
|
145
|
|
115
|
146
|
;
|
116
|
147
|
|