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

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

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

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

178
         }
178
         }
179
         --i;
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
         return Spline.a[i] + Spline.b[i]*(x-Spline.x[i]) + Spline.c[i]*((x-Spline.x[i])*(x-Spline.x[i])) +
181
         return Spline.a[i] + Spline.b[i]*(x-Spline.x[i]) + Spline.c[i]*((x-Spline.x[i])*(x-Spline.x[i])) +
187
                Spline.d[i]*((x-Spline.x[i])*(x-Spline.x[i])*(x-Spline.x[i]) );
182
                Spline.d[i]*((x-Spline.x[i])*(x-Spline.x[i])*(x-Spline.x[i]) );
188
     }		// -----  end of method CubicSplineInterpolator::Interpolate  -----
183
     }		// -----  end of method CubicSplineInterpolator::Interpolate  -----

Loading…
Cancel
Save