|
TECA
The Toolkit for Extreme Climate Analysis
|
A base class for geometric data. More...
#include <teca_mesh.h>
Classes | |
| struct | impl_t |
Public Member Functions | |
| virtual unsigned long | get_number_of_points () const =0 |
| get the number of points in the mesh More... | |
| virtual unsigned long | get_number_of_cells () const =0 |
| get the number of cells in the mesh More... | |
| bool | empty () const noexcept override |
| return true if the dataset is empty. More... | |
| void | copy (const const_p_teca_dataset &other, allocator alloc=allocator::malloc) override |
| void | shallow_copy (const p_teca_dataset &other) override |
| void | append_arrays (const const_p_teca_mesh &) |
| void | shallow_append_arrays (const p_teca_mesh &) |
| void | swap (const p_teca_dataset &) override |
| swap internals of the two objects More... | |
| int | to_stream (teca_binary_stream &) const override |
| int | from_stream (teca_binary_stream &) override |
| deserialize the dataset from the given stream for I/O or communication More... | |
| int | to_stream (std::ostream &) const override |
| stream to/from human readable representation More... | |
| int | from_stream (std::istream &) override |
| read from stream in a human readable representation More... | |
| teca_mesh () | |
temporal metadata | |
| void | set_temporal_bounds (const std::vector< double > &vals) |
| int | get_temporal_bounds (std::vector< double > &vals) const |
| void | set_temporal_bounds (const p_teca_variant_array &vals) |
| int | get_temporal_bounds (p_teca_variant_array vals) const |
| void | set_temporal_bounds (const std::initializer_list< double > &l) |
| void | set_temporal_bounds (const double *vals) |
| int | get_temporal_bounds (double *vals) const |
| void | set_temporal_bounds (const double &val_1, const double &val_2) |
| int | get_temporal_bounds (double &val_1, double &val_2) const |
| void | set_temporal_extent (const std::vector< unsigned long > &vals) |
| int | get_temporal_extent (std::vector< unsigned long > &vals) const |
| void | set_temporal_extent (const p_teca_variant_array &vals) |
| int | get_temporal_extent (p_teca_variant_array vals) const |
| void | set_temporal_extent (const std::initializer_list< unsigned long > &l) |
| void | set_temporal_extent (const unsigned long *vals) |
| int | get_temporal_extent (unsigned long *vals) const |
| void | set_temporal_extent (const unsigned long &val_1, const unsigned long &val_2) |
| int | get_temporal_extent (unsigned long &val_1, unsigned long &val_2) const |
| void | set_calendar (const std::vector< std::string > &vals) |
| int | get_calendar (std::vector< std::string > &vals) const |
| void | set_calendar (const p_teca_variant_array &vals) |
| int | get_calendar (p_teca_variant_array vals) const |
| void | set_calendar (const std::initializer_list< std::string > &l) |
| void | set_calendar (const std::string *vals) |
| int | get_calendar (std::string *vals) const |
| void | set_calendar (const std::string &val_1) |
| int | get_calendar (std::string &val_1) const |
| void | set_time_units (const std::vector< std::string > &vals) |
| int | get_time_units (std::vector< std::string > &vals) const |
| void | set_time_units (const p_teca_variant_array &vals) |
| int | get_time_units (p_teca_variant_array vals) const |
| void | set_time_units (const std::initializer_list< std::string > &l) |
| void | set_time_units (const std::string *vals) |
| int | get_time_units (std::string *vals) const |
| void | set_time_units (const std::string &val_1) |
| int | get_time_units (std::string &val_1) const |
| void | set_time_step (const unsigned long &val) |
| Set the temporal_extent to a single time step. More... | |
| int | get_time_step (unsigned long &val) const |
| void | set_time (const double &val) |
| Set the temporal bounds to a single time value. More... | |
| int | get_time (double &val) const |
attribute metadata | |
| void | set_attributes (const std::vector< teca_metadata > &vals) |
| int | get_attributes (std::vector< teca_metadata > &vals) const |
| void | set_attributes (const p_teca_variant_array &vals) |
| int | get_attributes (p_teca_variant_array vals) const |
| void | set_attributes (const std::initializer_list< teca_metadata > &l) |
| void | set_attributes (const teca_metadata *vals) |
| int | get_attributes (teca_metadata *vals) const |
| void | set_attributes (const teca_metadata &val_1) |
| int | get_attributes (teca_metadata &val_1) const |
arrays | |
| p_teca_array_collection & | get_arrays (int centering) |
| const_p_teca_array_collection | get_arrays (int centering) const |
point centered data | |
| p_teca_array_collection & | get_point_arrays () |
| const_p_teca_array_collection | get_point_arrays () const |
cell centered data | |
| p_teca_array_collection & | get_cell_arrays () |
| const_p_teca_array_collection | get_cell_arrays () const |
edge centered data | |
| p_teca_array_collection & | get_x_edge_arrays () |
| const_p_teca_array_collection | get_x_edge_arrays () const |
| p_teca_array_collection & | get_y_edge_arrays () |
| const_p_teca_array_collection | get_y_edge_arrays () const |
| p_teca_array_collection & | get_z_edge_arrays () |
| const_p_teca_array_collection | get_z_edge_arrays () const |
face centered data | |
| p_teca_array_collection & | get_x_face_arrays () |
| const_p_teca_array_collection | get_x_face_arrays () const |
| p_teca_array_collection & | get_y_face_arrays () |
| const_p_teca_array_collection | get_y_face_arrays () const |
| p_teca_array_collection & | get_z_face_arrays () |
| const_p_teca_array_collection | get_z_face_arrays () const |
non-geometric data | |
| p_teca_array_collection & | get_information_arrays () |
| const_p_teca_array_collection | get_information_arrays () const |
Public Member Functions inherited from teca_dataset | |
| virtual int | set_request_indices (const std::string &request_key, const unsigned long ids[2]) |
| virtual int | get_request_indices (unsigned long ids[2]) const |
| virtual int | get_request_index (unsigned long &index) const |
| virtual int | set_request_index (const std::string &request_key, unsigned long index) |
| operator bool () const noexcept | |
| virtual p_teca_dataset | new_instance () const =0 |
| virtual constructor. return a new dataset of the same type. More... | |
| virtual p_teca_dataset | new_copy (allocator alloc=allocator::malloc) const =0 |
| virtual p_teca_dataset | new_shallow_copy ()=0 |
| virtual std::string | get_class_name () const =0 |
| virtual int | get_type_code () const =0 |
| virtual void | copy_metadata (const const_p_teca_dataset &other) |
| copy metadata. always a deep copy. More... | |
| virtual teca_metadata & | get_metadata () noexcept |
| get the dataset metadata More... | |
| virtual const teca_metadata & | get_metadata () const noexcept |
| get the dataset metadata More... | |
| virtual void | set_metadata (const teca_metadata &md) |
| set the dataset metadata More... | |
| void | set_index_request_key (const std::vector< std::string > &vals) |
| int | get_index_request_key (std::vector< std::string > &vals) const |
| void | set_index_request_key (const p_teca_variant_array &vals) |
| int | get_index_request_key (p_teca_variant_array vals) const |
| void | set_index_request_key (const std::initializer_list< std::string > &l) |
| void | set_index_request_key (const std::string *vals) |
| int | get_index_request_key (std::string *vals) const |
| void | set_index_request_key (const std::string &val_1) |
| int | get_index_request_key (std::string &val_1) const |
Public Attributes | |
| std::shared_ptr< impl_t > | m_impl |
Additional Inherited Members | |
Public Types inherited from teca_dataset | |
| using | allocator = teca_variant_array::allocator |
Protected Member Functions inherited from teca_dataset | |
| teca_dataset (const teca_dataset &)=delete | |
| teca_dataset (const teca_dataset &&)=delete | |
| void | operator= (const p_teca_dataset &other)=delete |
| void | operator= (p_teca_dataset &&other)=delete |
Protected Attributes inherited from teca_dataset | |
| teca_metadata * | metadata |
A base class for geometric data.
The mesh declares containers for typical geometrically associated data such as point, cell, face and edge centered data arrays and defines the APIs for accessing them. APIs for accessing common metadata such as time related metadata are declared here.
| teca_mesh::teca_mesh | ( | ) |
| void teca_mesh::append_arrays | ( | const const_p_teca_mesh & | ) |
append array based data from another mesh. No consistency checks are performed.
|
overridevirtual |
Deep copy data and metdata.
| [in] | other | The dataset to copy. |
| [in] | alloc | The allocator to use for alloctions of data structures to hold the copy. The default is a CPU based allocator. |
Reimplemented from teca_dataset.
Reimplemented in teca_uniform_cartesian_mesh.
|
overridevirtualnoexcept |
return true if the dataset is empty.
Reimplemented from teca_dataset.
|
inlineoverridevirtual |
read from stream in a human readable representation
Reimplemented from teca_dataset.
|
overridevirtual |
deserialize the dataset from the given stream for I/O or communication
Reimplemented from teca_dataset.
| p_teca_array_collection& teca_mesh::get_arrays | ( | int | centering | ) |
get the array collection for the given centering the centering enumeration is defined in teca_array_attributes the centering attribute is typically stored in array attribute metadata
|
inline |
returns the array collection for edge centered data
|
inline |
returns the array collection for uncentered data
|
pure virtual |
get the number of cells in the mesh
Implemented in teca_uniform_cartesian_mesh, teca_curvilinear_mesh, teca_cartesian_mesh, and teca_arakawa_c_grid.
|
pure virtual |
get the number of points in the mesh
Implemented in teca_uniform_cartesian_mesh, teca_curvilinear_mesh, teca_cartesian_mesh, and teca_arakawa_c_grid.
|
inline |
returns the array collection for point centered data
| int teca_mesh::get_time | ( | double & | val | ) | const |
Get the time. note: no checking is done to ensure that the temporal extent/bounds have only a single step.
| int teca_mesh::get_time_step | ( | unsigned long & | val | ) | const |
Get the time step. note: no checking is done to ensure that the temporal extent has only a single step.
|
inline |
returns the array collection for edge centered data
|
inline |
returns the array collection for face centered data
|
inline |
Provides access to the array attributes metadata, which contains information such as dimensions, units, data type, description, etc.
|
inline |
Specifies the temporal extents of the data and the calendaring system used to define the time axis.
| void teca_mesh::set_time | ( | const double & | val | ) |
Set the temporal bounds to a single time value.
| void teca_mesh::set_time_step | ( | const unsigned long & | val | ) |
Set the temporal_extent to a single time step.
|
overridevirtual |
Shallow copy data and metadata. The shallow copy takes references to the source data structures. Metadata is always deep copied.
| [in] | other | The dataset to copy. |
Reimplemented from teca_dataset.
Reimplemented in teca_uniform_cartesian_mesh.
|
overridevirtual |
swap internals of the two objects
Reimplemented from teca_dataset.
Reimplemented in teca_uniform_cartesian_mesh.
|
overridevirtual |
stream to/from human readable representation
Reimplemented from teca_dataset.
|
overridevirtual |
serialize the dataset to/from the given stream for I/O or communication
Reimplemented from teca_dataset.