Skip to content

Commit

Permalink
Add examples for downwind RK methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
ketch committed Feb 20, 2015
1 parent f37d342 commit c4046e8
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions nodepy/downwind_runge_kutta_method.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
"""
Class for Downwind Runge-Kutta methods, and various functions related to them.
AUTHOR: David Ketcheson (03-10-2010)
**Examples**::
>>> from nodepy import downwind_runge_kutta_method as dwrk
* Load a method::
>>> dw2 = dwrk.opt_dwrk(8)
>>> print dw2 # doctest: +NORMALIZE_WHITESPACE
downwind Runge-Kutta Method
<BLANKLINE>
0.750 | 2.875 | 2.125
0.875 | 3.000 | 2.125
_______|_________________________________
| 3.000 0.125 | 2.125
* Check some of its properties::
>>> dw2.order()
2
>>> dw2.absolute_monotonicity_radius()
7.999999999992724
EXAMPLES:
REFERENCES:
[higueras2005]_
Expand Down Expand Up @@ -165,14 +184,6 @@ def is_absolutely_monotonic(self,r,tol):

#================================================================

def loadDWRK(which='All'):
r"""
Load some particular DWRK method.
"""
DWRK={}
if which=='All': return TSRK
else: return TSRK[which]

def opt_dwrk(r):
#a11=(r**2-2*r-2)/(2.*r)
at12=(r**2-4*r+2)/(2*r)
Expand Down

0 comments on commit c4046e8

Please sign in to comment.