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.

kernel.h 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 01/29/2010
  9. @version $Id: kernel.h 193 2014-11-10 23:51:41Z tirons $
  10. **/
  11. #ifndef __kernel_h
  12. #define __kernel_h
  13. #ifdef LEMMAUSEVTK
  14. #include "vtkImplicitFunction.h"
  15. #endif
  16. #include "LemmaObject.h"
  17. #include "receivercubes.h"
  18. namespace Lemma {
  19. // ==================================================================
  20. // Class: Kernel
  21. /// \brief Pure abstract class for some kind of kernel function.
  22. /// \details Provides a consistent interface to kernel functions.
  23. // ==================================================================
  24. class Kernel : public LemmaObject {
  25. /// Prints out basic info about the class
  26. friend std::ostream &operator<<(std::ostream &stream,
  27. const Kernel &ob);
  28. public:
  29. // ==================== LIFECYCLE ======================
  30. //static Kernel* New();
  31. virtual void Delete()=0;
  32. // ==================== OPERATORS ======================
  33. // ==================== OPERATIONS ======================
  34. // ==================== ACCESS ======================
  35. // ==================== INQUIRY ======================
  36. virtual VectorXcr ComputeSensitivity()=0;
  37. #ifdef LEMMAUSEVTK
  38. virtual VectorXcr ComputeSensitivity(vtkImplicitFunction* Impl)=0;
  39. #endif
  40. /** computes sensitivity for same value */
  41. virtual VectorXcr ComputeSensitivity(const Real& fval)=0;
  42. /** Computes sensitivity for array of values */
  43. virtual VectorXcr ComputeSensitivity(const VectorXr& fval)=0;
  44. virtual void SetFieldCubes(ReceiverCubes* pts)=0;
  45. // ==================== DATA MEMBERS ======================
  46. protected:
  47. // ==================== LIFECYCLE ======================
  48. /// Default protected constructor.
  49. Kernel (const std::string& name);
  50. /// Default protected constructor.
  51. ~Kernel ();
  52. private:
  53. }; // ----- end of class Kernel -----
  54. }
  55. #endif // __kernel_h