TECA
The Toolkit for Extreme Climate Analysis
teca_uniform_cartesian_mesh.h
1 #ifndef teca_uniform_cartesian_mesh_h
2 #define teca_uniform_cartesian_mesh_h
3 
4 #include "teca_mesh.h"
5 #include "teca_shared_object.h"
6 
7 TECA_SHARED_OBJECT_FORWARD_DECL(teca_uniform_cartesian_mesh)
8 
9 /// Data on a uniform cartesian mesh.
11 {
12 public:
13  TECA_DATASET_STATIC_NEW(teca_uniform_cartesian_mesh)
14  TECA_DATASET_NEW_INSTANCE()
15  TECA_DATASET_NEW_COPY()
16 
17  virtual ~teca_uniform_cartesian_mesh() = default;
18 
19  // set/get metadata
20  TECA_DATASET_METADATA(time, double, 1)
21  TECA_DATASET_METADATA(time_step, unsigned long, 1)
22  TECA_DATASET_METADATA(spacing, double, 3)
23  TECA_DATASET_METADATA(origin, double, 3)
24  TECA_DATASET_METADATA(extent, unsigned long, 6)
25  TECA_DATASET_METADATA(whole_extent, unsigned long, 6)
26 
27  /// get the number of points in the mesh
28  unsigned long get_number_of_points() const override;
29 
30  /// get the number of cells in the mesh
31  unsigned long get_number_of_cells() const override;
32 
33  /// return a unique string identifier
34  std::string get_class_name() const override
35  { return "teca_uniform_cartesian_mesh"; }
36 
37  /// return a unique integer identifier
38  int get_type_code() const override;
39 
40  /// copy data and metadata. shallow copy uses reference
41  /// counting, while copy duplicates the data.
42  void copy(const const_p_teca_dataset &) override;
43  void shallow_copy(const p_teca_dataset &) override;
44 
45  /// swap internals of the two objects
46  void swap(const p_teca_dataset &) override;
47 
48 protected:
50 };
51 
52 #endif
teca_mesh
A base class for geometric data.
Definition: teca_mesh.h:18
teca_uniform_cartesian_mesh::get_class_name
std::string get_class_name() const override
return a unique string identifier
Definition: teca_uniform_cartesian_mesh.h:34
teca_shared_object.h
teca_uniform_cartesian_mesh
Data on a uniform cartesian mesh.
Definition: teca_uniform_cartesian_mesh.h:10
teca_py_array::copy
bool copy(teca_variant_array *varr, PyObject *obj)
Copy values from the object into variant array.
Definition: teca_py_array.h:270