Lemma is an Electromagnetics API
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

costransintegrationkernel.h 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. @file
  8. @author Trevor Irons
  9. @date 02/08/2011
  10. @version $Id: costransintegrationkernel.h 87 2013-09-05 22:44:05Z tirons $
  11. **/
  12. #ifndef COSTRANSINTEGRATIONKERNEL_INC
  13. #define COSTRANSINTEGRATIONKERNEL_INC
  14. #include "integrationkernel.h"
  15. namespace Lemma {
  16. // ===================================================================
  17. // Class: CosTransIntegrationKernel
  18. /**
  19. @class
  20. \ingroup FDEM1D
  21. \brief Integration kernel for testing cosine transform.
  22. \details Evaluates cosine at the argument, using lagged convolution.
  23. all of these kernels have exact solutions.
  24. */
  25. // ===================================================================
  26. class CosTransIntegrationKernel : public IntegrationKernel<Real> {
  27. public:
  28. // ==================== LIFECYCLE =======================
  29. /** Returns a pointer to a new object of type CosTransIntegrationKernel.
  30. * It allocates all necessary memory.
  31. */
  32. static CosTransIntegrationKernel* New();
  33. /** Deletes this object. Delete also disconnects any
  34. * attachments to this object.
  35. */
  36. void Delete();
  37. // ==================== OPERATORS =======================
  38. Real Argument(const Real&x, const int& iRelated);
  39. int GetNumRel();
  40. /// Sets the value 'A' used in test cases
  41. void SetA(const Real& A);
  42. /** Sets the integral to evaluate (1, 2, 3)
  43. */
  44. void SetIntegral(const int& i);
  45. /** Returns the analytical answer at A and B */
  46. Real GetAnalytical(const Real& B);
  47. // ==================== OPERATIONS =======================
  48. // ==================== ACCESS =======================
  49. // ==================== INQUIRY =======================
  50. protected:
  51. // ==================== LIFECYCLE =======================
  52. /** Deletes this object. Delete also disconnects any
  53. * attachments to this object.
  54. */
  55. void Release();
  56. /// Default protected constructor.
  57. CosTransIntegrationKernel (const std::string& name);
  58. /// Default protected constructor.
  59. ~CosTransIntegrationKernel ();
  60. // ==================== DATA MEMBERS =========================
  61. /** Value used in test cases */
  62. Real A;
  63. /** Test integral to evaluate */
  64. int Integral;
  65. private:
  66. }; // ----- end of class CosTransIntegrationKernel -----
  67. } // ----- end of Lemma name -----
  68. #endif // ----- #ifndef COSTRANSINTEGRATIONKERNEL_INC -----
  69. /* vim: set tabstop=4 expandtab: */
  70. /* vim: set filetype=cpp: */