Main Lemma Repository
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

integrationkernel.h 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. @class
  19. \brief Abstract class that computes arguments for numerical
  20. integrators.
  21. \details Needs to provide Argument function, as well as be able to
  22. set necessary integration parameters.
  23. */
  24. // ===================================================================
  25. template <typename T>
  26. class IntegrationKernel : public LemmaObject {
  27. public:
  28. // ==================== LIFECYCLE =======================
  29. // ==================== OPERATORS =======================
  30. // ==================== OPERATIONS =======================
  31. /** Returns the argument of a function at a given argument. Also
  32. * capable or returning related function values.
  33. */
  34. //template <typename T>
  35. virtual T Argument(const Real& x, const int& iRelated)=0;
  36. // ==================== ACCESS =======================
  37. // ==================== INQUIRY =======================
  38. virtual int GetNumRel()=0;
  39. protected:
  40. // ==================== LIFECYCLE =======================
  41. /// Default protected constructor.
  42. IntegrationKernel (const std::string& name);
  43. /// Default protected constructor.
  44. ~IntegrationKernel ();
  45. // ==================== DATA MEMBERS =========================
  46. private:
  47. }; // ----- end of class IntegrationKernel -----
  48. template <typename T>
  49. IntegrationKernel<T>::IntegrationKernel(const std::string& name) :
  50. LemmaObject(name) {
  51. }
  52. template<typename T>
  53. IntegrationKernel<T>::~IntegrationKernel( ) {
  54. }
  55. // template <typename T>
  56. // T IntegrationKernel<T>::Argument(const Real& x, const int& iRelated) {
  57. // return 11.;
  58. // }
  59. //
  60. // template <typename T>
  61. // int IntegrationKernel<T>::GetNumRel( ) {
  62. // return 0;
  63. // }
  64. } // ----- end of Lemma name -----
  65. #endif // ----- #ifndef INTEGRATIONKERNEL_INC -----