# ngsPETSc.plex

This module contains all the functions related to wrapping NGSolve meshes to PETSc DMPlex using the petsc4py interface.

## Attributes

`FACE_SETS_LABEL` |
`CELL_SETS_LABEL` |
`EDGE_SETS_LABEL` |

## Classes

`ngs` | dummy class
`MeshMapping` | This class creates a mapping between Netgen/NGSolve meshes and PETSc DMPlex

## Module Contents

class ngsPETSc.plex.ngs

  dummy class

  class comp

    dummy class

    Mesh

ngsPETSc.plex.FACE_SETS_LABEL = 'Face Sets'

ngsPETSc.plex.CELL_SETS_LABEL = 'Cell Sets'

ngsPETSc.plex.EDGE_SETS_LABEL = 'Edge Sets'

class ngsPETSc.plex.MeshMapping(mesh=None, comm=PETSc.COMM_WORLD.tompi4py(), name='Default')

  This class creates a mapping between Netgen/NGSolve meshes and PETSc DMPlex

  Parameters:

    - mesh – the mesh object, it can be either a Netgen/NGSolve mesh or a PETSc DMPlex

    - name – the name of to be assigned to the PETSc DMPlex, by default this is set to “Default”

  name
  comm
  createNGSMesh(plex)

    This function generate an NGSolve mesh from a PETSc DMPlex

    Parameters:

      plex – the PETSc DMPlex to be converted in NGSolve mesh object

  createPETScDMPlex(mesh)

    This function generate an PETSc DMPlex from a Netgen/NGSolve mesh object

    Parameters:

      plex – the Netgen/NGSolve mesh object to be converted into a PETSc DMPlex.