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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatDuplicateOption.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatDuplicateOption</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.10.3 2018-12-18</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.10.3 v3.10.3 docs/manualpages/Mat/MatDuplicateOption.html "><small>Report Typos and Errors</small></a></div>
<A NAME="MatDuplicateOption"><H1>MatDuplicateOption</H1></A>
Indicates if a duplicated sparse matrix should have its numerical values copied over or just its nonzero structure.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
typedef enum {<A HREF="../Mat/MatDuplicateOption.html#MatDuplicateOption">MAT_DO_NOT_COPY_VALUES</A>,<A HREF="../Mat/MatDuplicateOption.html#MatDuplicateOption">MAT_COPY_VALUES</A>,<A HREF="../Mat/MatDuplicateOption.html#MatDuplicateOption">MAT_SHARE_NONZERO_PATTERN</A>} <A HREF="../Mat/MatDuplicateOption.html#MatDuplicateOption">MatDuplicateOption</A>;
</PRE>
<P>
Any additions/changes here MUST also be made in include/petsc/finclude/petscmat.h
<P>
<pre>
<A HREF="../Mat/MatDuplicateOption.html#MatDuplicateOption">MAT_DO_NOT_COPY_VALUES</A> - Create a matrix using the same nonzero pattern as the original matrix,
</pre>
<pre>
with zeros for the numerical values.
</pre>
<pre>
<A HREF="../Mat/MatDuplicateOption.html#MatDuplicateOption">MAT_COPY_VALUES</A> - Create a matrix with the same nonzero pattern as the original matrix
</pre>
<pre>
and with the same numerical values.
</pre>
<pre>
<A HREF="../Mat/MatDuplicateOption.html#MatDuplicateOption">MAT_SHARE_NONZERO_PATTERN</A> - Create a matrix that shares the nonzero structure with the previous matrix
</pre>
<pre>
and does not copy it, using zeros for the numerical values. The parent and
</pre>
<pre>
child matrices will share their index (i and j) arrays, and you cannot
</pre>
<pre>
insert new nonzero entries into either matrix.
</pre>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
Many matrix types (including SeqAIJ) do not support the <A HREF="../Mat/MatDuplicateOption.html#MatDuplicateOption">MAT_SHARE_NONZERO_PATTERN</A> optimization; in
this case the behavior is as if <A HREF="../Mat/MatDuplicateOption.html#MatDuplicateOption">MAT_DO_NOT_COPY_VALUES</A> has been specified.
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../Mat/MatDuplicate.html#MatDuplicate">MatDuplicate</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/mat/../../include/petscmat.h.html#MatDuplicateOption">src/mat/../../include/petscmat.h</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/mat/examples/tutorials/ex9.c.html">src/mat/examples/tutorials/ex9.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex5.c.html">src/ksp/ksp/examples/tutorials/ex5.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex42.c.html">src/ksp/ksp/examples/tutorials/ex42.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex58.c.html">src/ksp/ksp/examples/tutorials/ex58.c.html</A><BR>
<A HREF="../../../src/ts/examples/tutorials/ex3.c.html">src/ts/examples/tutorials/ex3.c.html</A><BR>
<A HREF="../../../src/ts/examples/tutorials/ex50.c.html">src/ts/examples/tutorials/ex50.c.html</A><BR>
<A HREF="../../../src/tao/unconstrained/examples/tutorials/spectraladjointassimilation.c.html">src/tao/unconstrained/examples/tutorials/spectraladjointassimilation.c.html</A><BR>
<A HREF="../../../src/tao/pde_constrained/examples/tutorials/elliptic.c.html">src/tao/pde_constrained/examples/tutorials/elliptic.c.html</A><BR>
<A HREF="../../../src/tao/pde_constrained/examples/tutorials/parabolic.c.html">src/tao/pde_constrained/examples/tutorials/parabolic.c.html</A><BR>
<A HREF="../../../src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html">src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html</A><BR>
<BR><A HREF="./index.html">Index of all Mat 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>
|