Skip to content

Commit

Permalink
Added ARK3 method (#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
brownbaerchen authored Nov 7, 2024
1 parent 31a65ac commit 1936414
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pySDC/implementations/sweeper_classes/Runge_Kutta.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,26 @@ def get_update_order(cls):


class ARK2(RungeKuttaIMEX):
"""
Second order two stage singly diagonally implicit globally stiffly accurate IMEX RK method with explicit first stage.
Can be used to integrate simple DAEs because explicit and implicit part are both stiffly accurate.
"""

generator_IMP = RK_SCHEMES["ARK222EDIRK"]()
generator_EXP = RK_SCHEMES["ARK222ERK"]()

nodes, weights, matrix = generator_IMP.genCoeffs()
_, weights_explicit, matrix_explicit = generator_EXP.genCoeffs()


class ARK3(RungeKuttaIMEX):
"""
Third order four stage singly diagonally implicit globally stiffly accurate IMEX RK method with explicit first stage.
Can be used to integrate simple DAEs because explicit and implicit part are both stiffly accurate.
"""

generator_IMP = RK_SCHEMES["ARK443ESDIRK"]()
generator_EXP = RK_SCHEMES["ARK443ERK"]()

nodes, weights, matrix = generator_IMP.genCoeffs()
_, weights_explicit, matrix_explicit = generator_EXP.genCoeffs()
2 changes: 2 additions & 0 deletions pySDC/tests/test_sweepers/test_Runge_Kutta_sweeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'IMEXEuler',
'ARK32',
'ARK2',
'ARK3',
]


Expand Down Expand Up @@ -168,6 +169,7 @@ def test_order(sweeper_name, useGPU=False):
'ARK548L2SA': 6,
'IMEXEuler': 2,
'ARK2': 3,
'ARK3': 4,
'ARK32': 4,
'ARK324L2SAERK': 4,
'ARK324L2SAESDIRK': 4,
Expand Down

0 comments on commit 1936414

Please sign in to comment.