Browse Source

Start on templated FHT

add-code-of-conduct-1
Trevor Irons 6 years ago
parent
commit
de60d60ad6

+ 4
- 0
Modules/FDEM1D/examples/CMakeLists.txt View File

@@ -2,6 +2,10 @@ add_executable( LayeredEarthEM LayeredEarthEM.cpp  )
2 2
 target_link_libraries(  LayeredEarthEM  "lemmacore" "fdem1d")
3 3
 set_property(TARGET LayeredEarthEM PROPERTY CXX_STANDARD 14)
4 4
 
5
+add_executable( FHT FHT.cpp  )
6
+target_link_libraries(  FHT  "lemmacore" "fdem1d")
7
+set_property(TARGET FHT PROPERTY CXX_STANDARD 14)
8
+
5 9
 add_executable( FieldPoints FieldPoints.cpp  )
6 10
 target_link_libraries(  FieldPoints  "lemmacore" "fdem1d")
7 11
 set_property(TARGET FieldPoints PROPERTY CXX_STANDARD 14)

+ 27
- 0
Modules/FDEM1D/examples/FHT.cpp View File

@@ -0,0 +1,27 @@
1
+/* This file is part of Lemma, a geophysical modelling and inversion API.
2
+ * More information is available at http://lemmasoftware.org
3
+ */
4
+
5
+/* This Source Code Form is subject to the terms of the Mozilla Public
6
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
7
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
+ */
9
+
10
+/**
11
+ * @file
12
+ * @date      05/03/2018 09:44:21 AM
13
+ * @version   $Id$
14
+ * @author    Trevor Irons (ti)
15
+ * @email     tirons@egi.utah.edu
16
+ * @copyright Copyright (c) 2018, University of Utah
17
+ * @copyright Copyright (c) 2018, Lemma Software, LLC
18
+ */
19
+
20
+#include "FHT.h"
21
+using namespace Lemma;
22
+
23
+int main() {
24
+    std::cout << "FHT test" << std::endl;
25
+
26
+    //auto fht = FHT::NewSP();
27
+}

+ 44
- 25
Modules/FDEM1D/include/FHT.h View File

@@ -19,21 +19,25 @@
19 19
 
20 20
 
21 21
 #pragma once
22
-#include "HankekTransform.h"
22
+#include "HankelTransform.h"
23 23
 
24 24
 namespace Lemma {
25 25
 
26 26
     /**
27
-      \brief   Impliments a fast Hankel transform through digital filtering.
28
-      \details A genearl Fast Hankel Transform routine which uses the digital
29
-               filter apporach. This approach performs a complete sweep of the
30
-               coeficients, for a variant that uses a longer filter which may
27
+      \ingroup FDEM1D
28
+      \brief   Impliments lagged and related fast Hankel transform through
29
+               digital filtering.
30
+      \details A general Fast Hankel Transform routine which uses the digital
31
+               filter apporach. Both lagged and related kernels are supported in
32
+               order to minimize kernel function calls.
33
+               This approach performs a complete sweep of the
34
+               coefficients , for a variant that uses a longer filter which may
31 35
                be truncated, see FHTAnderson801.
32
-               @see FHTAndersion801
36
+               @see FHTAnderson801
33 37
                @see GQChave
34
-               @see @QKEKey
38
+               @see QWEKey
35 39
      */
36
-    class FHT : public HankekTransform {
40
+    class FHT : public HankelTransform {
37 41
 
38 42
         friend std::ostream &operator<<(std::ostream &stream, const FHT &ob);
39 43
 
@@ -41,11 +45,31 @@ namespace Lemma {
41 45
 
42 46
         // ====================  LIFECYCLE     =======================
43 47
 
44
-        /*
48
+        /**
49
+         * Default protected constructor, use NewSP methods to construct
50
+         * @see FHT::NewSP
51
+         */
52
+        FHT (const ctor_key& key ) : HankelTransform( key ) {
53
+        }
54
+
55
+        /**
56
+         * Protected DeDerializing constructor, use factory DeSerialize  method.
57
+         * @see FHT::DeSerialize
58
+         */
59
+        FHT (const YAML::Node& node, const ctor_key& key) : HankelTransform(node, key) {
60
+        }
61
+
62
+        /** Default protected destructor, use smart pointers (std::shared_ptr) */
63
+        ~FHT () {
64
+        }
65
+
66
+        /**
45 67
          *  Factory method for generating concrete class.
46 68
          *  @return a std::shared_ptr of type FHT
47 69
          */
48
-        static std::shared_ptr< FHT > NewSP();
70
+        static std::shared_ptr< FHT > NewSP() {
71
+            return std::make_shared< FHT >( ctor_key() );
72
+        }
49 73
 
50 74
         /**
51 75
          *  Uses YAML to serialize this object.
@@ -64,35 +88,30 @@ namespace Lemma {
64 88
 
65 89
         // ====================  OPERATIONS    =======================
66 90
 
91
+        Complex Zgauss(const int&, const Lemma::EMMODE&, const int&, const Real&, const Real&, Lemma::KernelEM1DBase*) {
92
+            return 0;
93
+        }
94
+
67 95
         // ====================  ACCESS        =======================
68 96
 
69 97
         // ====================  INQUIRY       =======================
70 98
 
99
+        /** Returns the name of the underlying class, similiar to Python's type */
100
+        virtual std::string GetName() const {
101
+            return this->CName;
102
+        }
71 103
 
72 104
 
73 105
         protected:
74 106
 
75 107
         // ====================  LIFECYCLE     =======================
76 108
 
77
-        /**
78
-         * Default protected constructor, use NewSP methods to construct
79
-         * @see FHT::NewSP
80
-         */
81
-        FHT (const std::string& name);
82
-
83
-        /**
84
-         * Protected DeDerializing constructor, use factory DeSerialize  method.
85
-         * @see FHT::DeSerialize
86
-         */
87
-        FHT (const YAML::Node& node);
88
-
89
-        /** Default protected destructor, use smart pointers (std::shared_ptr) */
90
-        ~FHT ();
91
-
92 109
         // ====================  DATA MEMBERS  =========================
93 110
 
94 111
         private:
95 112
 
113
+        static constexpr auto CName = "FHT";
114
+
96 115
     }; // -----  end of class  FHT  -----
97 116
 }  // -----  end of namespace Lemma ----
98 117
 

Loading…
Cancel
Save