Browse Source

Fix of Lemma export

submodule
T-bone 6 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,6 +7,9 @@ target_link_libraries(  FieldPoints  "lemmacore" "fdem1d")
7 7
 add_executable( PolygonalWireAntenna PolygonalWireAntenna.cpp  )
8 8
 target_link_libraries(  PolygonalWireAntenna  "lemmacore" "fdem1d")
9 9
 
10
+add_executable( CircularLoop CircularLoop.cpp  )
11
+target_link_libraries(  CircularLoop  "lemmacore" "fdem1d")
12
+
10 13
 add_executable( EMDipEarth1D EMDipEarth1D.cpp  )
11 14
 target_link_libraries(  EMDipEarth1D  "lemmacore" "fdem1d")
12 15
 

+ 2
- 2
Modules/LemmaCore/include/helper.h View File

@@ -266,7 +266,7 @@ struct convert<Lemma::Vector3r> {
266 266
   static Node encode(const Lemma::Vector3r& rhs) {
267 267
     Node node;
268 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 271
     node.SetTag( "Vector3r" );
272 272
     return node;
@@ -277,7 +277,7 @@ struct convert<Lemma::Vector3r> {
277 277
         return false;
278 278
     }
279 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 281
         rhs(ir) = it->as<Lemma::Real>();
282 282
         ++ir;
283 283
     }

Loading…
Cancel
Save