Lemma is an Electromagnetics API
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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