Преглед изворни кода

added missing files for FCT

add-code-of-conduct-1
Trevor Irons пре 6 година
родитељ
комит
90639a009e

+ 79
- 0
Modules/FDEM1D/include/FastCosTransformAnderson.h Прегледај датотеку

@@ -0,0 +1,79 @@
1
+/* This file is part of Lemma, a geophysical modelling and inversion API */
2
+
3
+/* This Source Code Form is subject to the terms of the Mozilla Public
4
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
5
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
+
7
+/**
8
+  @file
9
+  @author   M. Andy Kass
10
+  @date     02/07/2011
11
+  @version  $Id: digitalfiltercostrans.h 87 2013-09-05 22:44:05Z tirons $
12
+ **/
13
+
14
+#ifndef __DIGITALFILTERCOSTRANS_H
15
+#define __DIGITALFILTERCOSTRANS_H
16
+
17
+#include "DigitalFilterIntegratorAnderson.h"
18
+
19
+namespace Lemma {
20
+
21
+	// ===================================================================
22
+	//        Class:  FastCosTransformAnderson
23
+	/** \brief Cosine Transform via digital filters
24
+	    \details Based on Andersons' Hankel transform, this calculates
25
+	 			the cosine transform of a discrete function
26
+				using a digital filter approach.  Filter weights are
27
+				hard-coded.
28
+				Calculates transform of the form:
29
+				\f[ \int_0^\infty f(x) \cos (x\omega)~dx
30
+				\f]
31
+    */
32
+
33
+	// ===================================================================
34
+	class FastCosTransformAnderson : public DigitalFilterIntegratorAnderson<Real> {
35
+
36
+		friend std::ostream &operator<<(std::ostream &stream, const
37
+			FastCosTransformAnderson &ob);
38
+
39
+		public:
40
+
41
+			// ====================  LIFECYCLE     =======================
42
+
43
+			static std::shared_ptr< FastCosTransformAnderson > NewSP();
44
+
45
+            /// Default protected constructor.
46
+			FastCosTransformAnderson (const ctor_key& key);
47
+
48
+			/// Default protected constructor.
49
+			~FastCosTransformAnderson ();
50
+
51
+			// ====================  OPERATORS     =======================
52
+
53
+			// ====================  OPERATIONS    =======================
54
+
55
+			// ====================  ACCESS        =======================
56
+
57
+			// ====================  INQUIRY       =======================
58
+
59
+		protected:
60
+
61
+			// ====================  LIFECYCLE     =======================
62
+
63
+			/// Set all the filter weights
64
+			void SetFilterWeights();
65
+
66
+			// ====================  DATA MEMBERS  =========================
67
+
68
+			//Eigen::Matrix<Real, 787, 1> FilterWeights;
69
+
70
+		private:
71
+
72
+    }; // -----  end of class  FastCosTransformAnderson  -----
73
+
74
+} //end of namespace Lemma
75
+
76
+#endif // __DIGITALFILTERCOSTRANS_H
77
+
78
+/* vim: set tabstop=4 expandtab: */
79
+/* vim: set filetype=cpp: */

+ 3
- 3
Modules/FDEM1D/src/FastCosTransformAnderson.cpp Прегледај датотеку

@@ -19,14 +19,14 @@ namespace Lemma {
19 19
 
20 20
     std::ostream &operator<<(std::ostream &stream,
21 21
 			const FastCosTransformAnderson &ob) {
22
-		stream << *(DigitalFilterIntegrator<Real>*)(&ob);
22
+		stream << *(DigitalFilterIntegratorAnderson<Real>*)(&ob);
23 23
 		return stream;
24 24
 	}
25 25
 
26 26
     // ====================  LIFECYCLE     =======================
27 27
 
28
-	FastCosTransformAnderson::FastCosTransformAnderson(const std::string&name) :
29
-		DigitalFilterIntegrator<Real>(name) {
28
+	FastCosTransformAnderson::FastCosTransformAnderson(const ctor_key& key) :
29
+		DigitalFilterIntegratorAnderson<Real>(key) {
30 30
         SetFilterWeights();
31 31
         NumConv = 1;
32 32
         ilow = 425;

Loading…
Откажи
Сачувај