Lemma is an Electromagnetics API
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ů.

Grid.h 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 10/25/2009
  9. @version $Id: grid.h 193 2014-11-10 23:51:41Z tirons $
  10. **/
  11. #ifndef __GRID_H
  12. #define __GRID_H
  13. #include "LemmaObject.h"
  14. namespace Lemma {
  15. // ===============================================================================
  16. // Class: Grid
  17. /// \ingroup LemmaCore
  18. /// \brief Abstract base class for grids.
  19. /// \details Grids define values in space, they may either be an integral part
  20. /// of models, or simply the output of a forward modelling procedure.
  21. // ===============================================================================
  22. class Grid : public LemmaObject {
  23. friend std::ostream &operator<<(std::ostream &stream,
  24. const Grid &ob);
  25. public:
  26. // ==================== LIFECYCLE ===================================
  27. virtual YAML::Node Serialize() const;
  28. // ==================== OPERATORS ===================================
  29. // ==================== OPERATIONS ===================================
  30. // ==================== ACCESS ===================================
  31. // ==================== INQUIRY ===================================
  32. /** Returns the name of the underlying class, similiar to Python's type */
  33. virtual std::string GetName() const;
  34. protected:
  35. // ==================== LIFECYCLE ===================================
  36. /** Protected DeDerializing constructor, use factory DeSerialize method on non abstract classes*/
  37. Grid (const YAML::Node& node, const ctor_key& );
  38. /// Default protected constructor.
  39. Grid ( const ctor_key& );
  40. /// Default protected constructor.
  41. virtual ~Grid ( );
  42. // ==================== DATA MEMBERS ===================================
  43. private:
  44. /** ASCII string representation of the class name */
  45. static constexpr auto CName = "Grid";
  46. }; // ----- end of class Grid -----
  47. } // namespace Lemma
  48. #endif // __GRID_H