瀏覽代碼

VTK output in kernel calulation as an option

master
Trevor Irons 7 年之前
父節點
當前提交
7d457f083f
共有 2 個文件被更改,包括 10 次插入2 次删除
  1. 9
    2
      examples/KernelV0-2.cpp
  2. 1
    0
      src/KernelV0.cpp

+ 9
- 2
examples/KernelV0-2.cpp 查看文件

@@ -24,7 +24,7 @@ using namespace Lemma;
24 24
 int main(int argc, char** argv) {
25 25
 
26 26
     if (argc<3) {
27
-        std::cout << "./KernelV0-2 Kernel.yaml TxString RxString  \n";
27
+        std::cout << "./KernelV0-2 Kernel.yaml TxString RxString  vtkoutput<true/false> \n";
28 28
         return(EXIT_SUCCESS);
29 29
     }
30 30
 
@@ -33,7 +33,14 @@ int main(int argc, char** argv) {
33 33
 
34 34
     std::vector<std::string> tx = {std::string(argv[2])};
35 35
     std::vector<std::string> rx = {std::string(argv[3])};
36
-    Kern->CalculateK0( tx, rx, false ); // 3rd argument is vtk output
36
+
37
+    std::cout << "argv[4]\t" << argv[4] << std::endl;
38
+    if( std::string(argv[4]) == "true") {
39
+        Kern->CalculateK0( tx, rx, true ); // 3rd argument is vtk output
40
+    } else {
41
+        std::cout << "not using VTK" << std::endl;
42
+        Kern->CalculateK0( tx, rx, false ); // 3rd argument is vtk output
43
+    }
37 44
 
38 45
     // TODO fix python post-processing so this is not necessary
39 46
     // Save in simplified format for easy python plotting

+ 1
- 0
src/KernelV0.cpp 查看文件

@@ -373,6 +373,7 @@ namespace Lemma {
373 373
         // Compute Mn0
374 374
         Vector3r Mn0 = ComputeMn0(1.0, B0);
375 375
         Real Mn0Abs = Mn0.norm();
376
+        //std::cout << "Mn0\t" << Mn0.transpose() << std::endl;
376 377
 
377 378
         // Compute phase delay
378 379
         // TODO add transmiiter current phase and delay induced apparent time phase!

Loading…
取消
儲存