petsc-3.11.4 2019-09-28
Report Typos and Errors

DMPlexCreateFromCellListParallel

This takes as input common mesh generator output, a list of the vertices for each cell, and produces a DM

Synopsis

#include "petscdmplex.h"   
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateFromCellListParallel(MPI_Comm comm, PetscInt dim, PetscInt numCells, PetscInt numVertices, PetscInt numCorners, PetscBool interpolate, const int cells[], PetscInt spaceDim, const PetscReal vertexCoords[], PetscSF *vertexSF, DM *dm)

Input Parameters

comm - The communicator
dim - The topological dimension of the mesh
numCells - The number of cells owned by this process
numVertices - The number of vertices owned by this process
numCorners - The number of vertices for each cell
interpolate - Flag indicating that intermediate mesh entities (faces, edges) should be created automatically
cells - An array of numCells*numCorners numbers, the global vertex numbers for each cell
spaceDim - The spatial dimension used for coordinates
vertexCoords - An array of numVertices*spaceDim numbers, the coordinates of each vertex

Output Parameter

dm - The DM
vertexSF - Optional, SF describing complete vertex ownership

Note: Two triangles sharing a face


       2
     / | \
    /  |  \
   /   |   \
  0  0 | 1  3
   \   |   /
    \  |  /
     \ | /
       1
would have input
 numCells = 2, numVertices = 4
 cells = [0 1 2  1 3 2]

which would result in the DMPlex

       4
     / | \
    /  |  \
   /   |   \
  2  0 | 1  5
   \   |   /
    \  |  /
     \ | /
       3

See Also

DMPlexCreateFromCellList(), DMPlexCreateFromDAG(), DMPlexCreate()

Level

beginner

Location

src/dm/impls/plex/plexcreate.c
Index of all DMPLEX routines
Table of Contents for all manual pages
Index of all manual pages