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
 target_link_libraries(  LayeredEarthEM  "lemmacore" "fdem1d")
2
 target_link_libraries(  LayeredEarthEM  "lemmacore" "fdem1d")
3
 set_property(TARGET LayeredEarthEM PROPERTY CXX_STANDARD 14)
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
 add_executable( FieldPoints FieldPoints.cpp  )
9
 add_executable( FieldPoints FieldPoints.cpp  )
6
 target_link_libraries(  FieldPoints  "lemmacore" "fdem1d")
10
 target_link_libraries(  FieldPoints  "lemmacore" "fdem1d")
7
 set_property(TARGET FieldPoints PROPERTY CXX_STANDARD 14)
11
 set_property(TARGET FieldPoints PROPERTY CXX_STANDARD 14)

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

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
 
19
 
20
 
20
 
21
 #pragma once
21
 #pragma once
22
-#include "HankekTransform.h"
22
+#include "HankelTransform.h"
23
 
23
 
24
 namespace Lemma {
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
                be truncated, see FHTAnderson801.
35
                be truncated, see FHTAnderson801.
32
-               @see FHTAndersion801
36
+               @see FHTAnderson801
33
                @see GQChave
37
                @see GQChave
34
-               @see @QKEKey
38
+               @see QWEKey
35
      */
39
      */
36
-    class FHT : public HankekTransform {
40
+    class FHT : public HankelTransform {
37
 
41
 
38
         friend std::ostream &operator<<(std::ostream &stream, const FHT &ob);
42
         friend std::ostream &operator<<(std::ostream &stream, const FHT &ob);
39
 
43
 
41
 
45
 
42
         // ====================  LIFECYCLE     =======================
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
          *  Factory method for generating concrete class.
67
          *  Factory method for generating concrete class.
46
          *  @return a std::shared_ptr of type FHT
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
          *  Uses YAML to serialize this object.
75
          *  Uses YAML to serialize this object.
64
 
88
 
65
         // ====================  OPERATIONS    =======================
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
         // ====================  ACCESS        =======================
95
         // ====================  ACCESS        =======================
68
 
96
 
69
         // ====================  INQUIRY       =======================
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
         protected:
105
         protected:
74
 
106
 
75
         // ====================  LIFECYCLE     =======================
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
         // ====================  DATA MEMBERS  =========================
109
         // ====================  DATA MEMBERS  =========================
93
 
110
 
94
         private:
111
         private:
95
 
112
 
113
+        static constexpr auto CName = "FHT";
114
+
96
     }; // -----  end of class  FHT  -----
115
     }; // -----  end of class  FHT  -----
97
 }  // -----  end of namespace Lemma ----
116
 }  // -----  end of namespace Lemma ----
98
 
117
 

Loading…
Cancel
Save