File: DMPlexSetClosurePermutationTensor.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 (86 lines) | stat: -rw-r--r-- 4,442 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
<!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/DMPlexSetClosurePermutationTensor.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMPlexSetClosurePermutationTensor</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/DMPlexSetClosurePermutationTensor.html "><small>Report Typos and Errors</small></a></div>
<A NAME="DMPlexSetClosurePermutationTensor"><H1>DMPlexSetClosurePermutationTensor</H1></A>
Create a permutation from the default (BFS) point ordering in the closure, to a lexicographic ordering over the tensor product cell (i.e., line, quad, hex, etc.), and set this permutation in the section provided (or the section of the <A HREF="../DM/DM.html#DM">DM</A>). 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscdmplex.h"   
<A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../DMPLEX/DMPlexSetClosurePermutationTensor.html#DMPlexSetClosurePermutationTensor">DMPlexSetClosurePermutationTensor</A>(<A HREF="../DM/DM.html#DM">DM</A> dm, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> point, <A HREF="../PetscSection/PetscSection.html#PetscSection">PetscSection</A> section)
</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 <A HREF="../DM/DM.html#DM">DM</A>
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>point   </B></TD><TD>- Either a cell (highest dim point) or an edge (dim 1 point), or <A HREF="../Sys/PETSC_DETERMINE.html#PETSC_DETERMINE">PETSC_DETERMINE</A>
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>section </B></TD><TD>- The <A HREF="../PetscSection/PetscSection.html#PetscSection">PetscSection</A> to reorder, or NULL for the default section
</TD></TR></TABLE>
<P>
Note: The point is used to determine the number of dofs/field on an edge. For SEM, this is related to the polynomial
degree of the basis.
<P>
<H3><FONT COLOR="#CC3333">Example</FONT></H3>
A typical interpolated single-quad mesh might order points as
<PRE>
  [c0, v1, v2, v3, v4, e5, e6, e7, e8]

  v4 -- e6 -- v3
  |           |
  e7    c0    e8
  |           |
  v1 -- e5 -- v2
</PRE>

<P>
(There is no significance to the ordering described here.)  The default section for a Q3 quad might typically assign
dofs in the order of points, e.g.,
<PRE>
    c0 -&gt; [0,1,2,3]
    v1 -&gt; [4]
    ...
    e5 -&gt; [8, 9]
</PRE>

<P>
which corresponds to the dofs
<PRE>
    6   10  11  7
    13  2   3   15
    12  0   1   14
    4   8   9   5
</PRE>

<P>
The closure in BFS ordering works through height strata (cells, edges, vertices) to produce the ordering
<PRE>
  0 1 2 3 8 9 14 15 11 10 13 12 4 5 7 6
</PRE>

<P>
After calling <A HREF="../DMPLEX/DMPlexSetClosurePermutationTensor.html#DMPlexSetClosurePermutationTensor">DMPlexSetClosurePermutationTensor</A>(), the closure will be ordered lexicographically,
<PRE>
   4 8 9 5 12 0 1 14 13 2 3 15 6 10 11 7
</PRE>

<P>

<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../DM/DMGetLocalSection.html#DMGetLocalSection">DMGetLocalSection</A>(), <A HREF="../PetscSection/PetscSectionSetClosurePermutation.html#PetscSectionSetClosurePermutation">PetscSectionSetClosurePermutation</A>(), <A HREF="../DM/DMSetGlobalSection.html#DMSetGlobalSection">DMSetGlobalSection</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>developer<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/dm/impls/plex/plex.c.html#DMPlexSetClosurePermutationTensor">src/dm/impls/plex/plex.c</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/dm/impls/plex/tutorials/ex6.c.html">src/dm/impls/plex/tutorials/ex6.c.html</A><BR>
<A HREF="../../../src/dm/impls/plex/tutorials/ex8.c.html">src/dm/impls/plex/tutorials/ex8.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>