Skip to content

Commit

Permalink
Added ARK3(2) method
Browse files Browse the repository at this point in the history
  • Loading branch information
brownbaerchen committed Aug 8, 2024
1 parent 84b0aeb commit 5d4b720
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion qmat/qcoeff/butcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,4 +775,58 @@ class ARK548L2SAERK2(ARK548L2SAESDIRK2):
A[7, 4] = 4151782504231.0 / 36106512998704.0
A[7, 5] = 572599549169.0 / 6265429158920.0
A[7, 6] = -457874356192.0 / 11306498036315.0
A[1, 0] = ARK548L2SAESDIRK2.c[1]
A[1, 0] = ARK548L2SAESDIRK2.c[1]


@registerRK
class ARK324L2SAERK(RK):
"""
Explicit part of embedded additive Runge-Kutta pair of orders 3 and 2. See https://doi.org/10.1016/S0168-9274(02)00138-1
"""
A = np.zeros((4, 4))
A[1, 0] = 1767732205903./2027836641118.
A[2, 0] = 5535828885825./10492691773637.
A[2, 1] = 788022342437./10882634858940.
A[3, 0] = 6485989280629./16251701735622.
A[3, 1] = -4246266847089./9704473918619.
A[3, 2] = 10755448449292./10357097424841.

b = np.zeros(4)
b[0] = 1471266399579./7840856788654.
b[1] = -4482444167858./7529755066697.
b[2] = 11266239266428./11593286722821.
b[3] = 1767732205903./4055673282236.

b2 = np.zeros(4)
b2[0] = 2756255671327./12835298489170.
b2[1] = -10771552573575./22201958757719.
b2[2] = 9247589265047./10645013368117.
b2[3] = 2193209047091./5459859503100.

c = np.zeros(4)
c[1] = 1767732205903./2027836641118.
c[2] = 3./5.
c[3] = 1.


@property
def order(self): return 3


@registerRK
class ARK324L2SAESDIRKA(ARK324L2SAERK):
"""
Implicit part of embedded additive Runge-Kutta pair of orders 3 and 2. See https://doi.org/10.1016/S0168-9274(02)00138-1
"""
A = np.zeros((4, 4), dtype=float)
A[1, 0] = 1767732205903./4055673282236.
A[1, 1] = 1767732205903./4055673282236.
A[2, 0] = 2746238789719./10658868560708.
A[2, 1] = -640167445237./6845629431997.
A[2, 2] = 1767732205903./4055673282236.
A[3, 0] = 1471266399579./7840856788654.
A[3, 1] = -4482444167858./7529755066697.
A[3, 2] = 11266239266428./11593286722821.
A[3, 3] = 1767732205903./4055673282236.

CONV_TEST_NSTEPS = [120, 100, 80]

0 comments on commit 5d4b720

Please sign in to comment.