0

I'm working with Gmsh which is a program that can save meshes (FEM)into .gif, .jpg, .png, .mpg, .stl, .su2, .geo, .step, .msh, .bdf and many more.

I need to convert any kind of those files to .h5 file in order to be able to work on another program called parosol. HDF5 is a data model, library, and file format for storing and managing data. It supports an unlimited variety of datatypes, and is designed for flexible and efficient I/O and for high volume and complex data.

Any suggestion about converting files? cheers

SebastianGT
  • 11
  • 1
  • 5
  • There appears to be at least a `gif2h5` utility in the [hdf5-tools](http://packages.ubuntu.com/xenial/hdf5-tools) package. See also [HDF5 Tools by Category](https://www.hdfgroup.org/products/hdf5_tools/#cat) – steeldriver Aug 26 '16 at 13:00

1 Answers1

0

As you point out, HDF5 is a very general data file format. The barebones objects in an HDF5 file are datasets, dataspaces, datatypes, groups, and so forth. The HDF Group has an intro here: https://www.hdfgroup.org/HDF5/doc/H5.intro.html

Almost certainly any program (e.g. parasol) that can understand .h5 files as meshes, has a mesh-specific schema to follow on top of the basic HDF5 format. The first question I would be asking is: Does parasol document their schema for meshes? If so, there is hope of a converter. If not, and they keep it proprietary, you are also asking that someone has reverse-engineered the schema.

  • Ok thanks, I found one converter called HDFview that needs to be compiled. This saves many files sinto HDF5. I've been trying to compile it using the installation guide and there're different ways to do it. However, the same error shows up in my terminal. `CMake Error at CmakeLists.txt:2 (PROJECT): No CMAKE_Java_COMPILER could be found. Tell CMake where to find the compiler by setting either the environment variable "JAVA_COMPILER" or the CMake cache entry CMAKE_Java_COMPILER to the full path to the compiler` Any ideas? – SebastianGT Aug 29 '16 at 11:06
  • As its name suggests, HDFView is primarily a _viewer_ for examining HDF files. It also lets you do minor editing of the file. If you had a mesh in HDF5 format already, it would be a great tool for reverse-engineering the schema. But I'm fairly sure it knows nothing about meshes. – John Aspinall Aug 30 '16 at 22:13
  • As far as your compiler error goes, what do you see on a terminal when you type `which javacc` ? – John Aspinall Aug 30 '16 at 22:14
  • After all I unistalled and installed everything again from the source. I managed to install HDFView and save .bmp into .h5 files. The next step/problem I'm facing is to set the parameters from my .h5 file that are needed to run the simulation on a mesh. This can be achieved running an AsciiToHDF4.cpp script. When executed this shows up: `./AsciiToHDF5.cpp: line 1: /bin: Is a directory ./AsciiToHDF5.cpp: line 2: AsciiToHDF5.cpp: command not found ./AsciiToHDF5.cpp: line 3: syntax error near unexpected token ' (' ./AsciiToHDF5.cpp: line 3: * Copyright (C) 2011, Creator'` Any ideas? – SebastianGT Sep 02 '16 at 10:29