1 #ifndef teca_cartesian_mesh_h
2 #define teca_cartesian_mesh_h
4 #include "teca_config.h"
15 TECA_DATASET_NEW_INSTANCE()
16 TECA_DATASET_NEW_COPY()
21 TECA_DATASET_METADATA(whole_extent,
unsigned long, 6)
22 TECA_DATASET_METADATA(extent,
unsigned long, 6)
23 TECA_DATASET_METADATA(bounds,
double, 6)
24 TECA_DATASET_METADATA(periodic_in_x,
int, 1)
25 TECA_DATASET_METADATA(periodic_in_y,
int, 1)
26 TECA_DATASET_METADATA(periodic_in_z,
int, 1)
27 TECA_DATASET_METADATA(x_coordinate_variable, std::
string, 1)
28 TECA_DATASET_METADATA(y_coordinate_variable, std::
string, 1)
29 TECA_DATASET_METADATA(z_coordinate_variable, std::
string, 1)
30 TECA_DATASET_METADATA(t_coordinate_variable, std::
string, 1)
39 unsigned long array_extent[6]);
42 unsigned long get_number_of_points() const override;
45 unsigned long get_number_of_cells() const override;
49 {
return m_coordinate_arrays->get(
"x"); }
52 {
return m_coordinate_arrays->get(
"x"); }
56 {
return m_coordinate_arrays->get(
"y"); }
59 {
return m_coordinate_arrays->get(
"y"); }
63 {
return m_coordinate_arrays->get(
"z"); }
66 {
return m_coordinate_arrays->get(
"z"); }
69 void set_x_coordinates(
const std::string &name,
73 void set_y_coordinates(
const std::string &name,
77 void set_z_coordinates(
const std::string &name,
91 {
return "teca_cartesian_mesh"; }
94 int get_type_code()
const override;
97 void copy(
const const_p_teca_dataset &other,
98 allocator alloc = allocator::malloc)
override;
101 void shallow_copy(
const p_teca_dataset &other)
override;
104 void copy_metadata(
const const_p_teca_dataset &other)
override;
107 void swap(
const p_teca_dataset &)
override;
116 int to_stream(std::ostream &)
const override;
117 using teca_dataset::from_stream;
128 p_teca_array_collection m_coordinate_arrays;