Browse Source

LayeredEarthEM mocked up and looking good.

master
T-bone 7 years ago
parent
commit
08046dd915
2 changed files with 10 additions and 7 deletions
  1. 4
    3
      include/LayeredEarthMR.h
  2. 6
    4
      src/LayeredEarthMR.cpp

+ 4
- 3
include/LayeredEarthMR.h View File

149
         /** Initializes the model matrix */
149
         /** Initializes the model matrix */
150
         void InitModelMat();
150
         void InitModelMat();
151
 
151
 
152
-        VectorXr T2StarBins;
153
-        VectorXr T2StarBinEdges;  // Convenience for pcolor
154
-        MatrixXr ModelMat;
152
+        VectorXr Interfaces;      // Layer interfaces, for pcolor
153
+        VectorXr T2StarBins;      // the actual T2* values
154
+        VectorXr T2StarBinEdges;  // Convenience, for pcolor
155
+        MatrixXr ModelMat;        // The NMR model, in matrix form
155
 
156
 
156
     }; // -----  end of class  LayeredEarthMR  -----
157
     }; // -----  end of class  LayeredEarthMR  -----
157
 }  // -----  end of namespace Lemma ----
158
 }  // -----  end of namespace Lemma ----

+ 6
- 4
src/LayeredEarthMR.cpp View File

45
     // Description:  DeSerializing constructor (locked)
45
     // Description:  DeSerializing constructor (locked)
46
     //--------------------------------------------------------------------------------------
46
     //--------------------------------------------------------------------------------------
47
     LayeredEarthMR::LayeredEarthMR (const YAML::Node& node, const ctor_key&) : LayeredEarth(node) {
47
     LayeredEarthMR::LayeredEarthMR (const YAML::Node& node, const ctor_key&) : LayeredEarth(node) {
48
-
48
+        Interfaces = node["Interfaces"].as<VectorXr>();
49
+        T2StarBins = node["T2StarBins"].as<VectorXr>();
50
+        T2StarBinEdges = node["T2StarBinEdges"].as<VectorXr>();
51
+        ModelMat = node["ModelMat"].as<MatrixXr>();
49
     }  // -----  end of method LayeredEarthMR::LayeredEarthMR  (constructor)  -----
52
     }  // -----  end of method LayeredEarthMR::LayeredEarthMR  (constructor)  -----
50
 
53
 
51
     //--------------------------------------------------------------------------------------
54
     //--------------------------------------------------------------------------------------
75
         node.SetTag( GetName() );
78
         node.SetTag( GetName() );
76
         // FILL IN CLASS SPECIFICS HERE
79
         // FILL IN CLASS SPECIFICS HERE
77
         node["Merlin_VERSION"] = MERLIN_VERSION;
80
         node["Merlin_VERSION"] = MERLIN_VERSION;
81
+        node["Interfaces"] = Interfaces;
78
         node["T2StarBins"] = T2StarBins;
82
         node["T2StarBins"] = T2StarBins;
79
         node["T2StarBinEdges"] = T2StarBinEdges;
83
         node["T2StarBinEdges"] = T2StarBinEdges;
80
         node["ModelMat"] = ModelMat;
84
         node["ModelMat"] = ModelMat;
81
-        node["Thingy"].push_back( "Hello" );
82
-        node["Thingy"].push_back( "Whirld" );
83
-
84
         return node;
85
         return node;
85
     }		// -----  end of method LayeredEarthMR::Serialize  -----
86
     }		// -----  end of method LayeredEarthMR::Serialize  -----
86
 
87
 
112
     void LayeredEarthMR::AlignWithKernel ( std::shared_ptr<KernelV0> Kern ) {
113
     void LayeredEarthMR::AlignWithKernel ( std::shared_ptr<KernelV0> Kern ) {
113
         int nlay = Kern->GetInterfaces().size()-1;
114
         int nlay = Kern->GetInterfaces().size()-1;
114
         SetNumberOfLayers( nlay );
115
         SetNumberOfLayers( nlay );
116
+        Interfaces = Kern->GetInterfaces();
115
         LayerThickness = Kern->GetInterfaces().tail(nlay) - Kern->GetInterfaces().head(nlay) ;
117
         LayerThickness = Kern->GetInterfaces().tail(nlay) - Kern->GetInterfaces().head(nlay) ;
116
         SetMagneticFieldComponents( Kern->GetSigmaModel()->GetMagneticField(), TESLA);
118
         SetMagneticFieldComponents( Kern->GetSigmaModel()->GetMagneticField(), TESLA);
117
         return ;
119
         return ;

Loading…
Cancel
Save