# DMPlexCreateMedFromFile
Create a `DMPLEX` mesh from a (Salome-)Med file. 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateMedFromFile(MPI_Comm comm, const char filename[], PetscBool interpolate, DM *dm)
```
Collective


- ***comm        -*** The MPI communicator
- ***filename    -*** Name of the .med file
- ***interpolate -*** Create faces and edges in the mesh



## Output Parameter

- ***dm  -*** The `DM` object representing the mesh





## Reference

- **** -*** https://www.salome-platform.org/user-section/about/med, http://docs.salome-platform.org/latest/MED_index.html



## See Also
 [](chapter_unstructured), `DM`, `DMPLEX`, `DMPlexCreateFromFile()`, `DMPlexCreateGmsh()`, `DMPlexCreate()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plexmed.c.html#DMPlexCreateMedFromFile">src/dm/impls/plex/plexmed.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexmed.c)


[Index of all DMPlex routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
