#include "petscdmplex.h" #include "petscdmplex.h" PetscErrorCode DMPlexCreateFromDAG(DM dm, PetscInt depth, const PetscInt numPoints[], const PetscInt coneSize[], const PetscInt cones[], const PetscInt coneOrientations[], const PetscScalar vertexCoords[])
dm | - The empty DM object, usually from DMCreate() and DMSetDimension() | |
depth | - The depth of the DAG | |
numPoints | - The number of points at each depth | |
coneSize | - The cone size of each point | |
cones | - The concatenation of the cone points for each point, the cone list must be oriented correctly for each point | |
coneOrientations | - The orientation of each cone point | |
vertexCoords | - An array of numVertices*dim numbers, the coordinates of each vertex |
Note: Two triangles sharing a face would have input
depth = 1, numPoints = [4 2], coneSize = [3 3 0 0 0 0]
cones = [2 3 4 3 5 4], coneOrientations = [0 0 0 0 0 0]
vertexCoords = [-1.0 0.0 0.0 -1.0 0.0 1.0 1.0 0.0]
which would result in the DMPlex
4
/ | \
/ | \
/ | \
2 0 | 1 5
\ | /
\ | /
\ | /
3
Notice that all points are numbered consecutively, unlikely DMPlexCreateFromCellList()