looking at weird bug in log spaced depth and kernel transpose?
authorT-bone <trevorirons@gmail.com>
Tue, 22 Nov 2016 21:48:28 +0000 (21:48 +0000)
committerT-bone <trevorirons@gmail.com>
Tue, 22 Nov 2016 21:48:28 +0000 (21:48 +0000)
examples/KernelV0.cpp
src/KernelV0.cpp

index 659bb98..da95965 100644 (file)
@@ -44,7 +44,7 @@ int main() {
 
         Kern->SetIntegrationSize( (Vector3r() << 200,200,200).finished() );
         Kern->SetIntegrationOrigin( (Vector3r() << 0,0,0).finished() );
-        Kern->SetTolerance( 1e-12 );
+        Kern->SetTolerance( 1e-10 );
 
         Kern->SetPulseDuration(0.020);
         VectorXr I(36);
@@ -60,7 +60,7 @@ int main() {
 
         //Kern->SetDepthLayerInterfaces( VectorXr::LinSpaced( 30, 3, 45.5 ) ); // nlay, low, high
         //10**np.linspace(np.log10(10),np.log10(19),10)
-        VectorXr interfaces = VectorXr::LinSpaced(31, std::log10(2), std::log10(50)); // 30 log spaced
+        VectorXr interfaces = VectorXr::LinSpaced(21, std::log10(2), std::log10(50)); // 30 log spaced
         for (int i=0; i<interfaces.size(); ++i) {
             interfaces(i) = std::pow(10, interfaces(i));
         }
index 0833036..73a2a1a 100644 (file)
@@ -160,10 +160,12 @@ namespace Lemma {
             IntegrateOnOctreeGrid( vtkOutput );
         }
         std::cout << "\rFinished KERNEL\n";
-        std::cout << "#real\n";
-        std::cout << Kern.real() << std::endl;
-        std::cout << "#imag\n";
-        std::cout << Kern.imag() << std::endl;
+        ofstream out = ofstream("k.dat");
+        out << "#real\n";
+        out << Kern.real() << std::endl;
+        out << "#imag\n";
+        out << Kern.imag() << std::endl;
+        out.close();
     }
 
     //--------------------------------------------------------------------------------------