| 12
 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
 
 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSTHETA.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>TSTHETA</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
   <div id="version" align=right><b>petsc-3.14.5 2021-03-03</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.14.5 v3.14.5 docs/manualpages/TS/TSTHETA.html "><small>Report Typos and Errors</small></a></div>
<A NAME="TSTHETA"><H1>TSTHETA</H1></A>
DAE solver using the implicit Theta method 
<P>
<H3><FONT COLOR="#CC3333">Options Database</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ts_theta_theta <Theta> </B></TD><TD>- Location of stage (0<Theta<=1)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ts_theta_endpoint <flag> </B></TD><TD>- Use the endpoint (like Crank-Nicholson) instead of midpoint form of the Theta method
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ts_theta_initial_guess_extrapolate <flg> </B></TD><TD>- Extrapolate stage initial guess from previous solution (sometimes unstable)
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
<pre>
 -ts_type theta -ts_theta_theta 1.0 corresponds to backward Euler (<A HREF="../TS/TSBEULER.html#TSBEULER">TSBEULER</A>)
</pre>
<pre>
 -ts_type theta -ts_theta_theta 0.5 corresponds to the implicit midpoint rule
</pre>
<pre>
 -ts_type theta -ts_theta_theta 0.5 -ts_theta_endpoint corresponds to Crank-Nicholson (<A HREF="../TS/TSCN.html#TSCN">TSCN</A>)
</pre>
<P>
This method can be applied to DAE.
<P>
This method is cast as a 1-stage implicit Runge-Kutta method.
<P>
<PRE>
  Theta | Theta
  -------------
        |  1
</PRE>
<P>
For the default Theta=0.5, this is also known as the implicit midpoint rule.
<P>
<H3><FONT COLOR="#CC3333">When the endpoint variant is chosen, the method becomes a 2-stage method with first stage explicit</FONT></H3>
<P>
<PRE>
  0 | 0         0
  1 | 1-Theta   Theta
  -------------------
    | 1-Theta   Theta
</PRE>
<P>
For the default Theta=0.5, this is the trapezoid rule (also known as Crank-Nicolson, see <A HREF="../TS/TSCN.html#TSCN">TSCN</A>).
<P>
To apply a diagonally implicit RK method to DAE, the stage formula
<P>
<pre>
 Y_i = X + h sum_j a_ij Y'_j
</pre>
<P>
is interpreted as a formula for Y'_i in terms of Y_i and known values (Y'_j, j<i)
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
  <A HREF="../TS/TSCreate.html#TSCreate">TSCreate</A>(), <A HREF="../TS/TS.html#TS">TS</A>, <A HREF="../TS/TSSetType.html#TSSetType">TSSetType</A>(), <A HREF="../TS/TSCN.html#TSCN">TSCN</A>, <A HREF="../TS/TSBEULER.html#TSBEULER">TSBEULER</A>, <A HREF="../TS/TSThetaSetTheta.html#TSThetaSetTheta">TSThetaSetTheta</A>(), <A HREF="../TS/TSThetaSetEndpoint.html#TSThetaSetEndpoint">TSThetaSetEndpoint</A>()
<BR>
<P>
<P><B></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>beginner<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/ts/impls/implicit/theta/theta.c.html#TSTHETA">src/ts/impls/implicit/theta/theta.c</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/ts/tutorials/ex10.c.html">src/ts/tutorials/ex10.c.html</A><BR>
<A HREF="../../../src/ts/tutorials/ex14.c.html">src/ts/tutorials/ex14.c.html</A><BR>
<A HREF="../../../src/ts/tutorials/ex17.c.html">src/ts/tutorials/ex17.c.html</A><BR>
<A HREF="../../../src/ts/tutorials/ex31.c.html">src/ts/tutorials/ex31.c.html</A><BR>
<BR><A HREF="./index.html">Index of all TS 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>
 |