File: DMPlexCreateFromDAG.html

package info (click to toggle)
petsc 3.14.5%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 266,472 kB
  • sloc: ansic: 680,898; python: 33,303; cpp: 16,324; makefile: 14,022; f90: 13,731; javascript: 10,713; fortran: 9,581; sh: 1,373; xml: 619; objc: 445; csh: 192; pascal: 148; java: 13
file content (100 lines) | stat: -rw-r--r-- 4,861 bytes parent folder | download
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!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/DMPlexCreateFromDAG.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMPlexCreateFromDAG</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/DMPlexCreateFromDAG.html "><small>Report Typos and Errors</small></a></div>
<A NAME="DMPlexCreateFromDAG"><H1>DMPlexCreateFromDAG</H1></A>
This takes as input the adjacency-list representation of the Directed Acyclic Graph (Hasse Diagram) encoding a mesh, and produces a <A HREF="../DM/DM.html#DM">DM</A> 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscdmplex.h"   
#include "petscdmplex.h"   
<A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../DMPLEX/DMPlexCreateFromDAG.html#DMPlexCreateFromDAG">DMPlexCreateFromDAG</A>(<A HREF="../DM/DM.html#DM">DM</A> dm, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> depth, const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> numPoints[], const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> coneSize[], const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> cones[], const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> coneOrientations[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A> vertexCoords[])
</PRE>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dm </B></TD><TD>- The empty <A HREF="../DM/DM.html#DM">DM</A> object, usually from <A HREF="../DM/DMCreate.html#DMCreate">DMCreate</A>() and <A HREF="../DM/DMSetDimension.html#DMSetDimension">DMSetDimension</A>()
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>depth </B></TD><TD>- The depth of the DAG
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>numPoints </B></TD><TD>- Array of size depth + 1 containing the number of points at each depth
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>coneSize </B></TD><TD>- The cone size of each point
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cones </B></TD><TD>- The concatenation of the cone points for each point, the cone list must be oriented correctly for each point
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>coneOrientations </B></TD><TD>- The orientation of each cone point
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vertexCoords </B></TD><TD>- An array of numPoints[0]*spacedim numbers representing the coordinates of each vertex, with spacedim the value set via <A HREF="../DM/DMSetCoordinateDim.html#DMSetCoordinateDim">DMSetCoordinateDim</A>()
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dm </B></TD><TD>- The <A HREF="../DM/DM.html#DM">DM</A>
</TD></TR></TABLE>
<P>
Note: Two triangles sharing a face would have input
<pre>
 depth = 1, numPoints = [4 2], coneSize = [3 3 0 0 0 0]
</pre>
<pre>
 cones = [2 3 4  3 5 4], coneOrientations = [0 0 0  0 0 0]
</pre>
<pre>
vertexCoords = [-1.0 0.0  0.0 -1.0  0.0 1.0  1.0 0.0]
</pre>
<pre>
</pre>
which would result in the DMPlex
<pre>
</pre>
<pre>
       4
</pre>
<pre>
     / | \
</pre>
<pre>
    /  |  \
</pre>
<pre>
   /   |   \
</pre>
<pre>
  2  0 | 1  5
</pre>
<pre>
   \   |   /
</pre>
<pre>
    \  |  /
</pre>
<pre>
     \ | /
</pre>
<pre>
       3
</pre>
<pre>
</pre>
<pre>
Notice that all points are numbered consecutively, unlike <A HREF="../DMPLEX/DMPlexCreateFromCellListPetsc.html#DMPlexCreateFromCellListPetsc">DMPlexCreateFromCellListPetsc</A>()
</pre>
<P>

<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../DMPLEX/DMPlexCreateFromCellListPetsc.html#DMPlexCreateFromCellListPetsc">DMPlexCreateFromCellListPetsc</A>(), <A HREF="../DMPLEX/DMPlexCreate.html#DMPlexCreate">DMPlexCreate</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>advanced<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/dm/impls/plex/plexcreate.c.html#DMPlexCreateFromDAG">src/dm/impls/plex/plexcreate.c</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/dm/impls/plex/tutorials/ex3f90.F90.html">src/dm/impls/plex/tutorials/ex3f90.F90.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>