Browse Source

Fix interpolation bug with Anderson801

lagkey
Trevor Irons 6 years ago
parent
commit
7721b8b883

+ 1
- 0
Modules/FDEM1D/examples/Hantenna.cpp View File

@@ -30,6 +30,7 @@
30 30
 #if defined(__clang__)
31 31
 	/* Clang/LLVM. ---------------------------------------------- */
32 32
     const char* compiler = "clang";
33
+    const char* ver = __VERSION__;
33 34
 #elif defined(__ICC) || defined(__INTEL_COMPILER)
34 35
 	/* Intel ICC/ICPC. ------------------------------------------ */
35 36
     const char* compiler = "icpc";

+ 2
- 2
Modules/FDEM1D/src/EMEarth1D.cpp View File

@@ -779,7 +779,7 @@ namespace Lemma {
779 779
 
780 780
         // Determine number of lagged convolutions to do
781 781
         int nlag = 1; // (Key==0)  We need an extra for some reason for stability? Maybe in Spline?
782
-        Real lrho ( 1.0 * rhomax );
782
+        Real lrho ( 1.0001 * rhomax );
783 783
         while ( lrho > rhomin ) {
784 784
             nlag += 1;
785 785
             lrho *= Hankel->GetABSER();
@@ -789,7 +789,7 @@ namespace Lemma {
789 789
         tDipole->SetKernels(ifreq, FieldsToCalculate, Receivers, irec, Earth);
790 790
 
791 791
         // Instead we should pass the antenna into this so that Hankel hass all the rho arguments...
792
-        Hankel->ComputeLaggedRelated( 1.0*rhomax, nlag, tDipole->GetKernelManager() );
792
+        Hankel->ComputeLaggedRelated( 1.0001*rhomax, nlag, tDipole->GetKernelManager() );
793 793
 
794 794
         // Sort the dipoles by rho
795 795
         for (int idip=0; idip<antenna->GetNumberOfDipoles(); ++idip) {

+ 0
- 5
Modules/LemmaCore/src/CubicSplineInterpolator.cpp View File

@@ -178,11 +178,6 @@ namespace Lemma {
178 178
         }
179 179
         --i;
180 180
 
181
-//         if ( x > Spline.x[i] ) {
182
-//             std::cout << "DOOM\t" << x << "\t" << i << "\t" << Spline.x[i];
183
-//             throw std::runtime_error("CubicSplineInterpolator::Interpolate ATTEMPT TO INTERPOLATE PAST LAST KNOT");
184
-//         }
185
-
186 181
         return Spline.a[i] + Spline.b[i]*(x-Spline.x[i]) + Spline.c[i]*((x-Spline.x[i])*(x-Spline.x[i])) +
187 182
                Spline.d[i]*((x-Spline.x[i])*(x-Spline.x[i])*(x-Spline.x[i]) );
188 183
     }		// -----  end of method CubicSplineInterpolator::Interpolate  -----

Loading…
Cancel
Save