Browse Source

Fix of Lemma export

submodule
T-bone 7 years ago
parent
commit
f1d47526fc
2 changed files with 5 additions and 2 deletions
  1. 3
    0
      Modules/FDEM1D/examples/CMakeLists.txt
  2. 2
    2
      Modules/LemmaCore/include/helper.h

+ 3
- 0
Modules/FDEM1D/examples/CMakeLists.txt View File

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 View File

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…
Cancel
Save