Browse Source

looking at weird bug in log spaced depth and kernel transpose?

master
T-bone 7 years ago
parent
commit
a3d5b02e55
2 changed files with 8 additions and 6 deletions
  1. 2
    2
      examples/KernelV0.cpp
  2. 6
    4
      src/KernelV0.cpp

+ 2
- 2
examples/KernelV0.cpp View File

@@ -44,7 +44,7 @@ int main() {
44 44
 
45 45
         Kern->SetIntegrationSize( (Vector3r() << 200,200,200).finished() );
46 46
         Kern->SetIntegrationOrigin( (Vector3r() << 0,0,0).finished() );
47
-        Kern->SetTolerance( 1e-12 );
47
+        Kern->SetTolerance( 1e-10 );
48 48
 
49 49
         Kern->SetPulseDuration(0.020);
50 50
         VectorXr I(36);
@@ -60,7 +60,7 @@ int main() {
60 60
 
61 61
         //Kern->SetDepthLayerInterfaces( VectorXr::LinSpaced( 30, 3, 45.5 ) ); // nlay, low, high
62 62
         //10**np.linspace(np.log10(10),np.log10(19),10)
63
-        VectorXr interfaces = VectorXr::LinSpaced(31, std::log10(2), std::log10(50)); // 30 log spaced
63
+        VectorXr interfaces = VectorXr::LinSpaced(21, std::log10(2), std::log10(50)); // 30 log spaced
64 64
         for (int i=0; i<interfaces.size(); ++i) {
65 65
             interfaces(i) = std::pow(10, interfaces(i));
66 66
         }

+ 6
- 4
src/KernelV0.cpp View File

@@ -160,10 +160,12 @@ namespace Lemma {
160 160
             IntegrateOnOctreeGrid( vtkOutput );
161 161
         }
162 162
         std::cout << "\rFinished KERNEL\n";
163
-        std::cout << "#real\n";
164
-        std::cout << Kern.real() << std::endl;
165
-        std::cout << "#imag\n";
166
-        std::cout << Kern.imag() << std::endl;
163
+        ofstream out = ofstream("k.dat");
164
+        out << "#real\n";
165
+        out << Kern.real() << std::endl;
166
+        out << "#imag\n";
167
+        out << Kern.imag() << std::endl;
168
+        out.close();
167 169
     }
168 170
 
169 171
     //--------------------------------------------------------------------------------------

Loading…
Cancel
Save