Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Tools on MED file

Introduction

There are few executables based on the MEDCoupling and MEDLoader libraries that help the user to perform common operations on MED files :

  • conversion to other formats,
  • splitting of a MED file to a parallel MED file distributed over a number of subdomains.

MEDPartitioner tool

The purpose of MEDPARTITIONER is to split MED files into a series of other MED files forming a partition of the original MED files. It can either work with serial meshes (1 to n) or distributed meshes (p to n). For serial meshes, it accepts MED files from the 2.1 version onwards. For distributed MED files, it accepts MED files from the 2.3 version onwards.

There exists a parallel version of MEDPARTITIONER, which accepts distributed MED files only. In contrast to the ordinary MEDPARTITIONER the parallel one distributes several usual MED files composing the whole model among available processors. After the partitioning, each processor writes only it's own part of the distributed MED file. The parallel MEDPARTITIONER processes meshes only, not fields.

It can be used either as an executable, medpartitioner (or medpartitioner_para) or as a library. The partitioning is made thanks to one of the following library :

The arguments to the medpartitioner tool can be retrieved by calling :

medpartitioner --help

or

medpartitioner_para --help

For Salome V7.2.0, one gets the following arguments (some of them are unavailable in parallel version):

Available options:
--help : produces this help message
--mesh-only : do not create the fields contained in the original file(s)
--distributed : specifies that the input file is distributed
--input-file=<string> : name of the input MED file
--output-file=<string> : name of the resulting file
--meshname=<string> : name of the input mesh (not used with --distributed option)
--ndomains=<number> : number of subdomains in the output file, default is 1
--plain-master : creates a plain masterfile instead of an XML file
--creates-boundary-faces: creates the necessary faces so that faces joints are created in the output files
--family-splitting : preserves the family names instead of focusing on the groups

RENUMBER tool

The purpose of RENUMBER is to renumber the cell of a mesh in order to make numerical computation easier. This tool works with meshes which contain only one cell type and can renumber it according to two different methods:

It can be used in this way :

renumber MEDFile_in MeshName Method[BOOST/METIS] MEDFile_out

sauv2med tool

The sauv2med tool enable conversion from a Cast3m sauv file into a MED file. It is a python script that encapsulates the read/write drivers provided by the MEDLoader library.

Calling

sauv2med myfile.sauv

generates a med file named myfile.sauv.med

med2sauv tool

med2sauv operator is the operator that is inverse of sauv2med. Its behaviour is symmetrical.

Calling

med2sauv myfile.med

generates a sauv file named myfile.med.sauv