Implementation of Rocout HDF4 routines. More...
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <ostream>
#include <sstream>
#include <string>
#include <cstring>
#include <algorithm>
#include <strings.h>
#include "Rocout.h"
#include "HDF4.h"
#include <hdf.h>
Go to the source code of this file.
Macros | |
#define | DEBUG_MSG(x) |
#define | HUGE_VALF 1e+36F |
#define | HDF_CHECK(routine, args) |
New informative error-checking macro to replace hdf_error_message(). More... | |
Functions | |
static void | io_pane (const char *fname, const COM::Pane *pane, const COM::Attribute *attr, const char *material, const char *timelevel, const char *mfile, const std::string &errorhandle, const int mode) |
static void | io_pane_header (const char *fname, const COM::Pane *pane, const char *blockname, const char *material, const char *timelevel, const char *mfile, const std::string &errorhandle, const int mode) |
static void | io_pane_coordinates (const char *fname, const COM::Pane *pane, const char *timelevel, const char *coordsys, const char *unit, const std::string &errorhandle, const int mode) |
static void | io_pane_connectivity (const char *fname, const COM::Pane *pane, const char *timelevel, const char *coordsys, const std::string &errorhandle, const int mode) |
static void | io_pane_attribute (const char *fname, const COM::Pane *pane, const COM::Attribute *attr, const char *timelevel, const char *coordsys, const std::string &errorhandle, const int mode) |
static void | io_hdf_data (const char *fname, const char *label, const char *units, const char *format, const char *coordsys, int rank, int shape[], int ng1, int ng2, int dim, const COM_Type type, const void *p, int stride, const std::string &errorhandle, const int mode, const void *minv, const void *maxv) |
static void | min_element (const void *begin, const int rank, const int shape[], const int ng1, const int ng2, const COM_Type type, void *f) |
static void | max_element (const void *begin, const int rank, const int shape[], const int ng1, const int ng2, const COM_Type type, void *f) |
static void | squared_sum (const void *a, const int length, const int stride, const COM_Type type, void *ssum) |
static void | min_sqrt_element (const void *begin, const int rank, const int shape[], const int ng1, const int ng2, const COM_Type type, void *v) |
static void | max_sqrt_element (const void *begin, const int rank, const int shape[], const int ng1, const int ng2, const COM_Type type, void *v) |
static int | write_data (const char *fname, const char *label, const char *units, const char *format, const char *coordsys, const int _rank, const int _shape[], const int ng1, const int ng2, const COM_Type type, const void *p, const void *minv, const void *maxv, const std::string &errorhandle, const int mode=1) |
static int | comtype2hdftype (COM_Type i) |
void | append_str (std::vector< char > &vec, const char *str) |
void | write_attr_HDF4 (const std::string &fname, const std::string &mfile, const COM::Attribute *attr, const char *material, const char *timelevel, int pane_id, const std::string &errorhandle, int mode) |
template<typename T > | |
const T * | min_element__ (const T *begin, const int rank, const int shape[], const int ng1, const int ng2) |
Template implementation for determining the minimum entry in an array. More... | |
template<typename T > | |
const T * | max_element__ (const T *begin, const int rank, const int shape[], const int ng1, const int ng2) |
Template implementation for determining the maximum entry in an array. More... | |
Implementation of Rocout HDF4 routines.
Definition in file Rocout_hdf4.C.
#define DEBUG_MSG | ( | x | ) |
Definition at line 51 of file Rocout_hdf4.C.
Referenced by io_pane_attribute().
#define HDF_CHECK | ( | routine, | |
args | |||
) |
New informative error-checking macro to replace hdf_error_message().
Definition at line 943 of file Rocout_hdf4.C.
Referenced by write_data().
#define HUGE_VALF 1e+36F |
Definition at line 719 of file Rocout_hdf4.C.
Referenced by RFC_Window_overlay::comp_angle_defect(), RFC_Window_overlay::cos_edge_angle(), RFC_Window_overlay::cos_face_angle(), RFC_Window_overlay::detect_features(), max_element(), min_element(), min_sqrt_element(), and RFC_Window_overlay::print_features().
|
inline |
Definition at line 125 of file Rocout_hdf4.C.
Referenced by io_hdf_data().
|
static |
Definition at line 1046 of file Rocout_hdf4.C.
References COM_assertion, COM_CHAR, COM_CHARACTER, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_FLOAT, COM_INT, COM_INTEGER, and COM_REAL.
Referenced by write_data().
|
static |
Definition at line 534 of file Rocout_hdf4.C.
References append_str(), COM_assertion, get_sizeof(), i, k, Mesquite::length(), n, rank, s, and write_data().
Referenced by io_pane_attribute(), and io_pane_connectivity().
|
static |
Definition at line 142 of file Rocout_hdf4.C.
References COM_ALL, COM_assertion_msg, COM_ATTS, COM_CONN, COM_MESH, COM_NC, COM_PCONN, COM_PMESH, COM_RIDGES, io_pane_attribute(), io_pane_connectivity(), io_pane_coordinates(), and io_pane_header().
Referenced by write_attr_HDF4().
|
static |
Definition at line 360 of file Rocout_hdf4.C.
References COM_assertion, COM_F90POINTER, COM_NC1, COM_NC3, COM_VOID, DEBUG_MSG, get_sizeof(), i, io_hdf_data(), max(), max_sqrt_element(), min_sqrt_element(), Attribute::name(), Attribute::pointer(), rank, squared_sum(), and Attribute::stride().
Referenced by io_pane(), and io_pane_coordinates().
|
static |
Definition at line 296 of file Rocout_hdf4.C.
References COM_INT, i, io_hdf_data(), j, and Mesquite::length().
Referenced by io_pane().
|
static |
Definition at line 277 of file Rocout_hdf4.C.
References COM_NC, COM_NC1, i, and io_pane_attribute().
Referenced by io_pane().
|
static |
Definition at line 223 of file Rocout_hdf4.C.
References COM_assertion, COM_CHAR, s, and write_data().
Referenced by io_pane().
|
static |
Definition at line 762 of file Rocout_hdf4.C.
References COM_assertion, COM_CHAR, COM_CHARACTER, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_FLOAT, COM_INT, COM_INTEGER, COM_REAL, HUGE_VALF, and max_element__().
Referenced by max_element__(), and write_data().
const T* max_element__ | ( | const T * | begin, |
const int | rank, | ||
const int | shape[], | ||
const int | ng1, | ||
const int | ng2 | ||
) |
Template implementation for determining the maximum entry in an array.
The array can contain ghost layers and the entries in the ghost layers are omitted.
Definition at line 688 of file Rocout_hdf4.C.
References i, j, k, max(), max_element(), min(), and rank.
Referenced by max_element(), and max_sqrt_element().
|
static |
Definition at line 879 of file Rocout_hdf4.C.
References COM_assertion, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_FLOAT, COM_INT, COM_INTEGER, COM_REAL, max_element__(), and sqrt().
Referenced by io_pane_attribute().
|
static |
Definition at line 722 of file Rocout_hdf4.C.
References COM_assertion, COM_CHAR, COM_CHARACTER, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_FLOAT, COM_INT, COM_INTEGER, COM_REAL, HUGE_VALF, and min_element__().
Referenced by min_element__(), and write_data().
const T* min_element__ | ( | const T * | begin, |
const int | rank, | ||
const int | shape[], | ||
const int | ng1, | ||
const int | ng2 | ||
) |
Template implementation for determining the minimum entry in an array.
The array can contain ghost layers and the entries in the ghost layers are omitted.
Definition at line 653 of file Rocout_hdf4.C.
References i, j, k, max(), min(), min_element(), and rank.
Referenced by min_element(), and min_sqrt_element().
|
static |
Definition at line 837 of file Rocout_hdf4.C.
References COM_assertion, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_FLOAT, COM_INT, COM_INTEGER, COM_REAL, HUGE_VALF, min_element__(), and sqrt().
Referenced by io_pane_attribute().
|
static |
Definition at line 802 of file Rocout_hdf4.C.
References COM_assertion, COM_DOUBLE, COM_DOUBLE_PRECISION, COM_FLOAT, COM_INT, COM_INTEGER, COM_REAL, i, and Mesquite::length().
Referenced by io_pane_attribute().
void write_attr_HDF4 | ( | const std::string & | fname, |
const std::string & | mfile, | ||
const COM::Attribute * | attr, | ||
const char * | material, | ||
const char * | timelevel, | ||
int | pane_id, | ||
const std::string & | errorhandle, | ||
int | mode | ||
) |
Definition at line 130 of file Rocout_hdf4.C.
References COM_assertion, io_pane(), and Window::pane().
Referenced by Rocout::write_attr_internal().
|
static |
Definition at line 964 of file Rocout_hdf4.C.
References comtype2hdftype(), HDF_CHECK, i, max_element(), min_element(), and rank.
Referenced by io_hdf_data(), and io_pane_header().