petsc-3.3-p7 2013-05-11


Create an unstrctured mesh from a list of the vertices for each cell, and the coordinates for each vertex.


#include "petscdmmesh.h"   
PetscErrorCode DMMeshCreateMeshFromAdjacency(MPI_Comm comm, PetscInt dim, PetscInt numCells, PetscInt numCorners, PetscInt cellVertices[], PetscInt spatialDim, PetscInt numVertices, const PetscReal coordinates[], PetscBool interpolate, DM *dm)
Collective on comm

Input Parameters

comm - An MPI communicator
dim - The dimension of the cells, e.g. triangles have dimension 2
numCells - The number of cells in the mesh
numCorners - The number of vertices in each cell
cellVertices - An array of the vertices for each cell, numbered 0 to numVertices-1
spatialDim - The dimension for coordinates, e.g. for a triangle in 3D this would be 3
numVertices - The number of mesh vertices
coordinates - An array of the coordinates for each vertex
interpolate - Flag to create faces and edges

Output Parameter

dm -The DMMesh object

See Also

DMMESH, DMMeshCreateMeshFromAdjacencyHybrid(), DMMeshCreateBoxMesh()

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages