File: DMProjectBdFieldLabelLocal.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 (125 lines) | stat: -rw-r--r-- 10,763 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMProjectBdFieldLabelLocal.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMProjectBdFieldLabelLocal</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/DM/DMProjectBdFieldLabelLocal.html "><small>Report Typos and Errors</small></a></div>
<A NAME="DMProjectBdFieldLabelLocal"><H1>DMProjectBdFieldLabelLocal</H1></A>
This projects the given function of the input fields into the function space provided, putting the coefficients in a local vector, calculating only over the portion of the domain boundary specified by the label. 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
<A HREF="../Sys/PetscErrorCode.html#PetscErrorCode">PetscErrorCode</A> <A HREF="../DM/DMProjectBdFieldLabelLocal.html#DMProjectBdFieldLabelLocal">DMProjectBdFieldLabelLocal</A>(<A HREF="../DM/DM.html#DM">DM</A> dm, <A HREF="../Sys/PetscReal.html#PetscReal">PetscReal</A> time, <A HREF="../DM/DMLabel.html#DMLabel">DMLabel</A> label, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> numIds, const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> ids[], <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> Nc, const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> comps[], <A HREF="../Vec/Vec.html#Vec">Vec</A> localU,
                                          void (**funcs)(<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A>, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A>, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A>,
                                                         const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A>[], const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A>[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A>[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A>[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A>[],
                                                         const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A>[], const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A>[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A>[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A>[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A>[],
                                                         <A HREF="../Sys/PetscReal.html#PetscReal">PetscReal</A>, const <A HREF="../Sys/PetscReal.html#PetscReal">PetscReal</A>[], const <A HREF="../Sys/PetscReal.html#PetscReal">PetscReal</A>[], <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A>, const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A>[], <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A>[]),
                                          <A HREF="../Sys/InsertMode.html#InsertMode">InsertMode</A> mode, <A HREF="../Vec/Vec.html#Vec">Vec</A> localX)
</PRE>
Not collective
<P>
<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>time    </B></TD><TD>- The time
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>label   </B></TD><TD>- The <A HREF="../DM/DMLabel.html#DMLabel">DMLabel</A> marking the portion of the domain boundary to output
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>numIds  </B></TD><TD>- The number of label ids to use
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ids     </B></TD><TD>- The label ids to use for marking
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Nc      </B></TD><TD>- The number of components to set in the output, or <A HREF="../Sys/PETSC_DETERMINE.html#PETSC_DETERMINE">PETSC_DETERMINE</A> for all components
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>comps   </B></TD><TD>- The components to set in the output, or NULL for all components
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>localU  </B></TD><TD>- The input field vector
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>funcs   </B></TD><TD>- The functions to evaluate, one per field
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mode    </B></TD><TD>- The insertion mode for values
</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>localX  </B></TD><TD>- The output vector
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Calling sequence of func</FONT></H3>
<pre>
   func(<A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> dim, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> Nf, <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> NfAux,
</pre>
<pre>
        const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> uOff[], const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> uOff_x[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A> u[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A> u_t[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A> u_x[],
</pre>
<pre>
        const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> aOff[], const <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> aOff_x[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A> a[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A> a_t[], const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A> a_x[],
</pre>
<pre>
        <A HREF="../Sys/PetscReal.html#PetscReal">PetscReal</A> t, const <A HREF="../Sys/PetscReal.html#PetscReal">PetscReal</A> x[], <A HREF="../Sys/PetscInt.html#PetscInt">PetscInt</A> numConstants, const <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A> constants[], <A HREF="../Sys/PetscScalar.html#PetscScalar">PetscScalar</A> f[]);
</pre>
<P>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dim          </B></TD><TD>- The spatial dimension
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>Nf           </B></TD><TD>- The number of input fields
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>NfAux        </B></TD><TD>- The number of input auxiliary fields
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>uOff         </B></TD><TD>- The offset of each field in u[]
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>uOff_x       </B></TD><TD>- The offset of each field in u_x[]
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>u            </B></TD><TD>- The field values at this point in space
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>u_t          </B></TD><TD>- The field time derivative at this point in space (or NULL)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>u_x          </B></TD><TD>- The field derivatives at this point in space
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>aOff         </B></TD><TD>- The offset of each auxiliary field in u[]
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>aOff_x       </B></TD><TD>- The offset of each auxiliary field in u_x[]
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a            </B></TD><TD>- The auxiliary field values at this point in space
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a_t          </B></TD><TD>- The auxiliary field time derivative at this point in space (or NULL)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>a_x          </B></TD><TD>- The auxiliary field derivatives at this point in space
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>t            </B></TD><TD>- The current time
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x            </B></TD><TD>- The coordinates of this point
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>n            </B></TD><TD>- The face normal
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>numConstants </B></TD><TD>- The number of constants
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>constants    </B></TD><TD>- The value of each constant
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f            </B></TD><TD>- The value of the function at this point in space
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Note</FONT></H3>
There are three different DMs that potentially interact in this function. The output <A HREF="../DM/DM.html#DM">DM</A>, dm, specifies the layout of the values calculates by funcs.
The input <A HREF="../DM/DM.html#DM">DM</A>, attached to U, may be different. For example, you can input the solution over the full domain, but output over a piece of the boundary, or
a subdomain. You can also output a different number of fields than the input, with different discretizations. Last the auxiliary <A HREF="../DM/DM.html#DM">DM</A>, attached to the
auxiliary field vector, which is attached to dm, can also be different. It can have a different topology, number of fields, and discretizations.
<P>

<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../KSP/DMProjectField.html#DMProjectField">DMProjectField</A>(), <A HREF="../DM/DMProjectFieldLabelLocal.html#DMProjectFieldLabelLocal">DMProjectFieldLabelLocal</A>(), <A HREF="../DM/DMProjectFunction.html#DMProjectFunction">DMProjectFunction</A>(), <A HREF="../DM/DMComputeL2Diff.html#DMComputeL2Diff">DMComputeL2Diff</A>()
<BR><P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>intermediate<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/dm/interface/dm.c.html#DMProjectBdFieldLabelLocal">src/dm/interface/dm.c</A>
<P><H3><FONT COLOR="CC3333">Implementations</FONT></H3>src/dm/impls/plex/plexproject.c:885:PetscErrorCode DMProjectBdFieldLabelLocal_Plex(DM dm, PetscReal time, DMLabel label, PetscInt numIds, const PetscInt ids[], PetscInt Ncc, const PetscInt comps[], Vec localU,
<BR><A HREF="./index.html">Index of all DM 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>