소스 검색

Fix interpolation bug with Anderson801

lagkey
Trevor Irons 7 년 전
부모
커밋
7721b8b883
3개의 변경된 파일3개의 추가작업 그리고 7개의 파일을 삭제
  1. 1
    0
      Modules/FDEM1D/examples/Hantenna.cpp
  2. 2
    2
      Modules/FDEM1D/src/EMEarth1D.cpp
  3. 0
    5
      Modules/LemmaCore/src/CubicSplineInterpolator.cpp

+ 1
- 0
Modules/FDEM1D/examples/Hantenna.cpp 파일 보기

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 파일 보기

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 파일 보기

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…
취소
저장