3 Комити

Аутор SHA1 Порука Датум
  Trevor Irons 3bfa3f188c pybind additions пре 3 година
  Trevor Irons 0b7f2462f4 Merge branch 'master' of https://lemma.codes/LemmaSoftware/Lemma пре 3 година
  Trevor Irons 5577a61e40 Windows Fixes пре 3 година

+ 1
- 0
CMake/SuperBuild.cmake Прегледај датотеку

@@ -74,6 +74,7 @@ endif()
74 74
 
75 75
 if (LEMMA_PYTHON3_BINDINGS)
76 76
     if (pybind11_FOUND)
77
+	    find_package(PythonLibs 3.0 REQUIRED)
77 78
         message( STATUS "pybind11 was found" )
78 79
     else()
79 80
         message( STATUS "pybind11 was NOT found, please build or remove LEMMA_PYTHON3_BINDINGS" )

+ 6
- 1
CMakeLists.txt Прегледај датотеку

@@ -296,7 +296,12 @@ endif()
296 296
 option( MSVC_EXTENDED_ALIGNMENT "Turn on MSVC compiler definition _ENABLE_EXTENDED_ALIGNED_STORAGE " OFF  )
297 297
 if (MSVC_EXTENDED_ALIGNMENT)
298 298
     add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
299
-    SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} /LTCG")
299
+    #if (${CMAKE_BUILD_TYPE} STREQUAL "Release") 
300
+    #    SET(CMAKE_EXE_LINKER_FLAGS     "${CMAKE_EXE_LINKER_FLAGS}    /LTCG")
301
+    #    SET(CMAKE_SHARED_LINKER_FLAGS  "${CMAKE_SHARED_LINKER_FLAGS} /LTCG")
302
+    #    SET(CMAKE_STATIC_LINKER_FLAGS  "${CMAKE_STATIC_LINKER_FLAGS} /LTCG")
303
+    #    SET(CMAKE_MODULE_LINKER_FLAGS  "${CMAKE_MODULE_LINKER_FLAGS} /LTCG")
304
+    #endif()
300 305
     #add_definitions(-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE)
301 306
     #set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
302 307
     #include(GenerateExportHeader)

+ 4
- 5
Modules/FDEM1D/include/EMEarth1D.h Прегледај датотеку

@@ -53,8 +53,7 @@ namespace Lemma {
53 53
     // =======================================================================
54 54
     class EMEarth1D : public LemmaObject {
55 55
 
56
-		friend std::ostream &operator<<(std::ostream &stream,
57
-			const EMEarth1D &ob);
56
+	friend std::ostream &operator<<(std::ostream &stream, const EMEarth1D &ob);
58 57
 
59 58
         public:
60 59
 
@@ -66,10 +65,10 @@ namespace Lemma {
66 65
             explicit EMEarth1D ( const ctor_key& );
67 66
 
68 67
             /** Default protected constructor. */
69
-			EMEarth1D ( const YAML::Node& node, const ctor_key& );
68
+            EMEarth1D ( const YAML::Node& node, const ctor_key& );
70 69
 
71 70
             /** Default protected constructor. */
72
-            ~EMEarth1D ();
71
+            virtual ~EMEarth1D ();
73 72
 
74 73
             /**
75 74
              *  Returns pointer to new EMEarth1D. Location is
@@ -81,7 +80,7 @@ namespace Lemma {
81 80
 
82 81
             /** stream debugging info to std::out
83 82
              */
84
-            void Query();
83
+            //void Query();
85 84
 
86 85
             /** YAML Serializing method
87 86
              */

+ 3
- 5
Modules/FDEM1D/python/CMakeLists.txt Прегледај датотеку

@@ -1,12 +1,10 @@
1 1
 
2 2
 #pybind11_add_module(pyFDEM1D   MODULE pyFDEM1D.cpp)
3 3
 add_library(pyFDEM1D MODULE pyFDEM1D.cpp)
4
-target_link_libraries(pyFDEM1D PRIVATE pybind11::module lemmacore fdem1d )
4
+target_link_libraries(pyFDEM1D PRIVATE pybind11::module lemmacore fdem1d)
5 5
 set_target_properties(pyFDEM1D PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}"
6
-	SUFFIX "${PYTHON_MODULE_EXTENSION}"
7
-    OUTPUT_NAME "FDEM1D"
8
-	CXX_STANDARD 14 
9
-	CXX_STANDARD_REQUIRED ON
6
+	                       SUFFIX "${PYTHON_MODULE_EXTENSION}"
7
+                               OUTPUT_NAME "FDEM1D"
10 8
 )
11 9
 
12 10
 install(TARGETS pyFDEM1D

+ 7
- 5
Modules/FDEM1D/python/pyFDEM1D.cpp Прегледај датотеку

@@ -27,7 +27,6 @@ namespace py = pybind11;
27 27
 PYBIND11_MODULE(FDEM1D, m) {
28 28
 
29 29
     py::add_ostream_redirect(m, "ostream_redirect");
30
-
31 30
     m.doc() = "Python binding of Lemma::FDEM1D, additional details can be found at https://lemmasoftware.org";
32 31
 
33 32
 
@@ -230,11 +229,13 @@ PYBIND11_MODULE(FDEM1D, m) {
230 229
             "Calculates complex resistivity based on cole-cole parameters")
231 230
         ;
232 231
 
232
+
233 233
     py::class_<Lemma::EMEarth1D, std::shared_ptr<Lemma::EMEarth1D> >
234 234
         EMEarth1D(m, "EMEarth1D");
235 235
 
236 236
         // lifecycle
237 237
         EMEarth1D.def(py::init(&Lemma::EMEarth1D::NewSP))
238
+/*
238 239
         //.def_static("DeSerialize", py::overload_cast<const std::string&>
239 240
         //    (&Lemma::EMEarth1D::DeSerialize),"Construct object from yaml representation")
240 241
 
@@ -264,15 +265,18 @@ PYBIND11_MODULE(FDEM1D, m) {
264 265
             "Sets the TxRx mode flag")
265 266
 
266 267
         //methods
267
-#ifdef KIHALEE_EM1D
268
+	#ifdef KIHALEE_EM1D
268 269
         .def("MakeCalc", &Lemma::EMEarth1D::MakeCalc, "Calls KiHa Lee's EM1D FORTRAN77 code")
269
-#endif
270
+	#endif
270 271
 
271 272
         .def("MakeCalc3", &Lemma::EMEarth1D::MakeCalc3, "Native Lemma EM calculation")
272 273
         .def("CalculateWireAntennaFields", &Lemma::EMEarth1D::CalculateWireAntennaFields,
273 274
             "Native Lemma calculation of a wire antenna")
275
+*/
276
+
274 277
         ;
275 278
 
279
+
276 280
     py::class_<Lemma::FieldPoints, std::shared_ptr<Lemma::FieldPoints> >
277 281
         FieldPoints(m, "FieldPoints");
278 282
 
@@ -337,5 +341,3 @@ PYBIND11_MODULE(FDEM1D, m) {
337 341
 
338 342
         ;
339 343
 }
340
-
341
-

+ 3
- 1
Modules/FDEM1D/src/EMEarth1D.cpp Прегледај датотеку

@@ -182,6 +182,7 @@ namespace Lemma {
182 182
         HankelType = type;
183 183
     }
184 184
 
185
+    /*
185 186
     void EMEarth1D::Query() {
186 187
         std::cout << "EmEarth1D::Query()" << std::endl;
187 188
 
@@ -201,6 +202,7 @@ namespace Lemma {
201 202
 
202 203
         std::cout << "icalcinner " << icalcinner << std::endl;
203 204
     }
205
+    */
204 206
 
205 207
     // ====================  OPERATIONS    ===================================
206 208
 
@@ -276,7 +278,7 @@ namespace Lemma {
276 278
 
277 279
             } else if (Receivers->GetNumberOfPoints() > Antenna->GetNumberOfFrequencies()) {
278 280
 
279
-                //** Progress display bar for long calculations */
281
+                /* Progress display bar for long calculations */
280 282
                 std::unique_ptr<ProgressBar> mdisp;
281 283
                 if (progressbar) {
282 284
                     mdisp = std::make_unique< ProgressBar > ( Receivers->GetNumberOfPoints()*Antenna->GetNumberOfFrequencies() );

+ 2
- 0
Modules/LemmaCore/python/CMakeLists.txt Прегледај датотеку

@@ -7,6 +7,8 @@ target_link_libraries(pyLemmaCore PRIVATE pybind11::module lemmacore )
7 7
 set_target_properties(pyLemmaCore PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}"
8 8
                                              SUFFIX "${PYTHON_MODULE_EXTENSION}"
9 9
                                              OUTPUT_NAME "LemmaCore"
10
+					     CXX_STANDARD 14 
11
+					     CXX_STANDARD_REQUIRED ON
10 12
 )
11 13
 
12 14
 

Loading…
Откажи
Сачувај