Main Lemma Repository
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

integrationkernel.h 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* This file is part of Lemma, a geophysical modelling and inversion API */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /**
  6. @file
  7. @author Trevor Irons
  8. @date 02/07/2011
  9. @version $Id: integrationkernel.h 193 2014-11-10 23:51:41Z tirons $
  10. **/
  11. #ifndef INTEGRATIONKERNEL_INC
  12. #define INTEGRATIONKERNEL_INC
  13. #include "LemmaObject.h"
  14. namespace Lemma {
  15. // ===================================================================
  16. // Class: IntegrationKernel
  17. /**
  18. \brief Abstract class that computes arguments for numerical
  19. integrators.
  20. \details Needs to provide Argument function, as well as be able to
  21. set necessary integration parameters.
  22. */
  23. // ===================================================================
  24. template <typename T>
  25. class IntegrationKernel : public LemmaObject {
  26. public:
  27. // ==================== LIFECYCLE =======================
  28. // ==================== OPERATORS =======================
  29. // ==================== OPERATIONS =======================
  30. /** Returns the argument of a function at a given argument. Also
  31. * capable or returning related function values.
  32. */
  33. //template <typename T>
  34. virtual T Argument(const Real& x, const int& iRelated)=0;
  35. // ==================== ACCESS =======================
  36. // ==================== INQUIRY =======================
  37. virtual int GetNumRel()=0;
  38. protected:
  39. // ==================== LIFECYCLE =======================
  40. /// Default protected constructor.
  41. IntegrationKernel (const std::string& name);
  42. /// Default protected constructor.
  43. ~IntegrationKernel ();
  44. // ==================== DATA MEMBERS =========================
  45. private:
  46. }; // ----- end of class IntegrationKernel -----
  47. template <typename T>
  48. IntegrationKernel<T>::IntegrationKernel(const std::string& name) :
  49. LemmaObject(name) {
  50. }
  51. template<typename T>
  52. IntegrationKernel<T>::~IntegrationKernel( ) {
  53. }
  54. // template <typename T>
  55. // T IntegrationKernel<T>::Argument(const Real& x, const int& iRelated) {
  56. // return 11.;
  57. // }
  58. //
  59. // template <typename T>
  60. // int IntegrationKernel<T>::GetNumRel( ) {
  61. // return 0;
  62. // }
  63. } // ----- end of Lemma name -----
  64. #endif // ----- #ifndef INTEGRATIONKERNEL_INC -----