Parcourir la source

version bump

master
Trevor Irons il y a 5 ans
Parent
révision
5531ffa1b6
4 fichiers modifiés avec 43 ajouts et 13 suppressions
  1. 2
    2
      CMakeLists.txt
  2. 30
    3
      include/KernelV0.h
  3. 3
    0
      python/pyMerlin.cpp
  4. 8
    8
      src/KernelV0.cpp

+ 2
- 2
CMakeLists.txt Voir le fichier

@@ -1,7 +1,7 @@
1 1
 # Configure Merlin 
2 2
 set(MERLIN_VERSION_MAJOR "0")
3
-set(MERLIN_VERSION_MINOR "0")
4
-set(MERLIN_VERSION_PATCH "4")
3
+set(MERLIN_VERSION_MINOR "1")
4
+set(MERLIN_VERSION_PATCH "0")
5 5
 set(MERLIN_VERSION "\"${MERLIN_VERSION_MAJOR}.${MERLIN_VERSION_MINOR}.${MERLIN_VERSION_PATCH}\"")
6 6
 set(MERLIN_VERSION_NOQUOTES "${MERLIN_VERSION_MAJOR}.${MERLIN_VERSION_MINOR}.${MERLIN_VERSION_PATCH}")
7 7
 

+ 30
- 3
include/KernelV0.h Voir le fichier

@@ -212,7 +212,7 @@ namespace Lemma {
212 212
         }		// -----  end of method KernelV0::set_SigmaModel  -----
213 213
 
214 214
         /**
215
-         *
215
+         *  @param[in] size the size of the volume to be integrated
216 216
          */
217 217
         inline void SetIntegrationSize ( const Vector3r& size ) {
218 218
             Size = size;
@@ -220,7 +220,32 @@ namespace Lemma {
220 220
         }		// -----  end of method KernelV0::SetIntegrationSize  -----
221 221
 
222 222
         /**
223
-         *
223
+         * @param[in] type The type of Hankel transform that will be used.
224
+         */
225
+        inline void SetHankelTransformType ( const HANKELTRANSFORMTYPE& type ) {
226
+            HankelType = type;
227
+            return ;
228
+        }		// -----  end of method KernelV0::SetIntegrationOrigin  -----
229
+
230
+
231
+        /**
232
+         * @param[in] min is the minimum leaf level, defaults to 0
233
+         */
234
+        inline void SetMinLevel ( const int& min ) {
235
+            minLevel = min;
236
+            return ;
237
+        }		// -----  end of method KernelV0::SetMinLevel  -----
238
+
239
+        /**
240
+         * @param[in] max is the maximum leaf level, defaults to 12
241
+         */
242
+        inline void SetMaxLevel ( const int& max ) {
243
+            maxLevel = max;
244
+            return ;
245
+        }		// -----  end of method KernelV0::SetMaxLevel  -----
246
+
247
+        /**
248
+         *  @param[in] origin The origin location (corner) for the integration volume
224 249
          */
225 250
         inline void SetIntegrationOrigin ( const Vector3r& origin ) {
226 251
             Origin = origin;
@@ -228,7 +253,7 @@ namespace Lemma {
228 253
         }		// -----  end of method KernelV0::SetIntegrationOrigin  -----
229 254
 
230 255
         /**
231
-         *
256
+         * @param[in] Amps is the current for each pulse moment
232 257
          */
233 258
         inline void SetPulseCurrent ( const VectorXr& Amps ) {
234 259
             PulseI = Amps;
@@ -343,6 +368,8 @@ namespace Lemma {
343 368
 
344 369
         MatrixXcr                                 Kern;
345 370
 
371
+        HANKELTRANSFORMTYPE                       HankelType=ANDERSON801;
372
+
346 373
         std::shared_ptr< LayeredEarthEM >         SigmaModel = nullptr;
347 374
         std::shared_ptr< FieldPoints >            cpoints = nullptr;
348 375
 

+ 3
- 0
python/pyMerlin.cpp Voir le fichier

@@ -51,8 +51,11 @@ PYBIND11_MODULE(Merlin, m) {
51 51
             .def("SetPulseCurrent", &Lemma::KernelV0::SetPulseCurrent, "Sets the current of the pulses")
52 52
             .def("SetTemperature", &Lemma::KernelV0::SetTemperature, "Sets the temperature, in K")
53 53
             .def("SetTolerance", &Lemma::KernelV0::SetTolerance, "Sets the tolerance used in octree splitting")
54
+            .def("SetMinLevel", &Lemma::KernelV0::SetMinLevel, "Sets the minimum leaf level used in octree splitting")
55
+            .def("SetMaxLevel", &Lemma::KernelV0::SetMaxLevel, "Sets the maximum leaf level used in octree splitting")
54 56
             .def("SetPulseDuration", &Lemma::KernelV0::SetPulseDuration, "Sets the duration of the pulse")
55 57
             .def("SetDepthLayerInterfaces", &Lemma::KernelV0::SetDepthLayerInterfaces, "Sets the layer depth interfaces")
58
+            .def("SetHankelTransformType", &Lemma::KernelV0::SetHankelTransformType, "Sets the Hankel transform type")
56 59
 
57 60
             // accessors
58 61
             .def("GetName", &Lemma::KernelV0::GetName, "Returns the name of the class")

+ 8
- 8
src/KernelV0.cpp Voir le fichier

@@ -49,8 +49,6 @@ namespace Lemma {
49 49
     //--------------------------------------------------------------------------------------
50 50
     KernelV0::KernelV0 (const YAML::Node& node, const ctor_key& key) : MerlinObject(node, key) {
51 51
 
52
-        std::cout << "DESERIALIZING" << std::endl;
53
-
54 52
         //node["PulseType"] = "FID";
55 53
         Larmor = node["Larmor"].as<Real>();
56 54
         Temperature = node["Temperature"].as<Real>();
@@ -215,9 +213,9 @@ namespace Lemma {
215 213
                 EMEarths[tx]->AttachLayeredEarthEM(SigmaModel);
216 214
                 EMEarths[tx]->AttachFieldPoints( cpoints );
217 215
          		EMEarths[tx]->SetFieldsToCalculate(H);
218
-                // TODO query for method, altough with flat antennae, this is fastest
219
-                //EMEarths[tx]->SetHankelTransformMethod(FHTKEY201);
220
-                EMEarths[tx]->SetHankelTransformMethod(ANDERSON801);
216
+                // TODO query for method
217
+                //EMEarths[tx]->SetHankelTransformMethod(ANDERSON801);
218
+                EMEarths[tx]->SetHankelTransformMethod(HankelType);
221 219
                 EMEarths[tx]->SetTxRxMode(TX);
222 220
                 TxRx[tx]->SetCurrent(1.);
223 221
         }
@@ -230,9 +228,9 @@ namespace Lemma {
230 228
                     EMEarths[rx]->AttachLayeredEarthEM(SigmaModel);
231 229
                     EMEarths[rx]->AttachFieldPoints( cpoints );
232 230
          		    EMEarths[rx]->SetFieldsToCalculate(H);
233
-                    // TODO query for method, altough with flat antennae, this is fastest
234
-                    //EMEarths[rx]->SetHankelTransformMethod(FHTKEY201);
235
-                    EMEarths[rx]->SetHankelTransformMethod(ANDERSON801);
231
+                    // TODO query for method
232
+                    //EMEarths[rx]->SetHankelTransformMethod(ANDERSON801);
233
+                    EMEarths[rx]->SetHankelTransformMethod(HankelType);
236 234
                     EMEarths[rx]->SetTxRxMode(RX);
237 235
                     TxRx[rx]->SetCurrent(1.);
238 236
             }
@@ -240,12 +238,14 @@ namespace Lemma {
240 238
 
241 239
         std::cout << "Calculating K0 kernel\n";
242 240
         Kern = MatrixXcr::Zero( Interfaces.size()-1, PulseI.size() );
241
+        //for (ilay=0; ilay<Interfaces.size()-1; ++ilay) {
243 242
         for (ilay=0; ilay<Interfaces.size()-1; ++ilay) {
244 243
             std::cout << "Layer " << ilay << "\tfrom " << Interfaces(ilay) <<" to "
245 244
                       << Interfaces(ilay+1) << std::endl;
246 245
             Size(2) = Interfaces(ilay+1) - Interfaces(ilay);
247 246
             Origin(2) = Interfaces(ilay);
248 247
             IntegrateOnOctreeGrid( vtkOutput );
248
+            //std::cout << "Kernel row " << Kern.row(ilay);
249 249
         }
250 250
         std::cout << "\nFinished KERNEL\n";
251 251
     }

Chargement…
Annuler
Enregistrer