diff --git a/src/C/Makefile.am b/src/C/Makefile.am index 8753d9a..cba6479 100644 --- a/src/C/Makefile.am +++ b/src/C/Makefile.am @@ -2,18 +2,14 @@ if ENABLE_C # Header files that I wish to install in $(prefix)/include include_HEADERS = \ - $(top_srcdir)/src/include/H5.h \ - $(top_srcdir)/src/include/H5Block.h \ $(top_srcdir)/src/include/H5Block_attribs.h \ $(top_srcdir)/src/include/H5Block_io.h \ $(top_srcdir)/src/include/H5Block_model.h \ - $(top_srcdir)/src/include/H5Fed.h \ $(top_srcdir)/src/include/H5Fed_adjacency.h \ $(top_srcdir)/src/include/H5Fed_model.h \ $(top_srcdir)/src/include/H5Fed_retrieve.h \ $(top_srcdir)/src/include/H5Fed_store.h \ $(top_srcdir)/src/include/H5Fed_tags.h \ - $(top_srcdir)/src/include/H5Part.h \ $(top_srcdir)/src/include/H5Part_io.h \ $(top_srcdir)/src/include/H5Part_model.h \ $(top_srcdir)/src/include/H5_debug.h \ diff --git a/src/include/H5.h b/src/include/H5.h deleted file mode 100644 index 72ad23a..0000000 --- a/src/include/H5.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (c) 2006-2016, The Regents of the University of California, - through Lawrence Berkeley National Laboratory (subject to receipt of any - required approvals from the U.S. Dept. of Energy) and the Paul Scherrer - Institut (Switzerland). All rights reserved. - - License: see file COPYING in top level of source distribution. -*/ - -#ifndef __H5_H -#define __H5_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "H5_file.h" -#include "H5_model.h" -#include "H5_file_attribs.h" -#include "H5_step_attribs.h" -#include "H5_log.h" -#include "H5_debug.h" -#include "H5_error.h" - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/include/H5Block_attribs.h b/src/include/H5Block_attribs.h index 5801cb1..7a8906f 100644 --- a/src/include/H5Block_attribs.h +++ b/src/include/H5Block_attribs.h @@ -22,6 +22,10 @@ @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /* ! __ _ _ _ _ _ _ _ _ ! / _(_) ___| | __| | __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ @@ -725,5 +729,10 @@ H5Block3dGetFieldZCoords ( f, 2, field_name, H5BLOCK_FIELD_ZCOORD_NAME, coords, n_coords)); } + +#ifdef __cplusplus +} +#endif + ///< @} #endif diff --git a/src/include/H5Block_io.h b/src/include/H5Block_io.h index 093286d..3729796 100644 --- a/src/include/H5Block_io.h +++ b/src/include/H5Block_io.h @@ -20,6 +20,10 @@ @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /** Write the 3-dimensional field \p name from the buffer pointed to by \p buffer to the current step using the previously defined field @@ -427,5 +431,9 @@ H5Block3dReadVector3dFieldInt32 ( x_buf, y_buf, z_buf, H5T_NATIVE_INT32)); } +#ifdef __cplusplus +} +#endif + ///< @} #endif diff --git a/src/include/H5Block_model.h b/src/include/H5Block_model.h index e8af5ea..b6034e2 100644 --- a/src/include/H5Block_model.h +++ b/src/include/H5Block_model.h @@ -396,10 +396,9 @@ H5BlockGetFieldInfoByName ( type)); } -///< @} - #ifdef __cplusplus } #endif +///< @} #endif diff --git a/src/include/H5Fed.h b/src/include/H5Fed.h deleted file mode 100644 index 6ff4af1..0000000 --- a/src/include/H5Fed.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - Copyright (c) 2006-2016, The Regents of the University of California, - through Lawrence Berkeley National Laboratory (subject to receipt of any - required approvals from the U.S. Dept. of Energy) and the Paul Scherrer - Institut (Switzerland). All rights reserved. - - License: see file COPYING in top level of source distribution. -*/ - -#ifndef __H5FED_H -#define __H5FED_H - -#include "H5Fed_adjacency.h" -#include "H5Fed_model.h" -#include "H5Fed_retrieve.h" -#include "H5Fed_store.h" -#include "H5Fed_tags.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/****** General routines *****************************************************/ - -static inline h5_err_t -H5FedOpenTetrahedralMesh ( - const h5_file_t f, - const char* name, - h5t_mesh_t** mesh - ) { - H5_API_ENTER (h5_err_t, - "f=%p, name=%s, mesh=%p", - (h5_file_p)f, name, mesh); - H5_API_RETURN (h5t_open_tetrahedral_mesh (f, name, mesh)); -} - -static inline h5_err_t -H5FedOpenTetrahedralMeshByIndex ( - const h5_file_t f, - const h5_id_t idx, - h5t_mesh_t** mesh - ) { - H5_API_ENTER (h5_err_t, - "f=%p, idx=%lld, mesh=%p", - (h5_file_p)f, (long long)idx, mesh); - H5_API_RETURN (h5t_open_tetrahedral_mesh_by_idx (f, idx, mesh)); -} - -static inline h5_err_t -H5FedOpenTriangleMesh ( - const h5_file_t f, - const char* name, - h5t_mesh_t** mesh - ) { - H5_API_ENTER (h5_err_t, - "f=%p, name=%s, mesh=%p", - (h5_file_p)f, name, mesh); - H5_API_RETURN (h5t_open_triangle_mesh (f, name, mesh)); -} - -static inline h5_err_t -H5FedOpenTriangleMeshPart ( - const h5_file_t f, - const char* name, - h5t_mesh_t** mesh, - h5_glb_idx_t* const elem_indices, - const h5_glb_idx_t num_elems - ) { - H5_API_ENTER (h5_err_t, - "f=%p, name=%s, mesh=%p", - (h5_file_p)f, name, mesh); - H5_API_RETURN (h5t_open_triangle_mesh_part (f, name, mesh, elem_indices, num_elems)); -} - -static inline h5_err_t -H5FedOpenTriangleMeshByIndex ( - const h5_file_t f, - const h5_id_t idx, - h5t_mesh_t** mesh - ) { - H5_API_ENTER (h5_err_t, - "f=%p, idx=%lld, mesh=%p", - (h5_file_p)f, (long long)idx, mesh); - H5_API_RETURN (h5t_open_triangle_mesh_by_idx (f, idx, mesh)); -} - -static inline h5_err_t -H5FedCloseMesh ( - h5t_mesh_t* const m - ) { - H5_API_ENTER (h5_err_t, "m=%p", m); - H5_API_RETURN (h5t_close_mesh (m)); -} - -static inline h5_err_t -H5FedSetLevel ( - h5t_mesh_t* const m, - const h5_lvl_idx_t level_id - ) { - H5_API_ENTER (h5_err_t, "m=%p, level_id=%d", m, level_id); - H5_API_RETURN (h5t_set_level (m, level_id)); -} - -static inline h5_err_t -H5FedSetMeshChanged ( - h5t_mesh_t* const m - ) { - H5_API_ENTER (h5_err_t, "m=%p", m); - H5_API_RETURN (h5t_set_mesh_changed (m)); -} - -#ifdef __cplusplus -} -#endif - -#endif - - - - - - - - - - - - diff --git a/src/include/H5Fed_model.h b/src/include/H5Fed_model.h index 52c6b1c..db12064 100644 --- a/src/include/H5Fed_model.h +++ b/src/include/H5Fed_model.h @@ -157,6 +157,93 @@ H5FedGetNumElementsTotal ( H5_API_RETURN (h5t_get_num_leaf_elems (m, -1)); } +static inline h5_err_t +H5FedOpenTetrahedralMesh ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_open_tetrahedral_mesh (f, name, mesh)); +} + +static inline h5_err_t +H5FedOpenTetrahedralMeshByIndex ( + const h5_file_t f, + const h5_id_t idx, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, idx=%lld, mesh=%p", + (h5_file_p)f, (long long)idx, mesh); + H5_API_RETURN (h5t_open_tetrahedral_mesh_by_idx (f, idx, mesh)); +} + +static inline h5_err_t +H5FedOpenTriangleMesh ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_open_triangle_mesh (f, name, mesh)); +} + +static inline h5_err_t +H5FedOpenTriangleMeshPart ( + const h5_file_t f, + const char* name, + h5t_mesh_t** mesh, + h5_glb_idx_t* const elem_indices, + const h5_glb_idx_t num_elems + ) { + H5_API_ENTER (h5_err_t, + "f=%p, name=%s, mesh=%p", + (h5_file_p)f, name, mesh); + H5_API_RETURN (h5t_open_triangle_mesh_part (f, name, mesh, elem_indices, num_elems)); +} + +static inline h5_err_t +H5FedOpenTriangleMeshByIndex ( + const h5_file_t f, + const h5_id_t idx, + h5t_mesh_t** mesh + ) { + H5_API_ENTER (h5_err_t, + "f=%p, idx=%lld, mesh=%p", + (h5_file_p)f, (long long)idx, mesh); + H5_API_RETURN (h5t_open_triangle_mesh_by_idx (f, idx, mesh)); +} + +static inline h5_err_t +H5FedCloseMesh ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_err_t, "m=%p", m); + H5_API_RETURN (h5t_close_mesh (m)); +} + +static inline h5_err_t +H5FedSetLevel ( + h5t_mesh_t* const m, + const h5_lvl_idx_t level_id + ) { + H5_API_ENTER (h5_err_t, "m=%p, level_id=%d", m, level_id); + H5_API_RETURN (h5t_set_level (m, level_id)); +} + +static inline h5_err_t +H5FedSetMeshChanged ( + h5t_mesh_t* const m + ) { + H5_API_ENTER (h5_err_t, "m=%p", m); + H5_API_RETURN (h5t_set_mesh_changed (m)); +} + #ifdef __cplusplus } #endif diff --git a/src/include/H5Part.h b/src/include/H5Part.h deleted file mode 100644 index 462aea2..0000000 --- a/src/include/H5Part.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - Copyright (c) 2006-2016, The Regents of the University of California, - through Lawrence Berkeley National Laboratory (subject to receipt of any - required approvals from the U.S. Dept. of Energy) and the Paul Scherrer - Institut (Switzerland). All rights reserved. - - License: see file COPYING in top level of source distribution. -*/ - -#ifndef __H5PART_H -#define __H5PART_H - -#include "H5Part_io.h" -#include "H5Part_model.h" - -#endif diff --git a/src/include/H5Part_io.h b/src/include/H5Part_io.h index b3889f6..b58a51b 100644 --- a/src/include/H5Part_io.h +++ b/src/include/H5Part_io.h @@ -206,5 +206,4 @@ H5PartReadDataInt32 ( #endif ///< @} - #endif diff --git a/src/include/H5Part_model.h b/src/include/H5Part_model.h index fa11605..0a78b9f 100644 --- a/src/include/H5Part_model.h +++ b/src/include/H5Part_model.h @@ -410,5 +410,4 @@ H5PartSetCanonicalView ( #endif ///< @} - #endif diff --git a/src/include/H5_debug.h b/src/include/H5_debug.h index 72c09e6..397f64f 100644 --- a/src/include/H5_debug.h +++ b/src/include/H5_debug.h @@ -17,6 +17,10 @@ @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /** Set debug mask. The debug mask is an or'ed value of @@ -64,6 +68,9 @@ H5GetDebugMask ( return (h5_get_debuglevel () & ~0x03); } -///< @} - +#ifdef __cplusplus +} +#endif + +///< @} #endif diff --git a/src/include/H5_error.h b/src/include/H5_error.h index 16700b8..852b7a4 100644 --- a/src/include/H5_error.h +++ b/src/include/H5_error.h @@ -18,7 +18,11 @@ \addtogroup h5_error @{ */ - + +#ifdef __cplusplus +extern "C" { +#endif + /** Report error, do not abort program. The error must be handled in the programm. @@ -144,6 +148,9 @@ H5GetErrno ( return h5_get_errno (); } -///< @} - +#ifdef __cplusplus +} +#endif + +///< @} #endif diff --git a/src/include/H5_file.h b/src/include/H5_file.h index 62a91e2..bc93b50 100644 --- a/src/include/H5_file.h +++ b/src/include/H5_file.h @@ -19,6 +19,10 @@ @{ */ +#ifdef __cplusplus +extern "C" { +#endif + #if H5HUT_API_VERSION == 2 #define H5OpenFile2 H5OpenFile #elif H5HUT_API_VERSION == 1 @@ -397,6 +401,9 @@ H5Finalize ( H5_API_RETURN (h5_close_hdf5 ()); } -///< @} - +#ifdef __cplusplus +} +#endif + +///< @} #endif diff --git a/src/include/H5_file_attribs.h b/src/include/H5_file_attribs.h index a4a9b4c..11fb947 100644 --- a/src/include/H5_file_attribs.h +++ b/src/include/H5_file_attribs.h @@ -22,6 +22,10 @@ @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /* __ _ _ _ _ _ _ _ / _(_) | ___ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ @@ -371,6 +375,10 @@ H5ReadFileAttribInt32 ( H5_INT32_T, (void*)buffer)); } -///< @} +#ifdef __cplusplus +} +#endif + +///< @} #endif diff --git a/src/include/H5_log.h b/src/include/H5_log.h index 793ba77..3206359 100644 --- a/src/include/H5_log.h +++ b/src/include/H5_log.h @@ -24,6 +24,10 @@ @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /** Set verbosity level to \c level. @@ -87,7 +91,10 @@ H5GetVerbosityLevel ( return h5_get_debuglevel () & 0x03; } -///< @} - +#ifdef __cplusplus +} +#endif + +///< @} #endif diff --git a/src/include/H5_model.h b/src/include/H5_model.h index 8b1df01..0e34b08 100644 --- a/src/include/H5_model.h +++ b/src/include/H5_model.h @@ -289,13 +289,12 @@ H5DeleteAttachment ( H5_API_ENTER (h5_err_t, "fname='%s'", fname); H5_API_RETURN (h5_delete_attachment (f, fname)); } - + #ifdef __cplusplus } #endif ///< @} - #endif diff --git a/src/include/H5_step_attribs.h b/src/include/H5_step_attribs.h index d259e9b..4a77c01 100644 --- a/src/include/H5_step_attribs.h +++ b/src/include/H5_step_attribs.h @@ -17,12 +17,15 @@ #include "h5core/h5_debug.h" #include "h5core/h5_attribs.h" - /** \addtogroup h5_step_attribs @{ */ +#ifdef __cplusplus +extern "C" { +#endif + /* _ _ _ _ _ _ ___| |_ ___ _ __ __ _| |_| |_ _ __(_) |__ _ _| |_ ___ ___ @@ -376,10 +379,9 @@ H5ReadStepAttribInt32 ( (void*)buffer)); } -///< @} - #ifdef __cplusplus } #endif +///< @} #endif diff --git a/src/include/H5hut.h b/src/include/H5hut.h index d3e3107..c0eaed4 100644 --- a/src/include/H5hut.h +++ b/src/include/H5hut.h @@ -14,9 +14,45 @@ #define H5HUT_API_VERSION 2 #endif -#include "H5.h" -#include "H5Part.h" -#include "H5Block.h" -#include "H5Fed.h" + +#include "H5_file.h" +#include "H5_model.h" +#include "H5_file_attribs.h" +#include "H5_step_attribs.h" +#include "H5_log.h" +#include "H5_debug.h" +#include "H5_error.h" + +#include "H5Part_io.h" +#include "H5Part_model.h" + +/** + \ingroup h5block_model + + \note + Different field sizes are allowed in the same time-step. + + \note + The same layout can be used, if the size of the field matches the + size of the layout. If the size of the layout doesn't match the + size of the field, an error will be indicated. + + \note In write mode views might be reduced to make them + non-overlaping, i.e. ghost-zones are eliminated. This may shrink + views in an unexpected way. + + \todo + check whether layout is reasonable +*/ + +#include "H5Block_attribs.h" +#include "H5Block_model.h" +#include "H5Block_io.h" + +#include "H5Fed_adjacency.h" +#include "H5Fed_model.h" +#include "H5Fed_retrieve.h" +#include "H5Fed_store.h" +#include "H5Fed_tags.h" #endif