|
@@ -0,0 +1,65 @@
|
|
1
|
+/* This file is part of Lemma, a geophysical modelling and inversion API.
|
|
2
|
+ * More information is available at http://lemmasoftware.org
|
|
3
|
+ */
|
|
4
|
+
|
|
5
|
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
6
|
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
7
|
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
8
|
+ */
|
|
9
|
+
|
|
10
|
+/**
|
|
11
|
+ * @file
|
|
12
|
+ * @date 22/04/19 14:06:32
|
|
13
|
+ * @version $Id$
|
|
14
|
+ * @author Trevor Irons (ti)
|
|
15
|
+ * @email Trevor.Irons@utah.edu
|
|
16
|
+ * @copyright Copyright (c) 2019, University of Utah
|
|
17
|
+ * @copyright Copyright (c) 2019, Lemma Software, LLC
|
|
18
|
+ */
|
|
19
|
+
|
|
20
|
+#include "LemmaCore"
|
|
21
|
+#include <string>
|
|
22
|
+
|
|
23
|
+#include <boost/python.hpp>
|
|
24
|
+#include <boost/python/numpy.hpp>
|
|
25
|
+// Include the headers of MyLib
|
|
26
|
+
|
|
27
|
+//using namespace boost::python;
|
|
28
|
+
|
|
29
|
+namespace bp = boost::python;
|
|
30
|
+namespace np = boost::python::numpy;
|
|
31
|
+
|
|
32
|
+BOOST_PYTHON_MODULE(pyLemmaCore)
|
|
33
|
+{
|
|
34
|
+ Py_Initialize();
|
|
35
|
+ np::initialize();
|
|
36
|
+
|
|
37
|
+ bp::class_<Lemma::RectilinearGrid, boost::noncopyable> ("RectilinearGrid", boost::python::no_init)
|
|
38
|
+
|
|
39
|
+ // print
|
|
40
|
+ .def(boost::python::self_ns::str(bp::self))
|
|
41
|
+
|
|
42
|
+ // Lifecycle
|
|
43
|
+ .def("__init__", boost::python::make_constructor(&Lemma::RectilinearGrid::NewSP))
|
|
44
|
+ //.def("Serialize", &Lemma::RectilinearGrid::Serialize)
|
|
45
|
+ //.def("DeSerialize", &Lemma::RectilinearGrid::DeSerialize)
|
|
46
|
+
|
|
47
|
+ // Accessors
|
|
48
|
+ .def("GetName", &Lemma::RectilinearGrid::GetName)
|
|
49
|
+ .def("GetNx", &Lemma::RectilinearGrid::GetNx)
|
|
50
|
+ .def("GetNy", &Lemma::RectilinearGrid::GetNy)
|
|
51
|
+ .def("GetNz", &Lemma::RectilinearGrid::GetNz)
|
|
52
|
+ .def("GetOx", &Lemma::RectilinearGrid::GetOx)
|
|
53
|
+ .def("GetOy", &Lemma::RectilinearGrid::GetOy)
|
|
54
|
+ .def("GetOz", &Lemma::RectilinearGrid::GetOz)
|
|
55
|
+ //.def("GetDx", &Lemma::RectilinearGrid::GetDx)
|
|
56
|
+ //.def("GetDy", &Lemma::RectilinearGrid::GetDy)
|
|
57
|
+ //.def("GetDz", &Lemma::RectilinearGrid::GetDz)
|
|
58
|
+
|
|
59
|
+ .def("SetDimensions", &Lemma::RectilinearGrid::SetDimensions)
|
|
60
|
+ .def("SetOffset", &Lemma::RectilinearGrid::SetOffset)
|
|
61
|
+ .def("SetSpacing", &Lemma::RectilinearGrid::SetSpacing)
|
|
62
|
+
|
|
63
|
+ ;
|
|
64
|
+
|
|
65
|
+}
|