Browse Source

Additions to bring in cos and sin transform, as well as beginning to impliment the TEM classes again.

add-code-of-conduct-1
Trevor Irons 5 years ago
parent
commit
9dcb2cae05

+ 21
- 4
CMakeLists.txt View File

@@ -24,10 +24,27 @@ set(LEMMA_VERSION_NOQUOTES "${LEMMA_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}.${LEMM
24 24
 ## Options--what do you want to do
25 25
 option ( BUILD_SHARED_LIBS      "Shared or static libraries"  OFF )
26 26
 
27
+# Disallow in-source build
28
+#if ("${Lemma_SOURCE_DIR}"  STREQUAL "${Lemma_BINARY_DIR}")
29
+#  message(FATAL_ERROR
30
+#    "ParaView requires an out of source Build. "
31
+#    "Please create a separate binary directory and run CMake there.")
32
+#endif()
33
+
34
+#------------------------------------------------------------------------------
35
+# Set a default build type if none was specified
36
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
37
+  message(STATUS "Setting build type to 'Debug' as none was specified.")
38
+  set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
39
+  # Set the possible values of build type for cmake-gui
40
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
41
+    "MinSizeRel" "RelWithDebInfo")
42
+endif()
43
+
27 44
 # If CMAKE_BUILD_TYPE is not specified, assume Release. 
28
-IF( NOT CMAKE_BUILD_TYPE )
29
-   SET( CMAKE_BUILD_TYPE Release ... FORCE )
30
-ENDIF()
45
+#IF( NOT CMAKE_BUILD_TYPE )
46
+#   SET( CMAKE_BUILD_TYPE Release ... FORCE )
47
+#ENDIF()
31 48
 
32 49
 option ( LEMMA_ENABLE_TESTING       "Turn on unit testing" OFF )
33 50
 option ( LEMMA_BUILD_EXAMPLES       "Compile example Lemma applications" OFF )
@@ -49,7 +66,7 @@ SET (CMAKE_CROSSCOMPILING TRUE)
49 66
 ## Only look for packages where we build them...this makes finding VTK a problem though! #
50 67
 ########################################################################################## 
51 68
 if (CMAKE_CROSSCOMPILING)
52
-    message ( STATUS "Cross-compiling! Only searching in install directory for components." )
69
+    message ( STATUS "Performing SuperBuild") #, Only searching in install directory for components." )
53 70
     # Kind of hack-ish, CMake doesn't always find this. It's buried in Cross compilation, so, 
54 71
     # hopefully anyone doing this can problem solve. 
55 72
     #    SET( CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/CMake ${CMAKE_INSTALL_PREFIX}/share/eigen3 )

Modules/FDEM1D/include/digitalfilterintegrator.h → Modules/FDEM1D/include/DigitalFilterIntegratorAnderson.h View File

@@ -11,22 +11,23 @@
11 11
   @version  $Id: digitalfilterintegrator.h 124 2014-02-07 04:26:26Z tirons $
12 12
  **/
13 13
 
14
+#pragma once
15
+
14 16
 #ifndef  DIGITALFILTERINTEGRATOR_INC
15 17
 #define  DIGITALFILTERINTEGRATOR_INC
16 18
 
17
-#include "integrator.h"
18
-#include "integrationkernel.h"
19
+#include "IntegrationKernel.h"
19 20
 
20 21
 namespace Lemma {
21 22
 
22 23
     // ===================================================================
23
-    //  Class:  DigitalFilterIntegrator
24
+    //  Class:  DigitalFilterIntegratorAnderson
24 25
     /**
25 26
       \brief   Reimplimentation of Walt Anderson's digital filtering
26 27
                algorithms which are public domain.
27 28
       \details Walt Anderson wrote several routines for digital filtering
28
-               that reused a lot of code. The original fortran codes are
29
-               available at:
29
+               that reused a lot of boilerplate code. The original fortran
30
+               codes are available at:
30 31
         ftp://ftpext.usgs.gov/pub/cr/co/denver/musette/pub/anderson/
31 32
                This is an abstract class. Concrete classes must define the
32 33
                a function to make arguments.
@@ -36,18 +37,34 @@ namespace Lemma {
36 37
      */
37 38
     // ===================================================================
38 39
     template <typename Scalar>
39
-    class DigitalFilterIntegrator : public Integrator {
40
+    class DigitalFilterIntegratorAnderson : public LemmaObject {
40 41
 
41 42
         /** Prints out basic info about the class, Complex implimentation */
42 43
 
43 44
         template <typename Scalar2>
44 45
         friend std::ostream &operator<<(std::ostream &stream,
45
-                        const DigitalFilterIntegrator<Scalar2> &ob);
46
+                        const DigitalFilterIntegratorAnderson<Scalar2> &ob);
46 47
 
47 48
         public:
48 49
 
49 50
             // ====================  LIFECYCLE     =======================
50 51
 
52
+            /** Default protected constructor. */
53
+            explicit DigitalFilterIntegratorAnderson (const ctor_key& key);
54
+
55
+            /** Default protected constructor. */
56
+            ~DigitalFilterIntegratorAnderson ();
57
+
58
+            /**
59
+             *  @return a YAML::Node serial object
60
+             */
61
+            YAML::Node Serialize() const;
62
+
63
+            /** Returns the name of the underlying class, similiar to Python's type */
64
+            virtual std::string GetName() const {
65
+                return this->CName;
66
+            }
67
+
51 68
             // ====================  OPERATORS     =======================
52 69
 
53 70
             // ====================  OPERATIONS    =======================
@@ -132,12 +149,6 @@ namespace Lemma {
132 149
 
133 150
             // ====================  LIFECYCLE     =======================
134 151
 
135
-            /** Default protected constructor. */
136
-            DigitalFilterIntegrator (const std::string& name);
137
-
138
-            /** Default protected constructor. */
139
-            ~DigitalFilterIntegrator ();
140
-
141 152
             // ====================  DATA MEMBERS  =========================
142 153
 
143 154
             /** A rewrite of Anderson's Pseudo-subroutine. */
@@ -213,8 +224,10 @@ namespace Lemma {
213 224
             Eigen::Matrix<int, Eigen::Dynamic, 1> Key;
214 225
 
215 226
         private:
227
+            /** ASCII string representation of the class name */
228
+            static constexpr auto CName = "DigitalFilterIntegratorAnderson.h";
216 229
 
217
-    }; // -----  end of class  DigitalFilterIntegrator  -----
230
+    }; // -----  end of class  DigitalFilterIntegratorAnderson  -----
218 231
 
219 232
 
220 233
     /////////////////////////////////////////
@@ -223,19 +236,19 @@ namespace Lemma {
223 236
     /////////////////////////////////////////
224 237
     /////////////////////////////////////////
225 238
 
239
+
226 240
     template <typename Scalar>
227
-    std::ostream &operator<<(std::ostream &stream,
228
-			const DigitalFilterIntegrator<Scalar> &ob) {
229
-		stream << *(Integrator*)(&ob);
230
-		return stream;
231
-	}
241
+    std::ostream &operator<<(std::ostream &stream, const DigitalFilterIntegratorAnderson<Scalar> &ob) {
242
+        stream << ob.Serialize()  << "\n";
243
+        return stream;
244
+    }
232 245
 
233 246
     // ====================  LIFECYCLE     =======================
234 247
 
235 248
     template <typename Scalar>
236
-    DigitalFilterIntegrator<Scalar>::
237
-            DigitalFilterIntegrator(const std::string& name) :
238
-        Integrator(name), Lambda(0), NumFun(0), NumConv(0), NumRel(0),
249
+    DigitalFilterIntegratorAnderson<Scalar>::
250
+            DigitalFilterIntegratorAnderson(const ctor_key& key) :
251
+        LemmaObject(key), Lambda(0), NumFun(0), NumConv(0), NumRel(0),
239 252
         ABSCISSA(0),
240 253
         ABSE(1.10517091807564762),   //   exp(.1)
241 254
         ABSER(0.904837418035959573), // 1/exp(.1)
@@ -243,24 +256,37 @@ namespace Lemma {
243 256
     }
244 257
 
245 258
     template <typename Scalar>
246
-    DigitalFilterIntegrator<Scalar>::~DigitalFilterIntegrator( ) {
259
+    YAML::Node DigitalFilterIntegratorAnderson<Scalar>::Serialize() const {
260
+        YAML::Node node = LemmaObject::Serialize();
261
+        node.SetTag( GetName() );
262
+        //node["Type"] = enum2String(Type);
263
+        //node["Location"] = Location;
264
+        //node["Phat"] = Phat;
265
+        //node["Freqs"] = Freqs;
266
+        //node["Phase"] = Phase;
267
+        //node["Moment"] = Moment;
268
+        return node;
269
+    }
270
+
271
+    template <typename Scalar>
272
+    DigitalFilterIntegratorAnderson<Scalar>::~DigitalFilterIntegratorAnderson( ) {
247 273
     }
248 274
 
249 275
     template <typename Scalar>
250 276
     Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic >
251
-        DigitalFilterIntegrator<Scalar>::GetAnswer() {
277
+        DigitalFilterIntegratorAnderson<Scalar>::GetAnswer() {
252 278
         return Ans;
253 279
     }
254 280
 
255 281
     // ====================  OPERATIONS    =======================
256 282
 
257 283
     template <typename Scalar>
258
-    void DigitalFilterIntegrator<Scalar>::SetNumConv(const int& i) {
284
+    void DigitalFilterIntegratorAnderson<Scalar>::SetNumConv(const int& i) {
259 285
         this->NumConv = i;
260 286
     }
261 287
 
262 288
     template <typename Scalar>
263
-    void DigitalFilterIntegrator<Scalar>::
289
+    void DigitalFilterIntegratorAnderson<Scalar>::
264 290
             AttachKernel(IntegrationKernel<Scalar> *ck) {
265 291
 		if (this->IntKernel == ck) return;
266 292
         if (this->IntKernel != NULL) {
@@ -272,7 +298,7 @@ namespace Lemma {
272 298
 
273 299
 
274 300
     template <typename Scalar>
275
-	void DigitalFilterIntegrator<Scalar>::DetachKernel( ) {
301
+	void DigitalFilterIntegratorAnderson<Scalar>::DetachKernel( ) {
276 302
 		if (this->IntKernel != NULL) {
277 303
 			this->IntKernel->DetachFrom(this);
278 304
 		}
@@ -280,19 +306,19 @@ namespace Lemma {
280 306
 	}
281 307
 
282 308
 //     template < >
283
-//     inline Complex DigitalFilterIntegrator<Complex>::AbsMax(const Complex& C,
309
+//     inline Complex DigitalFilterIntegratorAnderson<Complex>::AbsMax(const Complex& C,
284 310
 //         const Complex& Cmax) {
285 311
 // 		return Complex(std::max(std::abs(real(C)), std::real(Cmax)),
286 312
 // 					   std::max(std::abs(imag(C)), std::imag(Cmax)) );
287 313
 //     }
288 314
 //     template < >
289
-//     Real DigitalFilterIntegrator<Real>::AbsMax(const Real& C,
315
+//     Real DigitalFilterIntegratorAnderson<Real>::AbsMax(const Real& C,
290 316
 //         const Real& Cmax) {
291 317
 //         return std::max(C, Cmax);
292 318
 //     }
293 319
 
294 320
     template <typename Scalar>
295
-    VectorXr  DigitalFilterIntegrator<Scalar>::GetAbscissaArguments() {
321
+    VectorXr  DigitalFilterIntegratorAnderson<Scalar>::GetAbscissaArguments() {
296 322
         return this->Arg;
297 323
     }
298 324
 
@@ -300,7 +326,7 @@ namespace Lemma {
300 326
 // 	// Computes the transform
301 327
 //
302 328
 //     template < >
303
-//     void DigitalFilterIntegrator<Real>::Compute(const Real& rho,
329
+//     void DigitalFilterIntegratorAnderson<Real>::Compute(const Real& rho,
304 330
 //         const int& ntol, const Real& tol) {
305 331
 //
306 332
 // 		Real y1 = this->ABSCISSA/rho;
@@ -308,15 +334,15 @@ namespace Lemma {
308 334
 //
309 335
 // 		// Check to make sure everything is set
310 336
 // 		if (rho<=0) {
311
-// 			throw std::runtime_error("In DigitalFilterIntegrator Argument rho < 0.");
337
+// 			throw std::runtime_error("In DigitalFilterIntegratorAnderson Argument rho < 0.");
312 338
 // 		}
313 339
 //
314 340
 // 		if (this->NumConv<1) {
315
-// 			throw std::runtime_error("In DigitalFilterIntegrator NumConv is less than 1.");
341
+// 			throw std::runtime_error("In DigitalFilterIntegratorAnderson NumConv is less than 1.");
316 342
 // 		}
317 343
 //
318 344
 // 		if (this->IntKernel == NULL) {
319
-// 			throw std::runtime_error("In DigitalFilterIntegrator Unset Kernel Calculator");
345
+// 			throw std::runtime_error("In DigitalFilterIntegratorAnderson Unset Kernel Calculator");
320 346
 // 		}
321 347
 //
322 348
 // 		Arg = VectorXr::Zero(this->NumConv);
@@ -402,7 +428,7 @@ namespace Lemma {
402 428
 //
403 429
 //
404 430
 //     template < >
405
-// 	void DigitalFilterIntegrator<Complex>::Compute(const Real &rho,
431
+// 	void DigitalFilterIntegratorAnderson<Complex>::Compute(const Real &rho,
406 432
 //             const int& ntol, const Real &tol) {
407 433
 //
408 434
 // 		Real y1 = this->ABSCISSA/rho;
@@ -411,15 +437,15 @@ namespace Lemma {
411 437
 //
412 438
 // 		// Check to make sure everything is set
413 439
 // 		if (rho<=0) {
414
-// 			throw std::runtime_error("In DigitalFilterIntegrator Argument rho < 0.");
440
+// 			throw std::runtime_error("In DigitalFilterIntegratorAnderson Argument rho < 0.");
415 441
 // 		}
416 442
 //
417 443
 // 		if (this->NumConv<1) {
418
-// 			throw std::runtime_error("In DigitalFilterIntegrator NumConv is less than 1.");
444
+// 			throw std::runtime_error("In DigitalFilterIntegratorAnderson NumConv is less than 1.");
419 445
 // 		}
420 446
 //
421 447
 // 		if (this->IntKernel == NULL) {
422
-// 			throw std::runtime_error("In DigitalFilterIntegrator Unset Kernel Calculator");
448
+// 			throw std::runtime_error("In DigitalFilterIntegratorAnderson Unset Kernel Calculator");
423 449
 // 		}
424 450
 //
425 451
 // 		Arg = VectorXr::Zero(this->NumConv);
@@ -506,13 +532,13 @@ namespace Lemma {
506 532
 // 	}
507 533
 
508 534
     template <typename Scalar>
509
-    int DigitalFilterIntegrator<Scalar>::GetNumFun() {
535
+    int DigitalFilterIntegratorAnderson<Scalar>::GetNumFun() {
510 536
         return NumFun;
511 537
     }
512 538
 
513 539
     // generic rewrite of store-retreive 'pseudo-subroutine'
514 540
     template <typename Scalar>
515
-    void DigitalFilterIntegrator<Scalar>::StoreRetreive(const int &idx,
541
+    void DigitalFilterIntegratorAnderson<Scalar>::StoreRetreive(const int &idx,
516 542
             const int& lag, const Real& y, Scalar& Sum,
517 543
             const int& jrel, Scalar& C) {
518 544
 

+ 4
- 2
Modules/FDEM1D/include/DipoleSource.h View File

@@ -207,11 +207,13 @@ namespace Lemma {
207 207
 
208 208
             /** Determines if kernels have been loaded already, and if so if they can be reused
209 209
              */
210
-            void SetKernels(const int& ifreq,  const FIELDCALCULATIONS&  Fields, std::shared_ptr<FieldPoints> Receivers, const int& irec,
210
+            void SetKernels(const int& ifreq,  const FIELDCALCULATIONS&  Fields,
211
+                    std::shared_ptr<FieldPoints> Receivers, const int& irec,
211 212
                     std::shared_ptr<LayeredEarthEM> Earth );
212 213
 
213 214
             /** resets the kernels if they cannot be reused */
214
-            virtual void ReSetKernels(const int& ifreq,  const FIELDCALCULATIONS&  Fields, std::shared_ptr<FieldPoints> Receivers,
215
+            virtual void ReSetKernels(const int& ifreq,  const FIELDCALCULATIONS&  Fields,
216
+                    std::shared_ptr<FieldPoints> Receivers,
215 217
                     const int& irec, std::shared_ptr<LayeredEarthEM> Earth );
216 218
 
217 219
             /** Updates the receiver fields */

Modules/FDEM1D/include/digitalfiltercostrans.h → Modules/FDEM1D/include/FCTAnderson.h View File


Modules/FDEM1D/include/integrationkernel.h → Modules/FDEM1D/include/IntegrationKernel.h View File

@@ -7,10 +7,11 @@
7 7
 /**
8 8
   @file
9 9
   @author   Trevor Irons
10
-  @date     02/07/2011
11
-  @version  $Id: integrationkernel.h 193 2014-11-10 23:51:41Z tirons $
10
+  @date     02/07/2011, revisions 13 Dec. 2018
12 11
  **/
13 12
 
13
+#pragma once
14
+
14 15
 #ifndef  INTEGRATIONKERNEL_INC
15 16
 #define  INTEGRATIONKERNEL_INC
16 17
 
@@ -34,6 +35,11 @@ namespace Lemma {
34 35
 
35 36
             // ====================  LIFECYCLE     =======================
36 37
 
38
+            /// Default protected constructor.
39
+            explicit IntegrationKernel (const ctor_key& key);
40
+
41
+            /// Default protected constructor.
42
+            virtual ~IntegrationKernel ();
37 43
 
38 44
             // ====================  OPERATORS     =======================
39 45
 
@@ -55,18 +61,13 @@ namespace Lemma {
55 61
 
56 62
             // ====================  LIFECYCLE     =======================
57 63
 
58
-            /// Default protected constructor.
59
-            IntegrationKernel (const std::string& name);
60
-
61
-            /// Default protected constructor.
62
-            ~IntegrationKernel ();
63
-
64 64
             // ====================  DATA MEMBERS  =========================
65 65
 
66 66
         private:
67 67
 
68 68
     }; // -----  end of class  IntegrationKernel  -----
69 69
 
70
+/*
70 71
     template <typename T>
71 72
     IntegrationKernel<T>::IntegrationKernel(const std::string& name) :
72 73
         LemmaObject(name) {
@@ -75,6 +76,7 @@ namespace Lemma {
75 76
     template<typename T>
76 77
     IntegrationKernel<T>::~IntegrationKernel( ) {
77 78
     }
79
+*/
78 80
 
79 81
 //     template <typename T>
80 82
 //     T IntegrationKernel<T>::Argument(const Real& x, const int& iRelated) {

+ 0
- 81
Modules/FDEM1D/include/digitalfiltersintrans.h View File

@@ -1,81 +0,0 @@
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/18/2011
11
-  @version  $Id: digitalfiltersintrans.h 87 2013-09-05 22:44:05Z tirons $
12
- **/
13
-
14
-#ifndef __DIGITALFILTERSINTRANS_H
15
-#define __DIGITALFILTERSINTRANS_H
16
-
17
-#include "digitalfilterintegrator.h"
18
-
19
-namespace Lemma {
20
-
21
-	// ===================================================================
22
-	//        Class:  DigitalFilterSinTrans
23
-	/** \brief Sine Transform via digital filters
24
-	    \details Based on Andersons' Hankel transform, this calculates
25
-	 			the sine 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) \sin (x\omega)~dx
30
-				\f]
31
-    */
32
-
33
-	// ===================================================================
34
-	class DigitalFilterSinTrans : public DigitalFilterIntegrator<Real> {
35
-
36
-		friend std::ostream &operator<<(std::ostream &stream, const
37
-			DigitalFilterSinTrans &ob);
38
-
39
-		public:
40
-
41
-			// ====================  LIFECYCLE     =======================
42
-
43
-			static DigitalFilterSinTrans* New();
44
-
45
-			void Delete();
46
-
47
-			// ====================  OPERATORS     =======================
48
-
49
-			// ====================  OPERATIONS    =======================
50
-
51
-			// ====================  ACCESS        =======================
52
-
53
-			// ====================  INQUIRY       =======================
54
-
55
-		protected:
56
-
57
-			// ====================  LIFECYCLE     =======================
58
-
59
-			/// Default protected constructor.
60
-			DigitalFilterSinTrans (const std::string& name);
61
-
62
-			/// Default protected constructor.
63
-			~DigitalFilterSinTrans ();
64
-
65
-			void Release();
66
-
67
-			/// Set all the filter weights
68
-			void SetFilterWeights();
69
-
70
-			// ====================  DATA MEMBERS  =========================
71
-
72
-			//Eigen::Matrix<Real, 787, 1> FilterWeights;
73
-
74
-		private:
75
-
76
-    }; // -----  end of class  DigitalFilterSinTrans  -----
77
-
78
-} //end of namespace Lemma
79
-
80
-#endif // __DIGITALFILTERSINTRANS_H
81
-

+ 9
- 0
Modules/FDEM1D/src/CMakeLists.txt View File

@@ -24,6 +24,7 @@ set (FDEM1DSOURCE
24 24
 	#####################
25 25
 	# Hankel transforms #
26 26
 	#####################
27
+
27 28
 	# FHT
28 29
 	${CMAKE_CURRENT_SOURCE_DIR}/HankelTransform.cpp
29 30
 	${CMAKE_CURRENT_SOURCE_DIR}/FHTAnderson801.cpp
@@ -38,6 +39,14 @@ set (FDEM1DSOURCE
38 39
 	${CMAKE_CURRENT_SOURCE_DIR}/GQChave.cpp
39 40
 	${CMAKE_CURRENT_SOURCE_DIR}/QWEKey.cpp
40 41
 	
42
+	######################
43
+	# Sin/Cos transforms #
44
+	######################
45
+	
46
+	${CMAKE_CURRENT_SOURCE_DIR}/IntegrationKernel.cpp
47
+	${CMAKE_CURRENT_SOURCE_DIR}/DigitalFilterIntegratorAnderson.cpp
48
+	${CMAKE_CURRENT_SOURCE_DIR}/FastSinTransformAnderson.cpp
49
+		
41 50
 	# Calculation
42 51
 	${CMAKE_CURRENT_SOURCE_DIR}/EMEarth1D.cpp
43 52
 

Modules/FDEM1D/src/digitalfilterintegrator.cpp → Modules/FDEM1D/src/DigitalFilterIntegratorAnderson.cpp View File

@@ -11,23 +11,23 @@
11 11
   @version  $Id: digitalfilterintegrator.cpp 87 2013-09-05 22:44:05Z tirons $
12 12
  **/
13 13
 
14
-#include "digitalfilterintegrator.h"
14
+#include "DigitalFilterIntegratorAnderson.h"
15 15
 
16 16
 namespace Lemma {
17 17
 
18 18
     // Specialisations to templated class are found here. This means that
19
-    // DigitalFilterIntegrator is not strictly templated, and must be linked
19
+    // DigitalFilterIntegratorAnderson is not strictly templated, and must be linked
20 20
     // with lemma for functionality.
21 21
 
22 22
     template < >
23
-    inline Complex DigitalFilterIntegrator<Complex>::AbsMax(const Complex& C,
23
+    inline Complex DigitalFilterIntegratorAnderson<Complex>::AbsMax(const Complex& C,
24 24
         const Complex& Cmax) {
25 25
 		return Complex(std::max(std::abs(real(C)), std::real(Cmax)),
26 26
 					   std::max(std::abs(imag(C)), std::imag(Cmax)) );
27 27
     }
28 28
 
29 29
     template < >
30
-    Real DigitalFilterIntegrator<Real>::AbsMax(const Real& C,
30
+    Real DigitalFilterIntegratorAnderson<Real>::AbsMax(const Real& C,
31 31
         const Real& Cmax) {
32 32
         return std::max(C, Cmax);
33 33
     }
@@ -36,7 +36,7 @@ namespace Lemma {
36 36
 	// Computes the transform y
37 37
 
38 38
     template < >
39
-    void DigitalFilterIntegrator<Real>::Compute(const Real& rho,
39
+    void DigitalFilterIntegratorAnderson<Real>::Compute(const Real& rho,
40 40
         const int& ntol, const Real& tol) {
41 41
 
42 42
 		Real y1 = this->ABSCISSA/rho;
@@ -44,15 +44,15 @@ namespace Lemma {
44 44
 
45 45
 		// Check to make sure everything is set
46 46
 		if (rho<=0) {
47
-			throw std::runtime_error("In DigitalFilterIntegrator Argument rho < 0.");
47
+			throw std::runtime_error("In DigitalFilterIntegratorAnderson Argument rho < 0.");
48 48
 		}
49 49
 
50 50
 		if (this->NumConv<1) {
51
-			throw std::runtime_error("In DigitalFilterIntegrator NumConv is less than 1.");
51
+			throw std::runtime_error("In DigitalFilterIntegratorAnderson NumConv is less than 1.");
52 52
 		}
53 53
 
54 54
 		if (this->IntKernel == NULL) {
55
-			throw std::runtime_error("In DigitalFilterIntegrator Unset Kernel Calculator");
55
+			throw std::runtime_error("In DigitalFilterIntegratorAnderson Unset Kernel Calculator");
56 56
 		}
57 57
 
58 58
 		Arg = VectorXr::Zero(this->NumConv);
@@ -138,7 +138,7 @@ namespace Lemma {
138 138
 
139 139
 
140 140
     template < >
141
-	void DigitalFilterIntegrator<Complex>::Compute(const Real &rho,
141
+	void DigitalFilterIntegratorAnderson<Complex>::Compute(const Real &rho,
142 142
             const int& ntol, const Real &tol) {
143 143
 
144 144
 		Real y1 = this->ABSCISSA/rho;
@@ -147,15 +147,15 @@ namespace Lemma {
147 147
 
148 148
 		// Check to make sure everything is set
149 149
 		if (rho<=0) {
150
-			throw std::runtime_error("In DigitalFilterIntegrator Argument rho < 0.");
150
+			throw std::runtime_error("In DigitalFilterIntegratorAnderson Argument rho < 0.");
151 151
 		}
152 152
 
153 153
 		if (this->NumConv<1) {
154
-			throw std::runtime_error("In DigitalFilterIntegrator NumConv is less than 1.");
154
+			throw std::runtime_error("In DigitalFilterIntegratorAnderson NumConv is less than 1.");
155 155
 		}
156 156
 
157 157
 		if (this->IntKernel == NULL) {
158
-			throw std::runtime_error("In DigitalFilterIntegrator Unset Kernel Calculator");
158
+			throw std::runtime_error("In DigitalFilterIntegratorAnderson Unset Kernel Calculator");
159 159
 		}
160 160
 
161 161
 		Arg = VectorXr::Zero(this->NumConv);

+ 2
- 1
Modules/FDEM1D/src/FHTAnderson801.cpp View File

@@ -994,7 +994,8 @@ namespace Lemma {
994 994
 		this->Key.setZero( );
995 995
         //std::memset(Key, 0, 801*sizeof(int));
996 996
 
997
-		// Check to make sure everything is set
997
+		// Check to make sure everything is set, we call this a lot though, so disable checks
998
+        // in release.
998 999
         #ifndef NDEBUG
999 1000
 		if (rho<=0) {
1000 1001
 			throw std::runtime_error("In Hankel 2 Argument rho < 0.");

Modules/FDEM1D/src/integrationkernel.cpp → Modules/FDEM1D/src/IntegrationKernel.cpp View File

@@ -11,13 +11,13 @@
11 11
   @version  $Id: integrationkernel.cpp 193 2014-11-10 23:51:41Z tirons $
12 12
  **/
13 13
 
14
-#include "integrationkernel.h"
14
+#include "IntegrationKernel.h"
15 15
 
16 16
 namespace Lemma {
17 17
 
18 18
     template <typename T>
19
-    IntegrationKernel<T>::IntegrationKernel(const std::string& name) :
20
-        LemmaObject(name) {
19
+    IntegrationKernel<T>::IntegrationKernel(const ctor_key& key) :
20
+        LemmaObject(key) {
21 21
     }
22 22
 
23 23
     template<typename T>

+ 0
- 464
Modules/FDEM1D/src/digitalfiltersintrans.cpp View File

@@ -1,464 +0,0 @@
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/16/2011
11
-  @version  $Id: digitalfiltersintrans.cpp 87 2013-09-05 22:44:05Z tirons $
12
- **/
13
-
14
-#include "digitalfiltersintrans.h"
15
-
16
-namespace Lemma {
17
-
18
-    // ====================  FRIENDS       =======================
19
-
20
-    std::ostream &operator<<(std::ostream &stream,
21
-			const DigitalFilterSinTrans &ob) {
22
-		stream << *(DigitalFilterIntegrator<Real>*)(&ob);
23
-		return stream;
24
-	}
25
-
26
-    // ====================  LIFECYCLE     =======================
27
-
28
-	DigitalFilterSinTrans::DigitalFilterSinTrans(const std::string&name) :
29
-		DigitalFilterIntegrator<Real>(name) {
30
-        SetFilterWeights();
31
-        NumConv = 1;
32
-        ilow = 425;
33
-        ihi = 460;
34
-        ABSCISSA = 0.7745022656977834;
35
-        //IntKernel = CosTransIntegrationKernel::New();
36
-	}
37
-
38
-	DigitalFilterSinTrans::~DigitalFilterSinTrans() {
39
-        if (IntKernel != NULL) {
40
-            IntKernel->DetachFrom(this);
41
-            IntKernel = NULL;
42
-        }
43
-	}
44
-
45
-	DigitalFilterSinTrans* DigitalFilterSinTrans::New() {
46
-		DigitalFilterSinTrans* Obj =
47
-			new DigitalFilterSinTrans("DigitalFilterSinTrans");
48
-		Obj->AttachTo(Obj);
49
-		return Obj;
50
-	}
51
-
52
-	void DigitalFilterSinTrans::Delete() {
53
-		this->DetachFrom(this);
54
-	}
55
-
56
-	void DigitalFilterSinTrans::Release() {
57
-		delete this;
58
-	}
59
-
60
-    // ====================  OPERATIONS    =======================
61
-
62
-	void DigitalFilterSinTrans::SetFilterWeights() {
63
-		//Same number of coefficients as the cosine transform
64
-		FilterWeights.resize(787);
65
-		Key.resize(787);
66
-		Work.resize(787, NumRel);
67
-		this->FilterWeights <<
68
-			 4.519086190454403E-29,-9.339715413211410E-29,
69
-			 1.907086488243319E-28,-2.926740419085585E-28,
70
-			 4.016341837702778E-28,-5.205269186311504E-28,
71
-			 6.517833605193130E-28,-7.967548954470954E-28,
72
-			 9.568276718198612E-28,-1.135805242625555E-27,
73
-			 1.341437536522928E-27,-1.584604744296628E-27,
74
-			 1.876875146781600E-27,-2.228200512918392E-27,
75
-			 2.645681468388641E-27,-3.133421673989624E-27,
76
-			 3.693471763710930E-27,-4.327595342414010E-27,
77
-			 5.039000943393479E-27,-5.833332055385210E-27,
78
-			 6.719340442247252E-27,-7.710109799166923E-27,
79
-			 8.824593601800077E-27,-1.008809737899913E-26,
80
-			 1.153087819007531E-26,-1.318573428833282E-26,
81
-			 1.508632848921759E-26,-1.726724501006653E-26,
82
-			 1.976529598469166E-26,-2.262087271971451E-26,
83
-			 2.587877027540831E-26,-2.958891513809359E-26,
84
-			 3.380756725224869E-26,-3.859914775323363E-26,
85
-			 4.403862178004457E-26,-5.021419292439053E-26,
86
-			 5.722969551574750E-26,-6.520606418485730E-26,
87
-			 7.428212579422239E-26,-8.461557977402292E-26,
88
-			 9.638471499797232E-26,-1.097907018143775E-25,
89
-			 1.250600971971666E-25,-1.424476805594983E-25,
90
-			 1.622403124908015E-25,-1.847622752118429E-25,
91
-			 2.103817835334522E-25,-2.395181391816518E-25,
92
-			 2.726499236157535E-25,-3.103251036607772E-25,
93
-			 3.531729413199891E-25,-4.019163393605676E-25,
94
-			 4.573837905690991E-25,-5.205218550552940E-25,
95
-			 5.924100002797128E-25,-6.742788104825517E-25,
96
-			 7.675312493515405E-25,-8.737657967045221E-25,
97
-			 9.948010684981015E-25,-1.132702852601557E-24,
98
-			 1.289815274051798E-24,-1.468796997184372E-24,
99
-			 1.672663454907744E-24,-1.904836740815919E-24,
100
-			 2.169205882613385E-24,-2.470198700421404E-24,
101
-			 2.812864533285517E-24,-3.202964869374407E-24,
102
-			 3.647071555907292E-24,-4.152674762505081E-24,
103
-			 4.728305934616842E-24,-5.383678610889903E-24,
104
-			 6.129850575416668E-24,-6.979408353295871E-24,
105
-			 7.946678501710549E-24,-9.047967050654569E-24,
106
-			 1.030183273201298E-23,-1.172939535974881E-23,
107
-			 1.335468970408732E-23,-1.520506989792332E-23,
108
-			 1.731167873568262E-23,-1.970998238900646E-23,
109
-			 2.244038375223756E-23,-2.554891109141771E-23,
110
-			 2.908800212317214E-23,-3.311738161673479E-23,
111
-			 3.770506652613824E-23,-4.292849755751231E-23,
112
-			 4.887584419793589E-23,-5.564747348119901E-23,
113
-			 6.335764555403829E-23,-7.213641884192625E-23,
114
-			 8.213185708614141E-23,-9.351250590466155E-23,
115
-			 1.064702652070505E-22,-1.212235989202909E-22,
116
-			 1.380212637669216E-22,-1.571464627021063E-22,
117
-			 1.789216833692896E-22,-2.037140677202572E-22,
118
-			 2.319416886961351E-22,-2.640804920121902E-22,
119
-			 3.006724483628496E-22,-3.423345344607581E-22,
120
-			 3.897693304501770E-22,-4.437766344557916E-22,
121
-			 5.052672367873663E-22,-5.752779264041773E-22,
122
-			 6.549893990733216E-22,-7.457456427231128E-22,
123
-			 8.490772387335222E-22,-9.667263925372798E-22,
124
-			 1.100677264803472E-21,-1.253188268156373E-21,
125
-			 1.426831572556448E-21,-1.624534745260255E-21,
126
-			 1.849632235986410E-21,-2.105919014055614E-21,
127
-			 2.397717720265674E-21,-2.729947694949692E-21,
128
-			 3.108212647296628E-21,-3.538889390172954E-21,
129
-			 4.029242408342459E-21,-4.587537765144882E-21,
130
-			 5.223192986426113E-21,-5.946923044249243E-21,
131
-			 6.770936697567055E-21,-7.709123239579199E-21,
132
-			 8.777310068392340E-21,-9.993501047681958E-21,
133
-			 1.137821494603412E-20,-1.295478887104638E-20,
134
-			 1.474982378032821E-20,-1.679356954738640E-20,
135
-			 1.912051261376801E-20,-2.176986279743765E-20,
136
-			 2.478633017643540E-20,-2.822073770460957E-20,
137
-			 3.213105082813427E-20,-3.658314411923333E-20,
138
-			 4.165216959294550E-20,-4.742350946454843E-20,
139
-			 5.399460006022600E-20,-6.147610566668155E-20,
140
-			 6.999435769179613E-20,-7.969278499925461E-20,
141
-			 9.073518741196294E-20,-1.033074536152729E-19,
142
-			 1.176219711201683E-19,-1.339196499267872E-19,
143
-			 1.524758875590042E-19,-1.736028891015458E-19,
144
-			 1.976577702338448E-19,-2.250451123066827E-19,
145
-			 2.562280190911125E-19,-2.917307540064815E-19,
146
-			 3.321538976139149E-19,-3.781767593800005E-19,
147
-			 4.305782565276538E-19,-4.902385383010367E-19,
148
-			 5.581678864101238E-19,-6.355065796403268E-19,
149
-			 7.235650952324198E-19,-8.238205902566872E-19,
150
-			 9.379730988161989E-19,-1.067935983426557E-18,
151
-			 1.215914876207947E-18,-1.384387860555074E-18,
152
-			 1.576216891832665E-18,-1.794611006906676E-18,
153
-			 2.043284318190411E-18,-2.326391762796314E-18,
154
-			 2.648754138285296E-18,-3.015750110424166E-18,
155
-			 3.433638103530407E-18,-3.909379456027323E-18,
156
-			 4.451100704654134E-18,-5.067809360821606E-18,
157
-			 5.770060327858650E-18,-6.569505440663543E-18,
158
-			 7.479857530176959E-18,-8.516184129746393E-18,
159
-			 9.696306653881282E-18,-1.103970228659850E-17,
160
-			 1.256954070708544E-17,-1.431098828414357E-17,
161
-			 1.629418091510444E-17,-1.855161949305473E-17,
162
-			 2.112251982431457E-17,-2.404883030225413E-17,
163
-			 2.738161098629106E-17,-3.117496715967868E-17,
164
-			 3.549542289668629E-17,-4.041270829342227E-17,
165
-			 4.601355794199069E-17,-5.238775618130511E-17,
166
-			 5.964848186475663E-17,-6.791121691023222E-17,
167
-			 7.732378583243061E-17,-8.803453656899252E-17,
168
-			 1.002367506589228E-16,-1.141207151607239E-16,
169
-			 1.299394517387315E-16,-1.479366207688721E-16,
170
-			 1.684438994882969E-16,-1.917726554733372E-16,
171
-			 2.183583387005876E-16,-2.485978764937954E-16,
172
-			 2.830639416126730E-16,-3.222610765667943E-16,
173
-			 3.669438668141347E-16,-4.177514390747528E-16,
174
-			 4.756802050039284E-16,-5.415364164475966E-16,
175
-			 6.166389337226809E-16,-7.019997076546317E-16,
176
-			 7.993689686576395E-16,-9.100089857117708E-16,
177
-			 1.036249133688131E-15,-1.179651807131579E-15,
178
-			 1.343326900422591E-15,-1.529189515686284E-15,
179
-			 1.741405751368545E-15,-1.982293701749077E-15,
180
-			 2.257454882110670E-15,-2.569648892095082E-15,
181
-			 2.926436822402734E-15,-3.331029913939900E-15,
182
-			 3.793676909909576E-15,-4.317994472774402E-15,
183
-			 4.917935321484997E-15,-5.597373071100983E-15,
184
-			 6.375390057182862E-15,-7.255792277807143E-15,
185
-			 8.264801128606280E-15,-9.405537165055569E-15,
186
-			 1.071420644035709E-14,-1.219214915931198E-14,
187
-			 1.388960394313136E-14,-1.580427268552795E-14,
188
-			 1.800620968515390E-14,-2.048641568507301E-14,
189
-			 2.334305662501363E-14,-2.655548553367103E-14,
190
-			 3.026192648607248E-14,-3.442221623150520E-14,
191
-			 3.923190211789030E-14,-4.461893198803410E-14,
192
-			 5.086121105139434E-14,-5.783551844666699E-14,
193
-			 6.593852855730308E-14,-7.496602415439665E-14,
194
-			 8.548655485671044E-14,-9.716902808177407E-14,
195
-			 1.108315208765312E-13,-1.259458312388695E-13,
196
-			 1.436933683252974E-13,-1.632417225266264E-13,
197
-			 1.863027688321447E-13,-2.115771091886518E-13,
198
-			 2.415529925720814E-13,-2.742172912312053E-13,
199
-			 3.131970387082062E-13,-3.553922261911766E-13,
200
-			 4.061035675187256E-13,-4.605809413353380E-13,
201
-			 5.265892490959544E-13,-5.968795167949857E-13,
202
-			 6.828504569587442E-13,-7.734770560272592E-13,
203
-			 8.855241689907420E-13,-1.002271124202202E-12,
204
-			 1.148416995714124E-12,-1.298663208549853E-12,
205
-			 1.489453100122077E-12,-1.682586391404361E-12,
206
-			 1.931907280346413E-12,-2.179832324535619E-12,
207
-			 2.506009817027883E-12,-2.823763626714695E-12,
208
-			 3.251036383068994E-12,-3.657522083511441E-12,
209
-			 4.218031428263349E-12,-4.736873852220176E-12,
210
-			 5.473359729916149E-12,-6.133871906007721E-12,
211
-			 7.103341924139109E-12,-7.941565166210412E-12,
212
-			 9.220310756445447E-12,-1.028004550802915E-11,
213
-			 1.197053221213684E-11,-1.330420077896753E-11,
214
-			 1.554457869729160E-11,-1.721363713771749E-11,
215
-			 2.019093243336348E-11,-2.226535054417105E-11,
216
-			 2.623385317715458E-11,-2.878986806971887E-11,
217
-			 3.409688864363201E-11,-3.721174703331319E-11,
218
-			 4.433387089687385E-11,-4.807551416154768E-11,
219
-			 5.766987237954167E-11,-6.207834479976159E-11,
220
-			 7.505545387359396E-11,-8.011101399321720E-11,
221
-			 9.773871151888171E-11,-1.033088762718738E-10,
222
-			 1.273612451487001E-10,-1.331148100865271E-10,
223
-			 1.660864014336979E-10,-1.713561270888201E-10,
224
-			 2.167712428480381E-10,-2.203372791851255E-10,
225
-			 2.831980148718330E-10,-2.829496057001224E-10,
226
-			 3.703869422887365E-10,-3.627980397893734E-10,
227
-			 4.850207201792002E-10,-4.643421461158355E-10,
228
-			 6.360231449851816E-10,-5.930443189593078E-10,
229
-			 8.353515059977503E-10,-7.555102296535103E-10,
230
-			 1.099086883072858E-09,-9.595938165682892E-10,
231
-			 1.448941662513427E-09,-1.214418403431928E-09,
232
-			 1.914354201982380E-09,-1.530232541828562E-09,
233
-			 2.535413701041661E-09,-1.917967238636924E-09,
234
-			 3.366964327985339E-09,-2.388280225383556E-09,
235
-			 4.484391763894045E-09,-2.949747512489630E-09,
236
-			 5.991820026480242E-09,-3.605669450820265E-09,
237
-			 8.033774905885646E-09,-4.348662889559140E-09,
238
-			 1.081185161881095E-08,-5.151760029833092E-09,
239
-			 1.460863092797377E-08,-5.954048869440942E-09,
240
-			 1.982212746243125E-08,-6.637850452739543E-09,
241
-			 2.701558565884670E-08,-6.992855428994142E-09,
242
-			 3.698969905307490E-08,-6.660268099150364E-09,
243
-			 5.088766862234823E-08,-5.046427612646975E-09,
244
-			 7.034845702641431E-08,-1.189990213788075E-09,
245
-			 9.773091311662091E-08, 6.441339406826419E-09,
246
-			 1.364422877792574E-07, 2.026069653953343E-08,
247
-			 1.914207530941986E-07, 4.403297240671824E-08,
248
-			 2.698454243003982E-07, 8.358850780049443E-08,
249
-			 3.821828678435025E-07, 1.479022772000465E-07,
250
-			 5.437318168094116E-07, 2.507226084953915E-07,
251
-			 7.769062342581499E-07, 4.130252690891796E-07,
252
-			 1.114613518638701E-06, 6.667060493527094E-07,
253
-			 1.605258236346765E-06, 1.060130280292916E-06,
254
-			 2.320160162069900E-06, 1.666464612725961E-06,
255
-			 3.364560133136435E-06, 2.596174981355472E-06,
256
-			 4.893960156014256E-06, 4.015759771727380E-06,
257
-			 7.138397535039002E-06, 6.175810373704275E-06,
258
-			 1.043852386492282E-05, 9.453018910283816E-06,
259
-			 1.529925306344126E-05, 1.441303290654501E-05,
260
-			 2.246956262435983E-05, 2.190445818635350E-05,
261
-			 3.306123161466435E-05, 3.319938341030514E-05,
262
-			 4.872554987486263E-05, 5.020335754327977E-05,
263
-			 7.191633170111086E-05, 7.576900218644445E-05,
264
-			 1.062813859178838E-04, 1.141641643802547E-04,
265
-			 1.572450969332647E-04, 1.717703221930222E-04,
266
-			 2.328751169425117E-04, 2.581236364185096E-04,
267
-			 3.451709156798280E-04, 3.874650245753196E-04,
268
-			 5.119775374980107E-04, 5.810445069347065E-04,
269
-			 7.598232475621811E-04, 8.705390306182757E-04,
270
-			 1.128116358716784E-03, 1.303104717626917E-03,
271
-			 1.675327916301618E-03, 1.948807411825891E-03,
272
-			 2.488044976374601E-03, 2.911467293668464E-03,
273
-			 3.694103557020186E-03, 4.344298949393989E-03,
274
-			 5.481360712089968E-03, 6.472046368434359E-03,
275
-			 8.123895409393892E-03, 9.621355456586993E-03,
276
-			 1.201713561934862E-02, 1.426025794636169E-02,
277
-			 1.772160768805842E-02, 2.104435746141294E-02,
278
-			 2.600944034318140E-02, 3.085828026010451E-02,
279
-			 3.789358111566572E-02, 4.481923933568410E-02,
280
-			 5.458716136402632E-02, 6.416184799000865E-02,
281
-			 7.727199941242613E-02, 8.982755932806265E-02,
282
-			 1.064254421326244E-01, 1.214134956891936E-01,
283
-			 1.402491646624913E-01, 1.549103199447484E-01,
284
-			 1.715485184963992E-01, 1.786033886777877E-01,
285
-			 1.827088851861087E-01, 1.675422102829242E-01,
286
-			 1.407983439987153E-01, 8.162579672849707E-02,
287
-			 2.858447717701069E-03,-1.152686206415223E-01,
288
-			-2.421516386308682E-01,-3.812981622302894E-01,
289
-			-4.639824707365586E-01,-4.676754754771468E-01,
290
-			-2.983922369012484E-01, 1.962768518309340E-02,
291
-			 4.615749449787655E-01, 7.571539594142682E-01,
292
-			 6.725778299920618E-01,-2.282965939549971E-02,
293
-			-8.636206091858209E-01,-1.015125148503644E+00,
294
-			 2.432665171231830E-01, 1.368855569487176E+00,
295
-			 2.856162774022951E-01,-1.804149507828080E+00,
296
-			 4.533604735331026E-01, 1.511758555237049E+00,
297
-			-1.909629765056948E+00, 1.069005333649147E+00,
298
-			-1.178375735699469E-01,-4.119085433366451E-01,
299
-			 5.558053315672025E-01,-5.042611820681206E-01,
300
-			 3.952161415642411E-01,-2.910574896760750E-01,
301
-			 2.096946427258310E-01,-1.509580770735921E-01,
302
-			 1.097522132187282E-01,-8.093658545655293E-02,
303
-			 6.057900864438948E-02,-4.595801396907676E-02,
304
-			 3.526341496281775E-02,-2.730346497971181E-02,
305
-			 2.128837318669908E-02,-1.668596224808419E-02,
306
-			 1.312967661769313E-02,-1.036095586387300E-02,
307
-			 8.193157054943619E-03,-6.488727811475892E-03,
308
-			 5.144495374133109E-03,-4.081960541714881E-03,
309
-			 3.240723341083809E-03,-2.573908860969868E-03,
310
-			 2.044902564517464E-03,-1.624966594846773E-03,
311
-			 1.291465382262761E-03,-1.026523739285122E-03,
312
-			 8.159991714412245E-04,-6.486871353788918E-04,
313
-			 5.157019263358405E-04,-4.099917485806924E-04,
314
-			 3.259573396167529E-04,-2.591511272468608E-04,
315
-			 2.060393933618002E-04,-1.638139563220660E-04,
316
-			 1.302428944388295E-04,-1.035521166699833E-04,
317
-			 8.233134695725269E-05,-6.545945702523444E-05,
318
-			 5.204514861201607E-05,-4.137981961749043E-05,
319
-			 3.290010486595251E-05,-2.615810167862320E-05,
320
-			 2.079770185899022E-05,-1.653577691984197E-05,
321
-			 1.314722074735249E-05,-1.045305829437006E-05,
322
-			 8.310991516938568E-06,-6.607882958945550E-06,
323
-			 5.253779852702802E-06,-4.177162948246520E-06,
324
-			 3.321169005036239E-06,-2.640587391141323E-06,
325
-			 2.099472167888885E-06,-1.669243535881050E-06,
326
-			 1.327178346968277E-06,-1.055209941709689E-06,
327
-			 8.389739249503043E-07,-6.670494862601122E-07,
328
-			 5.303561942591048E-07,-4.216744016303114E-07,
329
-			 3.352639284891773E-07,-2.665608855859320E-07,
330
-			 2.119366259147424E-07,-1.685060930903601E-07,
331
-			 1.339754432660642E-07,-1.065208923693739E-07,
332
-			 8.469239020916003E-08,-6.733703409093301E-08,
333
-			 5.353817677449518E-08,-4.256701249734076E-08,
334
-			 3.384408402893838E-08,-2.690867780042694E-08,
335
-			 2.139449069787337E-08,-1.701028327972431E-08,
336
-			 1.352449755955155E-08,-1.075302693551076E-08,
337
-			 8.549492340901277E-09,-6.797511037206932E-09,
338
-			 5.404549702807423E-09,-4.297037155315087E-09,
339
-			 3.416478584420968E-09,-2.716366067339561E-09,
340
-			 2.159722190085306E-09,-1.717147034705988E-09,
341
-			 1.365265381135002E-09,-1.085492111933322E-09,
342
-			 8.630506137215972E-10,-6.861923302473438E-10,
343
-			 5.455762461365737E-10,-4.337755280138903E-10,
344
-			 3.448852659061754E-10,-2.742105973115728E-10,
345
-			 2.180187416052945E-10,-1.733418480408352E-10,
346
-			 1.378202445493526E-10,-1.095778083781342E-10,
347
-			 8.712287608917021E-11,-6.926945929969819E-11,
348
-			 5.507460505331545E-11,-4.378859244194077E-11,
349
-			 3.481533505726639E-11,-2.768089786642390E-11,
350
-			 2.200846567772674E-11,-1.749844112121302E-11,
351
-			 1.391262099629252E-11,-1.106161524020212E-11,
352
-			 8.794844030523375E-12,-6.992584703096528E-12,
353
-			 5.559648432809331E-12,-4.420352703548207E-12,
354
-			 3.514524031458616E-12,-2.794319819206459E-12,
355
-			 2.221701482790797E-12,-1.766425390825141E-12,
356
-			 1.404445505192163E-12,-1.116643356280387E-12,
357
-			 8.878182745412279E-13,-7.058845460186685E-13,
358
-			 5.612330885763100E-13,-4.462239349060042E-13,
359
-			 3.547827170807447E-13,-2.820798403939499E-13,
360
-			 2.242754016089481E-13,-1.783163791396228E-13,
361
-			 1.417753834852610E-13,-1.127224512924624E-13,
362
-			 8.962311166429105E-14,-7.125734094978236E-14,
363
-			 5.665512550244704E-14,-4.504522906558543E-14,
364
-			 3.581445886076434E-14,-2.847527896066489E-14,
365
-			 2.264006040254001E-14,-1.800060802704875E-14,
366
-			 1.431188272386055E-14,-1.137905935138482E-14,
367
-			 9.047236776658255E-15,-7.193256557121187E-15,
368
-			 5.719198156731723E-15,-4.547207137145127E-15,
369
-			 3.615383167608584E-15,-2.874510673128837E-15,
370
-			 2.285459445620894E-15,-1.817117927723045E-15,
371
-			 1.444750012769246E-15,-1.148688573014634E-15,
372
-			 9.132967130053839E-16,-7.261418852616671E-16,
373
-			 5.773392480475140E-16,-4.590295837506217E-16,
374
-			 3.649642034053721E-16,-2.901749135190327E-16,
375
-			 2.307116140436942E-16,-1.834336683660563E-16,
376
-			 1.458440262302222E-16,-1.159573385656211E-16,
377
-			 9.219509852266826E-17,-7.330227044488768E-17,
378
-			 5.828100342071381E-17,-4.633792840399525E-17,
379
-			 3.684225532762789E-17,-2.929245705146663E-17,
380
-			 2.328978051105255E-17,-1.851718602164869E-17,
381
-			 1.472260238767692E-17,-1.170561341297906E-17,
382
-			 9.306872641520070E-18,-7.399687253379369E-18,
383
-			 5.883326607803712E-18,-4.677702014739752E-18,
384
-			 3.719136739613880E-18,-2.957002828302571E-18,
385
-			 2.351047121536452E-18,-1.869265228476306E-18,
386
-			 1.486211170428986E-18,-1.181653416196487E-18,
387
-			 9.395063257031646E-19,-7.469805646126344E-19,
388
-			 5.939076179015729E-19,-4.722027256379258E-19,
389
-			 3.754378751739167E-19,-2.985022967459849E-19,
390
-			 2.373325310854237E-19,-1.886978121843854E-19,
391
-			 1.500294299097576E-19,-1.192850600158091E-19,
392
-			 9.484089595818352E-20,-7.540588530116191E-20,
393
-			 5.995354099387067E-20,-4.766772603294524E-20,
394
-			 3.789954805412417E-20,-3.013308718206562E-20,
395
-			 2.395814700817093E-20,-1.904858950112549E-20,
396
-			 1.514510957672512E-20,-1.204153954009819E-20,
397
-			 9.573960050057665E-21,-7.612042487983742E-21,
398
-			 6.052165469011701E-21,-4.811941935554926E-21,
399
-			 3.825867772694447E-21,-3.041862118819870E-21,
400
-			 2.418516642409082E-21,-1.922908502426471E-21,
401
-			 1.528861481986123E-21,-1.215563454903229E-21,
402
-			 9.664671642003589E-22,-7.684162553978440E-22,
403
-			 6.109504047471497E-22,-4.857528416823409E-22,
404
-			 3.862110855330143E-22,-3.070676966569801E-22,
405
-			 2.441425971113178E-22,-1.941122955877971E-22,
406
-			 1.543343556015419E-22,-1.227078345565842E-22,
407
-			 9.756232141971099E-23,-7.756971208813704E-23,
408
-			 6.167406266892664E-23,-4.903581613923544E-23,
409
-			 3.898745781389350E-23,-3.099825880130062E-23,
410
-			 2.464624570708451E-23,-1.959591536406367E-23,
411
-			 1.558051651712082E-23,-1.238796173479821E-23,
412
-			 9.849625195167609E-24,-7.831435654861331E-24,
413
-			 6.226795451209084E-24,-4.950951685405124E-24,
414
-			 3.936520905478440E-24,-3.129929802298849E-24,
415
-			 2.488584770157100E-24,-1.978622297628744E-24,
416
-			 1.573121213803113E-24,-1.250680505229501E-24,
417
-			 9.942866354722078E-25,-7.904119407074957E-25,
418
-			 6.282983380266727E-25,-4.993888550242444E-25,
419
-			 3.968764501205991E-25,-3.153465565806142E-25,
420
-			 2.504952335417932E-25,-1.989067071293495E-25,
421
-			 1.578744037087885E-25,-1.252528942885154E-25,
422
-			 9.933547263601893E-26,-7.875756004541075E-26,
423
-			 6.242484682723995E-26,-4.946074258240189E-26,
424
-			 3.916606766138584E-26,-3.098609190290296E-26,
425
-			 2.448266612392087E-26,-1.931034281011451E-26,
426
-			 1.519618180226741E-26,-1.192353131496834E-26,
427
-			 9.319757733847061E-27,-7.247010142017766E-27,
428
-			 5.595281281317008E-27,-4.277815801389812E-27,
429
-			 3.228199604942252E-27,-2.397244120563833E-27,
430
-			 1.748239591243191E-27,-1.251355005015151E-27,
431
-			 8.794257877849950E-28,-6.065291790558063E-28,
432
-			 4.090426687827314E-28,-2.676669295980934E-28,
433
-			 1.687971022918484E-28,-1.044337763175647E-28,
434
-			 7.050578391076381E-29,-6.406578964496667E-29,
435
-			 8.047966445795522E-29,-1.121534977637725E-28,
436
-			 1.496948518403447E-28,-1.846610467538164E-28,
437
-			 2.120865254113486E-28,-2.314246444782675E-28,
438
-			 2.456355516626332E-28,-2.590895710468579E-28,
439
-			 2.753571339247125E-28,-2.961734255384709E-28,
440
-			 3.222852751815456E-28,-3.554096868418778E-28,
441
-			 3.994470369697907E-28,-4.595315984451220E-28,
442
-			 5.391210400875100E-28,-6.364075603215328E-28,
443
-			 7.416537866632483E-28,-8.373375968928217E-28,
444
-			 9.020712825598172E-28,-9.167392508097227E-28,
445
-			 8.694251225012477E-28,-7.570921079500922E-28,
446
-			 5.849601896353324E-28,-3.650523966203355E-28,
447
-			 1.141119602484722E-28, 1.491703156191346E-28,
448
-			-4.067578199248336E-28, 6.427512747502163E-28,
449
-			-8.440676076304842E-28, 1.001129119104450E-27,
450
-			-1.108757116989416E-27, 1.166928305547677E-27,
451
-			-1.180901419514423E-27, 1.160312647193067E-27,
452
-			-1.116872557002111E-27, 1.060982755116985E-27,
453
-			-9.988396142394386E-28, 9.317938546853034E-28,
454
-			-8.581732798065989E-28, 7.758565868660186E-28,
455
-			-6.839003286369139E-28, 5.828348637958973E-28,
456
-			-4.740105434766476E-28, 3.587009166849001E-28,
457
-			-2.377198496417097E-28, 1.119160774411077E-28,
458
-			 1.670017331897950E-29,-1.438060858130858E-28,
459
-			 2.622750906188666E-28,-3.630328238235802E-28,
460
-			 4.369496766662814E-28,-4.761183982698324E-28,
461
-			-3.708525899969828E-28;
462
-	}
463
-} // end namespace Lemma
464
-

Modules/TEM1D/include/instrumenttem.h → Modules/TEM1D/include/InstrumentTEM.h View File

@@ -14,16 +14,17 @@
14 14
 #ifndef __INSTRUMENTTEM_H
15 15
 #define __INSTRUMENTTEM_H
16 16
 
17
-#include "instrument.h"
18
-#include "emearth1d.h"
17
+#include "Instrument.h"
18
+#include "EMEarth1D.h"
19 19
 #include "WireAntenna.h"
20 20
 #include "PolygonalWireAntenna.h"
21
-#include "receiverpoints.h"
22
-#include "dipolesource.h"
23
-#include "layeredearthem.h"
24
-#include "digitalfiltercostrans.h"
25
-#include "digitalfiltersintrans.h"
26
-#include "temintegrationkernel.h"
21
+#include "FieldPoints.h"
22
+#include "DipoleSource.h"
23
+#include "LayeredEarthEM.h"
24
+
25
+//#include "DigitalFilterCosTrans.h"
26
+//#include "DigitalFilterSinTrans.h"
27
+//#include "TEMIntegrationKernel.h"
27 28
 #include "CubicSplineInterpolator.h"
28 29
 
29 30
 namespace Lemma {
@@ -42,15 +43,13 @@ class InstrumentTem : public Instrument {
42 43
 
43 44
 	public:
44 45
 
45
-	// ====================  LIFECYCLE     =======================
46
-
47
-		static InstrumentTem* New();
46
+	    // ====================  LIFECYCLE     =======================
48 47
 
49
-		void Delete();
48
+		static InstrumentTem* NewSP();
50 49
 
51
-	// ====================  OPERATORS     =======================
50
+	    // ====================  OPERATORS     =======================
52 51
 
53
-	// ====================  OPERATIONS    =======================
52
+	    // ====================  OPERATIONS    =======================
54 53
 
55 54
 		/// Perform the forward model calculation
56 55
 		void MakeDirectCalculation( const HANKELTRANSFORMTYPE& hType );
@@ -60,7 +59,7 @@ class InstrumentTem : public Instrument {
60 59
          */
61 60
 		void MakeLaggedCalculation( const HANKELTRANSFORMTYPE& hType );
62 61
 
63
-	// ====================  ACCESS        =======================
62
+	    // ====================  ACCESS        =======================
64 63
 
65 64
 		/** Sets pulse parameters as a linearly segmented graph, so
66 65
          *  for example a triangle wave needs three points in Amps and
@@ -129,8 +128,6 @@ class InstrumentTem : public Instrument {
129 128
 		/// Default protected constructor.
130 129
 		~InstrumentTem ();
131 130
 
132
-		void Release();
133
-
134 131
     // ====================  OPERATIONS    =======================
135 132
 
136 133
         /**

+ 2
- 1
Modules/TEM1D/src/CMakeLists.txt View File

@@ -4,7 +4,8 @@ set (TEM1DSOURCE
4 4
 
5 5
 	${CMAKE_CURRENT_SOURCE_DIR}/TEMReceiver.cpp
6 6
 	${CMAKE_CURRENT_SOURCE_DIR}/TEMInductiveReceiver.cpp
7
-	${CMAKE_CURRENT_SOURCE_DIR}/TEMTransmitter.cpp
7
+	${CMAKE_CURRENT_SOURCE_DIR}/TEMTransmitter.cpp	
8
+#	${CMAKE_CURRENT_SOURCE_DIR}/InstrumentTEM.cpp
8 9
 	
9 10
 	PARENT_SCOPE
10 11
 )

Modules/TEM1D/src/instrumenttem.cpp → Modules/TEM1D/src/InstrumentTEM.cpp View File

@@ -10,7 +10,7 @@
10 10
   @date     02/10/2011
11 11
   @version  $Id: instrumenttem.cpp 266 2015-04-01 03:24:00Z tirons $
12 12
  **/
13
-#include "instrumenttem.h"
13
+#include "InstrumentTEM.h"
14 14
 
15 15
 namespace Lemma {
16 16
 

Loading…
Cancel
Save