1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexStratify.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMPlexStratify</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.14.5 2021-03-03</b></div>
<div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.14.5 v3.14.5 docs/manualpages/DMPLEX/DMPlexStratify.html "><small>Report Typos and Errors</small></a></div>
<A NAME="DMPlexStratify"><H1>DMPlexStratify</H1></A>
The DAG for most topologies is a graded poset (https://en.wikipedia.org/wiki/Graded_poset), and can be illustrated by a Hasse Diagram (https://en.wikipedia.org/wiki/Hasse_diagram). The strata group all points of the same grade, and this function calculates the strata. This grade can be seen as the height (or depth) of the point in the DAG.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscdmplex.h"
<A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../DMPLEX/DMPlexStratify.html#DMPlexStratify">DMPlexStratify</A>(<A HREF="../DM/DM.html#DM">DM</A> dm)
</PRE>
Collective on dm
<P>
<H3><FONT COLOR="#CC3333">Input Parameter</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mesh </B></TD><TD>- The DMPlex
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
Concretely, <A HREF="../DMPLEX/DMPlexStratify.html#DMPlexStratify">DMPlexStratify</A>() creates a new label named "depth" containing the depth in the DAG of each point. For cell-vertex
meshes, vertices are depth 0 and cells are depth 1. For fully interpolated meshes, depth 0 for vertices, 1 for edges, and so on
until cells have depth equal to the dimension of the mesh. The depth label can be accessed through <A HREF="../DMPLEX/DMPlexGetDepthLabel.html#DMPlexGetDepthLabel">DMPlexGetDepthLabel</A>() or <A HREF="../DMPLEX/DMPlexGetDepthStratum.html#DMPlexGetDepthStratum">DMPlexGetDepthStratum</A>(), or
manually via <A HREF="../DM/DMGetLabel.html#DMGetLabel">DMGetLabel</A>(). The height is defined implicitly by height = maxDimension - depth, and can be accessed
via <A HREF="../DMPLEX/DMPlexGetHeightStratum.html#DMPlexGetHeightStratum">DMPlexGetHeightStratum</A>(). For example, cells have height 0 and faces have height 1.
<P>
The depth of a point is calculated by executing a breadth-first search (BFS) on the DAG. This could produce surprising results
if run on a partially interpolated mesh, meaning one that had some edges and faces, but not others. For example, suppose that
we had a mesh consisting of one triangle (c0) and three vertices (v0, v1, v2), and only one edge is on the boundary so we choose
to interpolate only that one (e0), so that
<pre>
cone(c0) = {e0, v2}
</pre>
<pre>
cone(e0) = {v0, v1}
</pre>
If <A HREF="../DMPLEX/DMPlexStratify.html#DMPlexStratify">DMPlexStratify</A>() is run on this mesh, it will give depths
<pre>
depth 0 = {v0, v1, v2}
</pre>
<pre>
depth 1 = {e0, c0}
</pre>
where the triangle has been given depth 1, instead of 2, because it is reachable from vertex v2.
<P>
<A HREF="../DMPLEX/DMPlexStratify.html#DMPlexStratify">DMPlexStratify</A>() should be called after all calls to <A HREF="../DMPLEX/DMPlexSymmetrize.html#DMPlexSymmetrize">DMPlexSymmetrize</A>()
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../DMPLEX/DMPlexCreate.html#DMPlexCreate">DMPlexCreate</A>(), <A HREF="../DMPLEX/DMPlexSymmetrize.html#DMPlexSymmetrize">DMPlexSymmetrize</A>(), <A HREF="../DMPLEX/DMPlexComputeCellTypes.html#DMPlexComputeCellTypes">DMPlexComputeCellTypes</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>beginner<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/dm/impls/plex/plex.c.html#DMPlexStratify">src/dm/impls/plex/plex.c</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/ts/tutorials/ex11.c.html">src/ts/tutorials/ex11.c.html</A><BR>
<BR><A HREF="./index.html">Index of all DMPLEX routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|