Commit 601bebc1 authored by gsell's avatar gsell

readjust to API changes

parent ad7c1cf0
......@@ -433,7 +433,7 @@ traverse_mesh (
) {
/* open mesh and get number of levels */
printf (" Opening mesh with id %lld\n", mesh_id);
H5FedOpenMesh (f, mesh_id, mesh_type);
H5FedOpenTetrahedralMesh (f, mesh_id);
h5_size_t num_levels = H5FedGetNumLevels (f);
printf (" Number of levels in mesh: %lld\n", (long long)num_levels);
......@@ -459,7 +459,7 @@ main (
/* open file and get number of meshes */
h5_file_t *f = H5OpenFile (FNAME, H5_O_RDONLY, 0);
h5_size_t num_meshes = H5FedGetNumMeshes (f, MESH_TYPE);
h5_size_t num_meshes = H5FedGetNumTetrahedralMeshes (f);
printf (" Number of meshes: %lld\n", (long long)num_meshes);
/* loop over all meshes */
......
......@@ -4,7 +4,6 @@
#include "H5hut.h"
const h5_oid_t MESH_TYPE = H5_TETRAHEDRAL_MESH;
const char* FNAME = "simple_tet.h5";
static h5_err_t
......@@ -205,12 +204,11 @@ traverse_level (
static h5_err_t
traverse_mesh (
h5_file_t* const f,
const h5_id_t mesh_id,
const h5_oid_t mesh_type
const h5_id_t mesh_id
) {
/* open mesh and get number of levels */
printf (" Opening mesh with id %lld\n", mesh_id);
H5FedOpenMesh (f, mesh_id, mesh_type);
H5FedOpenTetrahedralMesh (f, mesh_id);
h5_size_t num_levels = H5FedGetNumLevels (f);
printf (" Number of levels in mesh: %lld\n", (long long)num_levels);
......@@ -235,13 +233,13 @@ main (
/* open file and get number of meshes */
h5_file_t* f = H5OpenFile (FNAME, H5_O_RDONLY, 0);
h5_size_t num_meshes = H5FedGetNumMeshes (f, MESH_TYPE);
h5_size_t num_meshes = H5FedGetNumTetrahedralMeshes (f);
printf (" Number of meshes: %lld\n", (long long)num_meshes);
/* loop over all meshes */
h5_id_t mesh_id;
for (mesh_id = 0; mesh_id < num_meshes; mesh_id++) {
traverse_mesh (f, mesh_id, MESH_TYPE);
traverse_mesh (f, mesh_id);
}
/* done */
......
......@@ -183,7 +183,7 @@ main (
H5SetErrorHandler ( H5AbortErrorhandler );
h5_file_t *f = H5OpenFile ( "simple_tet.h5", H5_O_RDONLY, 0 );
h5_size_t num_meshes = H5FedGetNumMeshes ( f, H5_TETRAHEDRAL_MESH );
h5_size_t num_meshes = H5FedGetNumTetrahedralMeshes (f);
printf ( " Number of meshes: %lld\n", (long long)num_meshes );
h5_id_t mesh_id;
......@@ -192,7 +192,7 @@ main (
stderr,
"Time used: %f\n",
(float)clock()/(float)CLOCKS_PER_SEC );
H5FedOpenMesh ( f, mesh_id, H5_TETRAHEDRAL_MESH );
H5FedOpenTetrahedralMesh (f, mesh_id);
fprintf (
stderr,
"Time used: %f\n",
......
......@@ -10,7 +10,6 @@
#endif
#endif
const h5_oid_t MESH_TYPE = H5_TETRAHEDRAL_MESH;
const char* FNAME = "simple_tet.h5";
typedef struct vertex {
......@@ -48,7 +47,7 @@ main (
/* open file and add mesh */
h5_file_t* const f = H5OpenFile (FNAME, H5_O_WRONLY, 0);
H5FedAddMesh (f, MESH_TYPE);
H5FedAddTetrahedralMesh (f);
/* store vertices */
H5FedBeginStoreVertices (f, num_vertices);
......
......@@ -4,7 +4,6 @@
#include "H5hut.h"
const h5_oid_t MESH_TYPE = H5_TETRAHEDRAL_MESH;
const char* FNAME = "large_tet.h5";
const h5_int32_t num_levels = 11;
......@@ -62,7 +61,7 @@ main (
/* open file and add mesh */
h5_file_t* const f = H5OpenFile (FNAME, H5_O_WRONLY, 0);
H5FedAddMesh (f, MESH_TYPE);
H5FedAddTetrahedralMesh (f);
/* store vertices */
H5FedBeginStoreVertices (f, num_vertices);
......
......@@ -114,7 +114,7 @@ main (
/* open file and get number of meshes */
h5_file_t* f = H5OpenFile (FNAME, H5_O_RDWR, 0);
H5FedOpenMesh (f, 0, MESH_TYPE);
H5FedOpenTetrahedralMesh (f, 0);
/* open last level */
h5_size_t num_levels = H5FedGetNumLevels (f);
......
......@@ -285,7 +285,7 @@ traverse_mesh (
) {
/* open mesh and get number of levels */
printf (" Opening mesh with id %lld\n", mesh_id);
H5FedOpenMesh (f, mesh_id, mesh_type);
H5FedOpenTriangleMesh (f, mesh_id);
h5_size_t num_levels = H5FedGetNumLevels (f);
printf (" Number of levels in mesh: %lld\n", (long long)num_levels);
......@@ -311,7 +311,7 @@ main (
/* open file and get number of meshes */
h5_file_t *f = H5OpenFile (FNAME, H5_O_RDONLY, 0);
h5_size_t num_meshes = H5FedGetNumMeshes (f, MESH_TYPE);
h5_size_t num_meshes = H5FedGetNumTriangleMeshes (f);
printf (" Number of meshes: %lld\n", (long long)num_meshes);
/* loop over all meshes */
......
......@@ -6,7 +6,6 @@
#include <mpi.h>
#endif
const h5_oid_t MESH_TYPE = H5_TRIANGLE_MESH;
const char* FNAME = "simple_triangle.h5";
static h5_err_t
......@@ -168,13 +167,12 @@ traverse_level (
static h5_err_t
traverse_mesh (
h5_file_t* const f,
const h5_id_t mesh_id,
const h5_oid_t mesh_type
const h5_id_t mesh_id
) {
/* open mesh and get number of levels */
printf (" Opening mesh with id %lld\n", mesh_id);
H5FedOpenMesh (f, mesh_id, mesh_type);
H5_size_t num_levels = H5FedGetNumLevels (f);
H5FedOpenTriangleMesh (f, mesh_id);
h5_size_t num_levels = H5FedGetNumLevels (f);
printf (" Number of levels in mesh: %lld\n", (long long)num_levels);
/* loop over all levels */
......@@ -194,9 +192,11 @@ main (
char* argv[]
) {
MPI_Comm comm = MPI_COMM_WORLD;
#if defined (PARALLEL_IO)
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Init (&argc, &argv);
#else
MPI_Comm comm = 0;
#endif
/* abort program on error, so we don't have to handle them */
......@@ -205,13 +205,13 @@ main (
/* open file and get number of meshes */
h5_file_t* f = H5OpenFile (FNAME, H5_O_RDONLY, comm);
h5_size_t num_meshes = H5FedGetNumMeshes (f, MESH_TYPE);
h5_size_t num_meshes = H5FedGetNumTriangleMeshes (f);
printf (" Number of meshes: %lld\n", (long long)num_meshes);
/* loop over all meshes */
h5_id_t mesh_id;
for (mesh_id = 0; mesh_id < num_meshes; mesh_id++) {
traverse_mesh (f, mesh_id, MESH_TYPE);
traverse_mesh (f, mesh_id);
}
/* done */
......
......@@ -3,7 +3,6 @@
#include "H5hut.h"
const h5_oid_t MESH_TYPE = H5_TRIANGLE_MESH;
const char* FNAME = "simple_triangle.h5";
typedef struct vertex {
......@@ -40,7 +39,7 @@ main (
/* open file and add mesh */
h5_file_t* const f = H5OpenFile (FNAME, H5_O_WRONLY, 0);
H5FedAddMesh (f, MESH_TYPE);
H5FedAddTriangleMesh (f);
/* store vertices */
H5FedBeginStoreVertices (f, num_vertices);
......
......@@ -3,7 +3,6 @@
#include "H5hut.h"
const h5_oid_t MESH_TYPE = H5_TRIANGLE_MESH;
const char* FNAME = "simple_dunetest.h5";
typedef struct vertex {
......@@ -47,7 +46,7 @@ main (
/* open file and add mesh */
h5_file_t* const f = H5OpenFile (FNAME, H5_O_WRONLY, 0);
H5FedAddMesh (f, MESH_TYPE);
H5FedAddTriangleMesh (f);
/* store vertices */
H5FedBeginStoreVertices (f, num_vertices);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment