:orphan:
# DMPlexCreateCGNS
Create a `DMPLEX` mesh from a CGNS file ID. 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateCGNS(MPI_Comm comm, PetscInt cgid, PetscBool interpolate, DM *dm)
```
Collective


## Input Parameters

- ***comm  -*** The MPI communicator
- ***cgid -*** The CG id associated with a file and obtained using cg_open
- ***interpolate -*** Create faces and edges in the mesh



## Output Parameter

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





## Note
https://cgns.github.io


## See Also
 [](ch_unstructured), `DM`, `DMPLEX`, `DMPlexCreate()`, `DMPlexCreateExodus()`

## Level
beginner

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/cgns/plexcgns2.c.html#DMPlexCreateCGNS_Internal">DMPlexCreateCGNS_Internal in src/dm/impls/plex/cgns/plexcgns2.c</A><BR>


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


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