Skip to content

Commit a810d88

Browse files
TB: added ARK3(2) method (#9)
* Added ARK3(2) method * Fixed typos
1 parent 84b0aeb commit a810d88

1 file changed

Lines changed: 54 additions & 1 deletion

File tree

qmat/qcoeff/butcher.py

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,4 +775,57 @@ class ARK548L2SAERK2(ARK548L2SAESDIRK2):
775775
A[7, 4] = 4151782504231.0 / 36106512998704.0
776776
A[7, 5] = 572599549169.0 / 6265429158920.0
777777
A[7, 6] = -457874356192.0 / 11306498036315.0
778-
A[1, 0] = ARK548L2SAESDIRK2.c[1]
778+
A[1, 0] = ARK548L2SAESDIRK2.c[1]
779+
780+
781+
@registerRK
782+
class ARK324L2SAERK(RK):
783+
"""
784+
Explicit part of embedded additive Runge-Kutta pair of orders 3 and 2. See https://doi.org/10.1016/S0168-9274(02)00138-1
785+
"""
786+
A = np.zeros((4, 4))
787+
A[1, 0] = 1767732205903./2027836641118.
788+
A[2, 0] = 5535828885825./10492691773637.
789+
A[2, 1] = 788022342437./10882634858940.
790+
A[3, 0] = 6485989280629./16251701735622.
791+
A[3, 1] = -4246266847089./9704473918619.
792+
A[3, 2] = 10755448449292./10357097424841.
793+
794+
b = np.zeros(4)
795+
b[0] = 1471266399579./7840856788654.
796+
b[1] = -4482444167858./7529755066697.
797+
b[2] = 11266239266428./11593286722821.
798+
b[3] = 1767732205903./4055673282236.
799+
800+
b2 = np.zeros(4)
801+
b2[0] = 2756255671327./12835298489170.
802+
b2[1] = -10771552573575./22201958757719.
803+
b2[2] = 9247589265047./10645013368117.
804+
b2[3] = 2193209047091./5459859503100.
805+
806+
c = np.zeros(4)
807+
c[1] = 1767732205903./2027836641118.
808+
c[2] = 3./5.
809+
c[3] = 1.
810+
811+
@property
812+
def order(self): return 3
813+
814+
815+
@registerRK
816+
class ARK324L2SAESDIRK(ARK324L2SAERK):
817+
"""
818+
Implicit part of embedded additive Runge-Kutta pair of orders 3 and 2. See https://doi.org/10.1016/S0168-9274(02)00138-1
819+
"""
820+
A = np.zeros((4, 4), dtype=float)
821+
A[1, 0] = 1767732205903./4055673282236.
822+
A[1, 1] = 1767732205903./4055673282236.
823+
A[2, 0] = 2746238789719./10658868560708.
824+
A[2, 1] = -640167445237./6845629431997.
825+
A[2, 2] = 1767732205903./4055673282236.
826+
A[3, 0] = 1471266399579./7840856788654.
827+
A[3, 1] = -4482444167858./7529755066697.
828+
A[3, 2] = 11266239266428./11593286722821.
829+
A[3, 3] = 1767732205903./4055673282236.
830+
831+
CONV_TEST_NSTEPS = [120, 100, 80]

0 commit comments

Comments
 (0)