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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatCreateSNESMF</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="MatCreateSNESMF"><H1>MatCreateSNESMF</H1></A>
Creates a matrix-free matrix context for use with a <A HREF="../SNES/SNES.html#SNES">SNES</A> solver. This matrix can be used as the Jacobian argument for the routine <A HREF="../SNES/SNESSetJacobian.html#SNESSetJacobian">SNESSetJacobian</A>(). See <A HREF="../Mat/MatCreateMFFD.html#MatCreateMFFD">MatCreateMFFD</A>() for details on how the finite difference computation is done.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscsnes.h"
PetscErrorCode PETSCSNES_DLLEXPORT MatCreateSNESMF(SNES snes,Mat *J)
</PRE>
Collective on <A HREF="../SNES/SNES.html#SNES">SNES</A> and <A HREF="../Vec/Vec.html#Vec">Vec</A>
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<DT><B>snes </B> -the <A HREF="../SNES/SNES.html#SNES">SNES</A> context
<br>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<DT><B>J </B> -the matrix-free matrix
<br>
<P>
<P>
<H3><FONT COLOR="#CC3333">Warning</FONT></H3>
If <A HREF="../Mat/MatMFFDSetBase.html#MatMFFDSetBase">MatMFFDSetBase</A>() is ever called on jac then this routine will NO longer get
the x from the <A HREF="../SNES/SNES.html#SNES">SNES</A> object and <A HREF="../Mat/MatMFFDSetBase.html#MatMFFDSetBase">MatMFFDSetBase</A>() must from that point on be used to
change the base vector x.
<P>
Notes: The difference between this routine and <A HREF="../Mat/MatCreateMFFD.html#MatCreateMFFD">MatCreateMFFD</A>() is that this matrix
automatically gets the current base vector from the <A HREF="../SNES/SNES.html#SNES">SNES</A> object and not from an
explicit call to <A HREF="../Mat/MatMFFDSetBase.html#MatMFFDSetBase">MatMFFDSetBase</A>().
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../Mat/MatDestroy.html#MatDestroy">MatDestroy</A>(), <A HREF="../Mat/MatMFFDSetFunctionError.html#MatMFFDSetFunctionError">MatMFFDSetFunctionError</A>(), MatMFFDDefaultSetUmin()
<BR><A HREF="../Mat/MatMFFDSetHHistory.html#MatMFFDSetHHistory">MatMFFDSetHHistory</A>(), <A HREF="../Mat/MatMFFDResetHHistory.html#MatMFFDResetHHistory">MatMFFDResetHHistory</A>(), <A HREF="../Mat/MatCreateMFFD.html#MatCreateMFFD">MatCreateMFFD</A>(),
<A HREF="../Mat/MatMFFDGetH.html#MatMFFDGetH">MatMFFDGetH</A>(),MatMFFDKSPMonitor(), <A HREF="../Mat/MatMFFDRegisterDynamic.html#MatMFFDRegisterDynamic">MatMFFDRegisterDynamic</A>), <A HREF="../Mat/MatMFFDComputeJacobian.html#MatMFFDComputeJacobian">MatMFFDComputeJacobian</A>()
<P>
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>advanced
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/snes/mf/snesmfj.c.html#MatCreateSNESMF">src/snes/mf/snesmfj.c</A>
<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>
|