HIP

HIP is a package for manipulating unstructured computational grids.
It was born in 1997 at CERFACS in Toulouse to convert structured multiblock meshes into unstructured ones.

From that, HIP grew into a toolkit that:

  • reads meshes in various formats ( Centaur, Fluent, Ensight, etc.)
  • generates simple rectangular 2D meshes
  • transforms meshes by translation, scaling rotation or reflection
  • Check mesh validaty
  • converts structured into unstructured grids
  • splits quadrilateral elements into triangular ones
  • extrudes 2D meshes axially and radially to 3D meshes
  • interpolates solutions between grids
  • cuts pieces of structured and unstructured meshes out
  • assembles meshes from pieces
  • coarsens unstructured grids for multigrid applications
  • adaptively refines grids
  • writes meshes in various formats
It is the main tool to manipulate meshes/grids for use with AVBP at CERFACS

5-05-2020
Current version: 20.04 'Muscari Armeniacum'
Execs can be found at: /home/rolex/HIP/latest
The avbp module automatically aliases hip to the latest version. Web guidelines and issue reporting can be found here.
A basic cheat sheet can be can be found here.
User's Guide
Hip news

Version 'Ficus carica'
1-09-2016

Most important changes since 1.40:

  • introduce support for mmg on hybrid grids.
    You can adapt the tetrahedral parts of hybrid meshes via the mmg library. Non-tetrahedral elements are frozen, only tetrahedral elements are

Version 'Tanacetum parthenium'
01-07-2014

Most important changes since 1.40:

  • writing coarsened meshes: hdf write -l
    You can now write a coarsened mesh to hdf using the -l syntax. Using the basic mg command coarsens the mesh everywhere, based on the mg- parameters (of course, see the manual for details.) This typically does take some time to complete on larger meshes. If you're just after removing the smallest cells to improve your timestep, you should use the mg volMin variant, which only looks at the smallest ones. Writing this locally coarsened grid does not create a new mesh, so does not use -l, See Sec. 5.3 in the hip manual, this feature has been offered by hip for a quite a while, use it! Note that this should work reasonably well for tet meshes (no reports yet), but may create degenerate elements (with some collapsed edges) for non-simplex meshes, AVBP cannot handle these elements.
  • xmf files when writing to hdf
    hip now generates a xmf file that allows to visualise your data (mesh, solution and patches) directly using the hdf5 format. xmf is compatible with Paraview and Ensight.
    To note: xmf does not (yet) support visualisation of meshes that have patches with multiple element types.
  • Zone management: write/read hdf -z
    A number of bug fixes removed all known issues. Reading and writing all zones is default, equivalent to the -z option. If you want to turn off reading or writing zones, use -z0. For convenience the zone list command is now also recognised as list zone.
  • Vertex to element connectivity: write hdf -v
    This writes node to element points to file, see the manual on details. This extended connectivity may be useful in grid search & tracking applications, e.g. tracing Lagrangian particles.

Version 'Rosa Dublin Bay'
20-07-2013

  • Addressage aussi par nom de bc et de zones:
    Les patches bc et les zones etaient identifiés par leur numéro chronologique pour des commandes de modification comme set bc-text ou set bc-order. Desormais il est possible d'utiliser les noms des patches avec "wildcards" comme * et ?, de manière identique aux noms de fichiers en Unix. E.g., set bc-type ?mur_* wall. Naturellement il est toujours possible d'addresser un patch ou une zone par son numéro, ou une expression (presque) régulière comme "1,3,4-6". HIP permet des blancs si l'expression est incluse entre guillements. Il est à noter que toute expression qui commence avec un '-' ou un 'numero' est interpretée comme une expression numérique. Toute expression qui commence avec un charactere est considérée comme une expression alphabétique. Les noms de paroi tels que 1_wall sont donc à éviter. Similairement, les noms de zones ne devaient pas commencer avec 'add', 'list' ou 'mod'. Si oui, on peut addresser par numero.
  • Soutien pour gros maillages:
    Si compilé avec -DHIP_USE_LONG, HIP utilise le type size_t pour la connectivité au lieu du type unsigned int. Sur machines avec grande mémoire, size_t devient 64bit au lieu de 32. Cette version est validée pour interpolation et écriture avec hdf. Pour savoir où récupérer la version ULONG ou en cas de fonctionalités défectueuses, contacter Gabriel Staffelbach.
  • Format hdf:
    HIP ajoute la taille de la bounding box comme deux vecteurs x_min et x_max dans la partie /Parameters/. Dans cette partie on trouve aussi les longueurs d'arrêtes h_min, h_max, les volumes d'éléments vol_elem_min, vol_elem_max et le volume total du maillage vol_domain. Les numéros des zones sont désormais écrits dans un format fixe de 3 chiffres, remplis de zeros si nécessaire.
  • Format Centaur:
    HIP soutient désormais la lecture de zones du format Centaur (les zones sont déjà lues pour les formats hdf et fluent). Les faces des interfaces intérieures sont exclus de la lecture, donc il ne sera plus nécessaire d'utiliser le test de connectivité (check=1) pour les éliminer. Le soutien pour ces faces intérieures est sur la liste des prochains développements.

Version 'Achillea filipendulina'
07-09-2012

Cette fois-ci pas de fonctionalité additionelle, mais quelques "bug-fixes" uniquement. Deux petits modifications des interfaces sont notables:

  • Périodicité:
    HIP essaye de la reconnaitre automatiquement. Pour distinguer entre une translation et une rotation, on compare les normales des patches paires. Une translation a des normales (unitaires, donc normalisées) exactement opposées, modulo precision. Souvent les maillages sont livrés avec des coordonnées en simple precision, donc cette comparaison se fait avec une tolérance. Dans la 1.36.0 le défaut a été augmenté à 1.e-5. Si HIP ne reconnait pas bien la géometrie dans votre maillage, ce seuil peut être modifié avec la commande set pe_thresh_is_rot.
  • Interpolation et recouvrement:
    HIP permet d'étendre la solution du maillage source sur la partie du maillage cible qui n'est pas couverte. Le rayon jusqu'à extrapolation est défini par la longueur d'arrête la plus longue de la face source la plus proche multiplié par un facteur. Ce facteur est par défaut infini, donc l'extrapolation par défaut est effectuée sur tout le domaine (avec limitation de la valeur de ne pas depasser ceux dans l'element le plus proche), mais cette valeur peut être modifiée avec set in-rim.. E.g., set in-rim = 0.1 extrapole uniquement 10% plus loin que la longueur typique locale, une échelle utile pour garder la solution cible uniquement dans la partie couverte, mais qui permet de capter des noeuds juste en dehors dû à des différences de résolution de surfaces courbées. L'interpolation par moindre-carré (set in-re 1) ne cherche pas sur les élements, donc calcule le rayon basé sur la longueur minimale du maillage entier. Cette approche marche moins bien pour l'extrapolation, voir la doc, donc le rayon est zéro par défaut.

Version 'Ichtyosaurus'
04-07-2012

Main changes:

  • Bug fixes for interpolation:
    All known bugs relating to interpolation should now be resolved.
  • Modification of partial interpolation:
    where is the solution taken from when grids/variable sets don't overlap. See the help (> help interpolate) and the documentation on this. The key variable you may want to set is the width of an interpolation rim using 'set in-rim'. The donor solution can be restricted to be extrapolated only within this rim surrounding the donor grid. Default value is infinity, hence extrapolation everywhere.
  • Bug fixes when treating vector components in copy/rotation:
    All known bugs related to vector variables should now be fixed.
  • Support and bug fixes for reading/writing ensight with node ids:
    Adding support for writing node ids in 1.34 broke this functionality, there is now working read and write support. Files with node ids contain the information how nodes specified with boundary parts are related to the (global) numbering in the volume part. Ensight also needs node ids to display them. However, the paraview reader seems broken for reading node ids, so when displaying with paraview do not write node ids out. Default is not to write them, equivalent to supplying the flag -n off.

Version 'Glis-Glis'
23-01-2012

  • Soutien pour informations zonales:
    HIP peut désormais définir des zone simples. Voir l'aide en ligne de commande pour plus d'explications. Cela entraine une modification des commandes de zone.
  • Ecriture CGNS non structuré disponible

Version 'Daphnia'
13-09-2011

  • Soutien pour informations zonales:
    HIP retient pour chaque cellule à quelle zone elle est associée. Cette appartenance peut être générée de façon globale pour toutes les cellules, ou peut etre lue sous format hdf. Chaque zone peut porter un nombre arbitraire de paramètres. Avec un copy-uns, e.g. duplication de secteurs, une nouvelle zone est générée avec la copie des paramètres. Les parametres déclarés en 'vecteur' sont soumis à la meme rotation que les variables. Les zones sont uniquement lues et écrites dans le format hdf. Voir la doc et l'aide online pour plus de détails.
  • Modification de calcul de périodicité:
    Désormais hip n'exige plus qu'une translation pérodique soit dans les axes x,y,z.
  • Flag vecteur pour variables:
    Pour mieux soutenir des opérations de rotations pour variables vectorielles, HIP maintient un flag vecteur pour les variables déclarées en type vecteur. Dans le format hdf les vecteurs sont reconnus par leur groupes et noms, dans d'autres formats par la position dans le fichier. Me faire signe si ca ne marche pas et utiliser la nouvelle commande 'var vec' pour contourner manuellement.
  • Nouvelle structure arborescence:
    L'interpolation de maillages était tres lent sur des gros maillages. Une nouvelle lib arborescence a été implanté pour l'interpolation qui accélère cette tache de 2 jours à 2 minutes. Donc, plus possible d'aller prendre un cafe en attendant ...
  • Soutien pour lecture CGNS a été mis en place, l'écriture a été codée, mais a besoin d'un peu plus de deboguage.
  • Plusieurs petits bug fixes, surtout avec l'écriture en Ensight.
    Voir le changelog dans la doc qui a été mise à jour.

Version 'Dromaius novaehollandia'
08-04-2009

This update contains:

  • updated manual.
  • swap periodic patches to keep a positive rotation angle in r.h. rule.
  • minor changes in what params are written in read/write_hdf (GS).
  • fix bug with double incrementation with make_grid.
  • allow reading hdf solutions with arbitrary group names.
  • set successful return from main to EXIT_SUCCESS.
  • fix bug with 360deg copy3d.
  • correctly treat name and type of the variables in copy3d.
  • all exit() return either EXIT_SUCCESS or EXIT_FAILURE.
  • bug fix with fluent binary read.

Version 'Ursus Ursus'
18-12-2008

This release contains mainly a number of bug fixes and other small changes, the bug store has been emptied.

  • a workaround has been added to read older avbp files (hip v 1.14) with peridicity in the inBound file.
  • the treatment for axi-symmetric cases with nodes on the x-axis has been made more comfortable, the flag axiX is now set automatically when a rotational periodicity is found. This flag is now listed with 'li gr'. Also a bug with listing the boundary nodes in that case has been fixed.
  • a version for very large meshes (> 130M nodes) has been created. The standard memory setup is now a max of 32 chunks and 130M nodes.
  • On 'exit' hip now returns nothing, not even the return value of '1', this potentially fixes a problem with C3S.
Yet to do:
  • add extended parsing of the hdf file to be able to list all parameters and all solution files.
  • update the doc.

Version 'Kaa'
15-04-2008

What has changed with this version:

  • A number of bug fixes, there are no open cases in the bug-store.
  • Switch to the more portable version 1.8 of the hdf library for writing hdf files.
  • In particular fixes and improvements relating to
    • reading n3s hybrid and multi-species;
    • reading and writing hdf, including multi-species;
    • reading fluent files.
To be done:
  • Implement writing multi-species solutions to n3s.
  • Read, treat and write averaged solutions.
  • Read, treat and write zone flags for each element.

Version 'Tortoise'
11-12-2007

New features this time, but a number of fixes as shown in the change log in the manual. Mainly:

  • all known bugs have been fixed for:
    • reading Fluent grids and solutions
    • reading and writing n3s (mono-species)
    • reading and writing fictive species to hdf
  • to do around Easter:
    • resolve problems of reading hdf5 on Macs and cygwin
    • find out whether to and if so what to write for Fluent case files
    • define and implement what to write for n3s multi-species files
    • support for averaged solutions in hdf

Version 'Feline'
15-10-2007

Nouveau:

  • lecture fluent de fichiers binaires et de fichiers solution.
  • écriture n3s: codé mais reste à être validé.
  • hdf5: lecture et écriture d'espèces fictives, et qqs changements cosmétiques, à valider.
  • soutien pour scripts GUI: sans verbosite hip se tait. Bon, pas complètement, mais au moins sur les commandes importantes comme set, read/write hdf/fl/n3s, in gr.
  • en conséquence, sous erreurs type "FATAL" hip s'arrête (dans les fonctions ci-dessus) et écrit un fichier log erreur.
Reporté:
  • écriture Fluent.
  • validation écriture solution n3s, espèces, périodicité.
  • bogue copy2tets.

Version 'Ameise'
15-05-2007

This is new:

  • hip now reads cedre mesh files using 're cd' (the abbreviation ce is already in use for centaur).
  • a bug that sent the interpolation routine into an endless loop has been fixed.
  • Centaur files of type 5 (very large files) can now be read.
  • hdf5 mesh and solution files are read and written, a number of small issues have already been resolved.
  • the hdf5 mesh file now allows the option 'hdf5e' (all 5 chars are significant) which will add a METIS style elGraph.
  • a bug with set path when reading n3s has been fixed.
  • a bug with setting epsOverlap under scaling has been fixed.
  • if verbosity is set to 5, hip now lists all negative volumes rather than just the first one that is encountered.
  • bugfix relating to reading and writing avh file sets without solution.
  • The manual has been updated and can be found in ~muller/hip/doc/hip.pdf
To do:
  • fix copy2tets for arbitrary hex meshes.
  • fix mg to coarsen the smallest cells, however this needs a testcase that demonstrates the bug.
  • introduce reading Fluent solutions and writing Fluent files.

Version 'Humpback'

As of version 1.17 hip links to the C-routines of hdf which currently seem only installed for Linux at Cerfacs. Other platforms will be added as soon as hdf for C is installed.

Updates:

  • You can now read avh files with an hdf solution file without an hdf solution file (yes, there is no syntax error here).
  • Naming of variables, e.g. species, is essential and supported for the hdf5 solution file. hip always did allow you to change names. Now even the manual and online help tell you how to do it:
    var name nr-range var_name
    Set the name of the variables in nr-range to be var_name.
    The same applies for categories (ns, species, tpf, etc.)
    var cat nr-range var_name
    Set the name of the variables in nr-range to be var_name.
  • The fixes in 1.17 to better recognise 3-D periodicity broke recognition of 2-D translations. That should work again now.
  • Users had lost the knowledge that in order to list special vertices on the axis, you had to set a specific topology type:
    set topo axiX
    hip now does this automatically if it discovers a periodic node that partners with itself. To be verified if this works as advertised. In addition, always verify if you actually find the axi-nodes as expected in your files.
  • The hdf5 format for the mesh has been defined and implemented for writing. See the manual for details. However, no validation done yet and the reading is still to be implemented.
  • There is now a bug-store for hip. Use it, because I can't fix bugs for which there is no testcase and hand which reproduces the problem.

Version 'Hirondelle'

Changes/New Features:

  • hip now prepares special output in the .exBound file to treat corners. The extra info lists all bnd nodes that belong to more than one patch which patches those are. Note that this info is always written, but you have to declare the patches to be included as one of the 'wall' types, e.g. with 'set bc-type wall'. See Eleonore or Simon about details.
  • the mesh scale epsOverlap is now local to each mesh. This should avoid problems many of you ran afoul of when first reading a coarse mesh, which did set a global eps, and then a finer mesh with a much smaller scale. In case you disagree with hip's choice, you can still reset the global eps manually before reading a new mesh. Note that the new procedure disables checking for degeneracy (collapsed edges eg.) when reading meshes. It still should detect coincident nodes correctly when merging meshes.
  • 2D centaursoft files are now read.
  • Periodicity should now be automatically detected for all periodic axes, not just x. If you have problems, send me a packaged testcase. Then specify the periodicity manually using either the 'set pe-rot' or 'set pe-corner' commands described in the manual to get your case running in the meantime.
Bug Fixes:
  • fix pb with se-pe rot for y,z axes
  • fix pb with patch miscount when patches are dropped
  • fix pb with re-reading mpVx files (≥ 1.16.0 )

Version 'Blackbird'
02-04-2005 (1.15.2)

Changes for this version:

  • Bug fixes relating to renumbering patches and declaring periodicity.
  • Fixes in writing n3s files, hybrid or not. This should also fix the problem with the boundary face orientation.
  • All calls to ADF and CGNS libraries have been removed with the default compilation options, since the switch to CGNS has been postponed for now. This makes hip much more portable, no libs required. Just type make.

02-07-2005 (1.15.3)
Minor changes:
  • Size and location of the smallest cell: Output of the smalles/largest volumes and their location by default. In previous versions you had to up the verbosity to 5 for this --- and had to listen to Eddie.
  • Grid size stats: Basic grid size statistics (# of cells, etc.) are listed when checking the grid and when the grids are listed. (Remember that checking happens after any major operation such as reading, attaching, etc. You can also trigger checking by hand using the command 'check'. A list of all grids read is produced with 'list grid'.)
  • Checking periodicity: Already in previous versions hip enforces periodicity of the solution, provided the periodicity is declared. The latest version outputs to screen a remark that checking has happened and what the max. diff over all variables was.
Bug fixes:
  • Reading periodic patches from the inBound: A bug is fixed in reading periodic boundaries back from the inBound file. Not a major worry for the users, as everybody seems to use the option pe-write=1 to force writing periodic boundaries to the exBound file. (Or maybe everybody does that because reading the inBound gave problems?;-)
Major changes:
  • Coarsening grids: hip is very happy that finally someone discovered how useful its coarsening function 'mg' is. Originally developed for multigrid, it is very useful for acoustic eigenvalue computations where grid quality does not matter, but a low number of cells does. To be able to use this feature for AVBP, an interface has been added to allow writing coarser grids to the AVBP file format. See the online help under 'help write' or catch Pablo or Claude when they're not playing with it. Note that coarsening does affect the mesh quality. Hence it is not advised to use a coarsened grid for an AVBP flow computation.
  • Removing internal boundaries: A new module has been added to remove only matching boundaries when attaching (merging) grids. In previous versions this happened when invoking the connectivity check using check level 5. This incidentally also tests all internal faces for match, a rather memory intensive process for a 40M cell grid. You can now remove internal boundaries by marking them in the list of patches using the grandmother of all commands, 'ma ma'. hip then uses very little extra memory and removes only those faces. Most importantly, hip now knows which faces are supposed to match and warns you if there is a mismatch. The online help on 'attach' and 'mark' has been updated to reflect this.

06-09-2005 (1.15.4)
Changes all relate to reading Centaursoft files.
- support for modular files.
- automatic detection whether the Centaur file has been written on a little- or big-endian machine.
When merging meshes hip now keeps track of the smallest meshsize and adjusts epsOverlap accordingly.
However, you still need to reset epsOverlap when reading a second mesh with a smaller mesh size.

07-02-2006 (1.15.5)
New feature:
  • hip now allows to collapse individual small cells which adversely affect the explicit timestep. Run `help mg volMin', but be sure to check out the caveats in the updated handbook on this option. To summarise:
    • should work well on tet meshes if you're only attacking a few cells.
    • if you remove a larger number of cells, you might change your geometry quite a bit.
    • might have serious side-effects when used on hybrid grids.(See the leaflet with the packaging, if in doubt consult your pharmacist or GP.)
New feature nearly working:
  • hip can soon cut your hex grids into tets. Soon means when I've sorted out the final bugs.
Other updates include:
  • the version string for TPF was brought in line with what is used for AVBP TPF now, should work with all moulinettes now.
  • the output of the elGraph file for METIS was changed to conform, should work now.
  • the treatment of the coordinate window in integrate rectangle was changed to be more robust. Look up `he in re' and use it.
  • OSF versions (imhotep) were recently compiled with the wrong flags, ie. little-endian byte-swapping was not done. Should be fixed now.
  • a 64 bit version has been installed on `chouette'. Grand, isn't it?

07-04-2006
Changes/New Features:
  • File Formats: the support for AVBP 5.3, TPF 5.3 and AVSP 3.0 formats has been cleaned up. Submit a bug report with an example to Gabriel if any of the default formats does not work for you.
  • Hex to Tet: hip can now cut your hex mesh (any hex mesh) into tetrahedra. Using the 'copy 2tet' command. See the online help or the manual for details.
  • Boundary Normals: a new option for the 'set no-single' command has been introduced that allows to have single normals for wall patches only. Have a look at the online help, RTFM or talk to Eleonore.
  • Periodic Boundaries: the default for writing periodic boundaries has been changed. It is now set pe-write 1.
Bug Fixes:
  • rotate/flip also velocities in transform.
  • fix wrong node table with writing prisms to n3s.
  • fix bug with writing quad faces to n3s.
  • improve finding a containing element in make_coarser_level for mg.
  • change sign of rotation to right hand rule in tr rot.
  • fix bug with reading larger number of add vars.
  • fix bug when comparing nBcIn in match_perBc.