ソースを参照

Fix for LayeredEarthEM test

enhancement_3
Trevor Irons 7年前
コミット
0adbcec3fa

+ 4
- 1
LemmaCore/include/LemmaObject.h ファイルの表示

57
 
57
 
58
         // ====================  INQUIRY       ==============================
58
         // ====================  INQUIRY       ==============================
59
 
59
 
60
-        /** Returns the name of the underlying class, similiar to Python's type */
60
+        /** Returns the name of the underlying class; Run-time type information (RTTI). This approach
61
+            Was chosen over typeid due to name mangling among various compilers, and the need for consistency
62
+            in Serialized objects.
63
+         */
61
         virtual inline std::string GetName() const {
64
         virtual inline std::string GetName() const {
62
             return this->CName;
65
             return this->CName;
63
         }
66
         }

+ 0
- 10
LemmaCore/src/LayeredEarth.cpp ファイルの表示

17
 
17
 
18
 	// ====================    FRIENDS     ======================
18
 	// ====================    FRIENDS     ======================
19
 
19
 
20
-    /*
21
-	std::ostream &operator<<(std::ostream &stream,
22
-				const LayeredEarth &ob) {
23
-		stream << *(EarthModel*)(&ob);
24
-  		//stream << "Class Name : "<< ob.Name  << "\n";
25
-  		stream << "Number of Layers "<< ob.NumberOfLayers  << "\n";
26
-  		return stream;
27
-	}
28
-    */
29
-
30
     std::ostream &operator << (std::ostream &stream, const LayeredEarth &ob) {
20
     std::ostream &operator << (std::ostream &stream, const LayeredEarth &ob) {
31
         stream << ob.Serialize()  << "\n---\n"; // End of doc --- as a direct stream should encapulste thingy
21
         stream << ob.Serialize()  << "\n---\n"; // End of doc --- as a direct stream should encapulste thingy
32
         return stream;
22
         return stream;

+ 5
- 0
Modules/FDEM1D/CMakeLists.txt ファイルの表示

5
 
5
 
6
 add_library( fdem1d ${FEM1DSOURCE} )  
6
 add_library( fdem1d ${FEM1DSOURCE} )  
7
 target_link_libraries(fdem1d "lemmacore")
7
 target_link_libraries(fdem1d "lemmacore")
8
+set_target_properties(fdem1d PROPERTIES 
9
+	VERSION  "${LEMMA_VERSION}"
10
+	SOVERSION "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}"
11
+	PROJECT_LABEL "Lemma ${LABEL_SUFFIX}"
12
+)
8
 
13
 
9
 install ( TARGETS fdem1d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
14
 install ( TARGETS fdem1d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib )
10
 
15
 

+ 5
- 0
Modules/FDEM1D/include/LayeredEarthEM.h ファイルの表示

232
              */
232
              */
233
             VectorXr GetLayerBreathPermitivity( );
233
             VectorXr GetLayerBreathPermitivity( );
234
 
234
 
235
+            /** Returns the name of the underlying class, similiar to Python's type */
236
+            virtual inline std::string GetName() const {
237
+                return CName;
238
+            }
239
+
235
         protected:
240
         protected:
236
 
241
 
237
             // ====================  LIFECYCLE     ===========================
242
             // ====================  LIFECYCLE     ===========================

読み込み中…
キャンセル
保存