Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions qmat/qcoeff/butcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ class ARK222EDIRK(RK):
@property
def order(self): return 2


@registerRK
class ARK222ERK(ARK222EDIRK):
"""
Expand All @@ -865,3 +866,39 @@ class ARK222ERK(ARK222EDIRK):
[ARK222EDIRK.gamma, 0 , 0],
[ARK222EDIRK.delta, 1-ARK222EDIRK.delta, 0]])
b = A[-1, :]


@registerRK
class ARK443ESDIRK(RK):
"""
3rd-order 4-stage ESDIRK scheme [Ascher 1997 sec 2.8]
Use as implicit part for ARK scheme in combination with ARK443ERK.
"""

c = np.array([0, 1/2, 2/3, 1/2, 1])

A = np.array([[0, 0 , 0 , 0 , 0 ],
[0, 1/2, 0 , 0 , 0 ],
[0, 1/6, 1/2, 0 , 0 ],
[0, -1/2, 1/2, 1/2, 0 ],
[0, 3/2, -3/2, 1/2, 1/2]])


b = A[-1, :]

@property
def order(self): return 3


@registerRK
class ARK443ERK(ARK443ESDIRK):
"""
3rd-order 4-stage ERK scheme [Ascher 1997 sec 2.8]
Use as explicit part for ARK scheme in combination with ARK443ESDIRK.
"""
A = np.array([[ 0 , 0 , 0 , 0 , 0],
[ 1/2 , 0 , 0 , 0 , 0],
[11/18, 1/18, 0 , 0 , 0],
[ 5/6 , -5/6 , 1/2, 0 , 0],
[ 1/4 , 7/4 , 3/4, -7/4, 0]])
b = A[-1, :]
Loading