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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>DMMGSetSNESLocal</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="DMMGSetSNESLocal"><H1>DMMGSetSNESLocal</H1></A>
Sets the local user function that defines the nonlinear set of equations that will use the grid hierarchy and (optionally) its derivative. Collective on <A HREF="../DA/DMMG.html#DMMG">DMMG</A>
<P>
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
PetscErrorCode DMMGSetSNESLocal(DMMG *dmmg,DALocalFunction1 function, DALocalFunction1 jacobian,
DALocalFunction1 ad_function, DALocalFunction1 admf_function);
</PRE>
<H3><FONT COLOR="#CC3333">Input Parameter</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dmmg </B></TD><TD>- the context
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>function </B></TD><TD>- the function that defines the nonlinear system
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>jacobian </B></TD><TD>- function defines the local part of the Jacobian
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ad_function </B></TD><TD>- the name of the function with an ad_ prefix. This is ignored if ADIC is
not installed
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>admf_function </B></TD><TD>- the name of the function with an ad_ prefix. This is ignored if ADIC is
not installed
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Options Database Keys</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-dmmg_snes_monitor</B></TD><TD>- . -dmmg_jacobian_fd
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-dmmg_jacobian_ad</B></TD><TD>- . -dmmg_jacobian_mf_fd_operator
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-dmmg_jacobian_mf_fd</B></TD><TD>- . -dmmg_jacobian_mf_ad_operator
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-dmmg_jacobian_mf_ad</B></TD><TD>- - -dmmg_jacobian_period <p> - Indicates how often in the <A HREF="../SNES/SNES.html#SNES">SNES</A> solve the Jacobian is recomputed (on all levels)
as suggested by Florin Dobrian if p is -1 then Jacobian is computed only on first
<A HREF="../SNES/SNES.html#SNES">SNES</A> iteration (i.e. -1 is equivalent to infinity)
</TD></TR>
<P>
<P>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
If ADIC or ADIFOR have been installed, this routine can use ADIC or ADIFOR to compute
the derivative; however, that function cannot call other functions except those in
standard C math libraries.
<P>
If ADIC/ADIFOR have not been installed and the Jacobian is not provided, this routine
uses finite differencing to approximate the Jacobian.
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../DA/DMMGCreate.html#DMMGCreate">DMMGCreate</A>(), <A HREF="../DA/DMMGDestroy.html#DMMGDestroy">DMMGDestroy</A>, <A HREF="../DA/DMMGSetKSP.html#DMMGSetKSP">DMMGSetKSP</A>(), <A HREF="../DA/DMMGSetSNES.html#DMMGSetSNES">DMMGSetSNES</A>()
<BR>
<P>
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/snes/utils/damgsnes.c.html#DMMGSetSNESLocal">src/snes/utils/damgsnes.c</A>
<BR><A HREF="./index.html">Index of all DA 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>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/snes/examples/tutorials/ex19.c.html">src/snes/examples/tutorials/ex19.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex25.c.html">src/snes/examples/tutorials/ex25.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex27.c.html">src/snes/examples/tutorials/ex27.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex29.c.html">src/snes/examples/tutorials/ex29.c.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex30.c.html">src/snes/examples/tutorials/ex30.c.html</A><BR>
</BODY></HTML>
|