File: SNESLineSearchNoNorms.html

package info (click to toggle)
petsc 2.3.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 77,732 kB
  • ctags: 314,526
  • sloc: ansic: 254,277; python: 26,350; cpp: 18,257; fortran: 15,694; makefile: 11,000; sh: 3,638; xml: 620; csh: 211
file content (82 lines) | stat: -rw-r--r-- 4,550 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>SNESLineSearchNoNorms</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="SNESLineSearchNoNorms"><H1>SNESLineSearchNoNorms</H1></A>
This routine is not a line search at  all; it simply uses the full Newton step. This version does not even compute the norm of the function or search direction; this is intended only when you know the full step is fine and are not checking for convergence of the nonlinear iteration (for example, you are running always for a fixed number of Newton steps). 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
PetscErrorCode PETSCSNES_DLLEXPORT SNESLineSearchNoNorms(SNES snes,void *lsctx,Vec x,Vec f,Vec g,Vec y,Vec w,PetscReal fnorm,PetscReal *ynorm,PetscReal *gnorm,PetscTruth *flag)
</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>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>snes </B></TD><TD>- nonlinear context
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>lsctx </B></TD><TD>- optional context for line search (not used here)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD>- current iterate
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>f </B></TD><TD>- residual evaluated at x
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD>- search direction 
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>w </B></TD><TD>- work vector
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>fnorm </B></TD><TD>- 2-norm of f
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>g </B></TD><TD>- residual evaluated at new iterate y
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>w </B></TD><TD>- new iterate
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>gnorm </B></TD><TD>- not changed
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ynorm </B></TD><TD>- not changed
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>flag </B></TD><TD>- set to <A HREF="../Sys/PETSC_TRUE.html#PETSC_TRUE">PETSC_TRUE</A> indicating a successful line search
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Options Database Key</FONT></H3>
<DT><B>-snes_ls basicnonorms </B> -Activates <A HREF="../SNES/SNESLineSearchNoNorms.html#SNESLineSearchNoNorms">SNESLineSearchNoNorms</A>()
<br>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
<A HREF="../SNES/SNESLineSearchNoNorms.html#SNESLineSearchNoNorms">SNESLineSearchNoNorms</A>() must be used in conjunction with
either the options
<pre>
    -snes_no_convergence_test -snes_max_it &lt;its&gt;
</pre>
or alternatively a user-defined custom test set via
<A HREF="../SNES/SNESSetConvergenceTest.html#SNESSetConvergenceTest">SNESSetConvergenceTest</A>(); or a -snes_max_it of 1,
otherwise, the <A HREF="../SNES/SNES.html#SNES">SNES</A> solver will generate an error.
<P>
During the final iteration this will not evaluate the function at
the solution point. This is to save a function evaluation while
using pseudo-timestepping.
<P>
The residual norms printed by monitoring routines such as
<A HREF="../SNES/SNESDefaultMonitor.html#SNESDefaultMonitor">SNESDefaultMonitor</A>() (as activated via -snes_monitor) will not be
correct, since they are not computed.
<P>

<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
 <A HREF="../SNES/SNES.html#SNES">SNES</A>, nonlinear, line search, cubic
<BR>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../SNES/SNESLineSearchCubic.html#SNESLineSearchCubic">SNESLineSearchCubic</A>(), <A HREF="../SNES/SNESLineSearchQuadratic.html#SNESLineSearchQuadratic">SNESLineSearchQuadratic</A>(), 
<BR><A HREF="../SNES/SNESLineSearchSet.html#SNESLineSearchSet">SNESLineSearchSet</A>(), <A HREF="../SNES/SNESLineSearchNo.html#SNESLineSearchNo">SNESLineSearchNo</A>()
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>advanced
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/snes/impls/ls/ls.c.html#SNESLineSearchNoNorms">src/snes/impls/ls/ls.c</A>
<BR><A HREF="./index.html">Index of all SNES 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>