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
|
<!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/DMSetDefaultConstraints.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMSetDefaultConstraints</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.7.5 2017-01-01</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.7.5 v3.7.5 docs/manualpages/DM/DMSetDefaultConstraints.html "><small>Report Typos and Errors</small></a></div>
<A NAME="DMSetDefaultConstraints"><H1>DMSetDefaultConstraints</H1></A>
Set the <A HREF="../IS/PetscSection.html#PetscSection">PetscSection</A> and <A HREF="../Mat/Mat.html#Mat">Mat</A> the specify the local constraint interpolation.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscdm.h"
#include "petscdmlabel.h"
PetscErrorCode DMSetDefaultConstraints(DM dm, PetscSection section, Mat mat)
</PRE>
If a constraint matrix is specified, then it is applied during <A HREF="../DM/DMGlobalToLocalEnd.html#DMGlobalToLocalEnd">DMGlobalToLocalEnd</A>() when mode is <A HREF="../Sys/INSERT_VALUES.html#INSERT_VALUES">INSERT_VALUES</A>, INSERT_BC_VALUES, or INSERT_ALL_VALUES. Without a constraint matrix, the local vector l returned by <A HREF="../DM/DMGlobalToLocalEnd.html#DMGlobalToLocalEnd">DMGlobalToLocalEnd</A>() contains values that have been scattered from a global vector without modification; with a constraint matrix A, l is modified by computing c = A * l, l[s[i]] = c[i], where the scatter s is defined by the <A HREF="../IS/PetscSection.html#PetscSection">PetscSection</A> returned by DMGetDefaultConstraintMatrix().
<P>
If a constraint matrix is specified, then its adjoint is applied during <A HREF="../DM/DMLocalToGlobalBegin.html#DMLocalToGlobalBegin">DMLocalToGlobalBegin</A>() when mode is <A HREF="../Sys/ADD_VALUES.html#ADD_VALUES">ADD_VALUES</A>, ADD_BC_VALUES, or ADD_ALL_VALUES. Without a constraint matrix, the local vector l is accumulated into a global vector without modification; with a constraint matrix A, l is first modified by computing c[i] = l[s[i]], l[s[i]] = 0, l = l + A'*c, which is the adjoint of the operation described above.
<P>
collective on dm
<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>
+ section - The <A HREF="../IS/PetscSection.html#PetscSection">PetscSection</A> describing the range of the constraint matrix: relates rows of the constraint matrix to dofs of the default section. Must have a local communicator (<A HREF="../Sys/PETSC_COMM_SELF.html#PETSC_COMM_SELF">PETSC_COMM_SELF</A> or derivative).
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>mat </B></TD><TD>- The <A HREF="../Mat/Mat.html#Mat">Mat</A> that interpolates local constraints: its width should be the layout size of the default section: NULL indicates no constraints. Must have a local communicator (<A HREF="../Sys/PETSC_COMM_SELF.html#PETSC_COMM_SELF">PETSC_COMM_SELF</A> or derivative).
</TD></TR></TABLE>
<P>
<P>
Note: This increments the references of the <A HREF="../IS/PetscSection.html#PetscSection">PetscSection</A> and the <A HREF="../Mat/Mat.html#Mat">Mat</A>, so they user can destroy them
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../DM/DMGetDefaultConstraints.html#DMGetDefaultConstraints">DMGetDefaultConstraints</A>()
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>advanced
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/dm/interface/dm.c.html#DMSetDefaultConstraints">src/dm/interface/dm.c</A>
<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>
|