2 Commits

Author SHA1 Message Date
  Trevor Irons 0b7f2462f4 Merge branch 'master' of https://lemma.codes/LemmaSoftware/Lemma 3 years ago
  Trevor Irons 5577a61e40 Windows Fixes 3 years ago

+ 1
- 0
CMake/SuperBuild.cmake View File

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

+ 6
- 1
CMakeLists.txt View File

296
 option( MSVC_EXTENDED_ALIGNMENT "Turn on MSVC compiler definition _ENABLE_EXTENDED_ALIGNED_STORAGE " OFF  )
296
 option( MSVC_EXTENDED_ALIGNMENT "Turn on MSVC compiler definition _ENABLE_EXTENDED_ALIGNED_STORAGE " OFF  )
297
 if (MSVC_EXTENDED_ALIGNMENT)
297
 if (MSVC_EXTENDED_ALIGNMENT)
298
     add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
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
     #add_definitions(-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE)
305
     #add_definitions(-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE)
301
     #set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
306
     #set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
302
     #include(GenerateExportHeader)
307
     #include(GenerateExportHeader)

+ 4
- 5
Modules/FDEM1D/include/EMEarth1D.h View File

53
     // =======================================================================
53
     // =======================================================================
54
     class EMEarth1D : public LemmaObject {
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
         public:
58
         public:
60
 
59
 
66
             explicit EMEarth1D ( const ctor_key& );
65
             explicit EMEarth1D ( const ctor_key& );
67
 
66
 
68
             /** Default protected constructor. */
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
             /** Default protected constructor. */
70
             /** Default protected constructor. */
72
-            ~EMEarth1D ();
71
+            virtual ~EMEarth1D ();
73
 
72
 
74
             /**
73
             /**
75
              *  Returns pointer to new EMEarth1D. Location is
74
              *  Returns pointer to new EMEarth1D. Location is
81
 
80
 
82
             /** stream debugging info to std::out
81
             /** stream debugging info to std::out
83
              */
82
              */
84
-            void Query();
83
+            //void Query();
85
 
84
 
86
             /** YAML Serializing method
85
             /** YAML Serializing method
87
              */
86
              */

+ 3
- 5
Modules/FDEM1D/python/CMakeLists.txt View File

1
 
1
 
2
 #pybind11_add_module(pyFDEM1D   MODULE pyFDEM1D.cpp)
2
 #pybind11_add_module(pyFDEM1D   MODULE pyFDEM1D.cpp)
3
 add_library(pyFDEM1D MODULE pyFDEM1D.cpp)
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
 set_target_properties(pyFDEM1D PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}"
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
 install(TARGETS pyFDEM1D
10
 install(TARGETS pyFDEM1D

+ 9
- 7
Modules/FDEM1D/python/pyFDEM1D.cpp View File

27
 PYBIND11_MODULE(FDEM1D, m) {
27
 PYBIND11_MODULE(FDEM1D, m) {
28
 
28
 
29
     py::add_ostream_redirect(m, "ostream_redirect");
29
     py::add_ostream_redirect(m, "ostream_redirect");
30
-
31
     m.doc() = "Python binding of Lemma::FDEM1D, additional details can be found at https://lemmasoftware.org";
30
     m.doc() = "Python binding of Lemma::FDEM1D, additional details can be found at https://lemmasoftware.org";
32
 
31
 
33
 
32
 
230
             "Calculates complex resistivity based on cole-cole parameters")
229
             "Calculates complex resistivity based on cole-cole parameters")
231
         ;
230
         ;
232
 
231
 
232
+
233
     py::class_<Lemma::EMEarth1D, std::shared_ptr<Lemma::EMEarth1D> >
233
     py::class_<Lemma::EMEarth1D, std::shared_ptr<Lemma::EMEarth1D> >
234
         EMEarth1D(m, "EMEarth1D");
234
         EMEarth1D(m, "EMEarth1D");
235
 
235
 
236
         // lifecycle
236
         // lifecycle
237
         EMEarth1D.def(py::init(&Lemma::EMEarth1D::NewSP))
237
         EMEarth1D.def(py::init(&Lemma::EMEarth1D::NewSP))
238
+/*
238
         //.def_static("DeSerialize", py::overload_cast<const std::string&>
239
         //.def_static("DeSerialize", py::overload_cast<const std::string&>
239
         //    (&Lemma::EMEarth1D::DeSerialize),"Construct object from yaml representation")
240
         //    (&Lemma::EMEarth1D::DeSerialize),"Construct object from yaml representation")
240
 
241
 
241
         // print
242
         // print
242
         .def("Serialize", &Lemma::EMEarth1D::Print, "YAML representation of the class")
243
         .def("Serialize", &Lemma::EMEarth1D::Print, "YAML representation of the class")
243
         .def("__repr__", &Lemma::EMEarth1D::Print)
244
         .def("__repr__", &Lemma::EMEarth1D::Print)
244
-
245
+	
245
         // accessors
246
         // accessors
246
         .def("GetName", &Lemma::EMEarth1D::GetName, "Returns the name of the class")
247
         .def("GetName", &Lemma::EMEarth1D::GetName, "Returns the name of the class")
247
         .def("GetFieldPoints", &Lemma::EMEarth1D::GetFieldPoints, "Returns the FieldPoint class")
248
         .def("GetFieldPoints", &Lemma::EMEarth1D::GetFieldPoints, "Returns the FieldPoint class")
264
             "Sets the TxRx mode flag")
265
             "Sets the TxRx mode flag")
265
 
266
 
266
         //methods
267
         //methods
267
-#ifdef KIHALEE_EM1D
268
+	#ifdef KIHALEE_EM1D
268
         .def("MakeCalc", &Lemma::EMEarth1D::MakeCalc, "Calls KiHa Lee's EM1D FORTRAN77 code")
269
         .def("MakeCalc", &Lemma::EMEarth1D::MakeCalc, "Calls KiHa Lee's EM1D FORTRAN77 code")
269
-#endif
270
+	#endif
270
 
271
 
271
         .def("MakeCalc3", &Lemma::EMEarth1D::MakeCalc3, "Native Lemma EM calculation")
272
         .def("MakeCalc3", &Lemma::EMEarth1D::MakeCalc3, "Native Lemma EM calculation")
272
         .def("CalculateWireAntennaFields", &Lemma::EMEarth1D::CalculateWireAntennaFields,
273
         .def("CalculateWireAntennaFields", &Lemma::EMEarth1D::CalculateWireAntennaFields,
273
             "Native Lemma calculation of a wire antenna")
274
             "Native Lemma calculation of a wire antenna")
275
+*/
276
+	
274
         ;
277
         ;
275
 
278
 
279
+
276
     py::class_<Lemma::FieldPoints, std::shared_ptr<Lemma::FieldPoints> >
280
     py::class_<Lemma::FieldPoints, std::shared_ptr<Lemma::FieldPoints> >
277
         FieldPoints(m, "FieldPoints");
281
         FieldPoints(m, "FieldPoints");
278
 
282
 
334
         .def("ClearFields", &Lemma::FieldPoints::ClearFields, "Clears calculated fields")
338
         .def("ClearFields", &Lemma::FieldPoints::ClearFields, "Clears calculated fields")
335
         .def("MaskPoint", &Lemma::FieldPoints::MaskPoint, "Masks the index resulting in no calculation")
339
         .def("MaskPoint", &Lemma::FieldPoints::MaskPoint, "Masks the index resulting in no calculation")
336
         .def("UnMaskPoint", &Lemma::FieldPoints::UnMaskPoint, "Unmasks the index resulting in a calculation")
340
         .def("UnMaskPoint", &Lemma::FieldPoints::UnMaskPoint, "Unmasks the index resulting in a calculation")
337
-
341
+	
338
         ;
342
         ;
339
 }
343
 }
340
-
341
-

+ 3
- 1
Modules/FDEM1D/src/EMEarth1D.cpp View File

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

+ 2
- 0
Modules/LemmaCore/python/CMakeLists.txt View File

7
 set_target_properties(pyLemmaCore PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}"
7
 set_target_properties(pyLemmaCore PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}"
8
                                              SUFFIX "${PYTHON_MODULE_EXTENSION}"
8
                                              SUFFIX "${PYTHON_MODULE_EXTENSION}"
9
                                              OUTPUT_NAME "LemmaCore"
9
                                              OUTPUT_NAME "LemmaCore"
10
+					     CXX_STANDARD 14 
11
+					     CXX_STANDARD_REQUIRED ON
10
 )
12
 )
11
 
13
 
12
 
14
 

Loading…
Cancel
Save