瀏覽代碼

Fix of Lemma export

submodule
T-bone 7 年之前
父節點
當前提交
f1d47526fc
共有 2 個文件被更改,包括 5 次插入2 次删除
  1. 3
    0
      Modules/FDEM1D/examples/CMakeLists.txt
  2. 2
    2
      Modules/LemmaCore/include/helper.h

+ 3
- 0
Modules/FDEM1D/examples/CMakeLists.txt 查看文件

7
 add_executable( PolygonalWireAntenna PolygonalWireAntenna.cpp  )
7
 add_executable( PolygonalWireAntenna PolygonalWireAntenna.cpp  )
8
 target_link_libraries(  PolygonalWireAntenna  "lemmacore" "fdem1d")
8
 target_link_libraries(  PolygonalWireAntenna  "lemmacore" "fdem1d")
9
 
9
 
10
+add_executable( CircularLoop CircularLoop.cpp  )
11
+target_link_libraries(  CircularLoop  "lemmacore" "fdem1d")
12
+
10
 add_executable( EMDipEarth1D EMDipEarth1D.cpp  )
13
 add_executable( EMDipEarth1D EMDipEarth1D.cpp  )
11
 target_link_libraries(  EMDipEarth1D  "lemmacore" "fdem1d")
14
 target_link_libraries(  EMDipEarth1D  "lemmacore" "fdem1d")
12
 
15
 

+ 2
- 2
Modules/LemmaCore/include/helper.h 查看文件

266
   static Node encode(const Lemma::Vector3r& rhs) {
266
   static Node encode(const Lemma::Vector3r& rhs) {
267
     Node node;
267
     Node node;
268
     for (int ic=0; ic<rhs.size(); ++ic) {
268
     for (int ic=0; ic<rhs.size(); ++ic) {
269
-        node[0].push_back( rhs(ic) );
269
+        node["data"].push_back( rhs(ic) );
270
     }
270
     }
271
     node.SetTag( "Vector3r" );
271
     node.SetTag( "Vector3r" );
272
     return node;
272
     return node;
277
         return false;
277
         return false;
278
     }
278
     }
279
     int ir=0;
279
     int ir=0;
280
-    for(YAML::const_iterator it=node[0].begin(); it!=node[0].end(); ++it) {
280
+    for(YAML::const_iterator it=node["data"].begin(); it!=node["data"].end(); ++it) {
281
         rhs(ir) = it->as<Lemma::Real>();
281
         rhs(ir) = it->as<Lemma::Real>();
282
         ++ir;
282
         ++ir;
283
     }
283
     }

Loading…
取消
儲存