Main Lemma Repository
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Grid.h 2.2KB

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