Skip to content

Commit 2848895

Browse files
Fixed spelling error in Crank-Nicolson (no h) scheme thanks to (#485)
@mattfeldt
1 parent 1708ab2 commit 2848895

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

pySDC/implementations/sweeper_classes/Runge_Kutta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class BackwardEuler(RungeKutta):
477477
nodes, weights, matrix = generator.genCoeffs()
478478

479479

480-
class CrankNicholson(RungeKutta):
480+
class CrankNicolson(RungeKutta):
481481
"""
482482
Implicit Runge-Kutta method of second order, A-stable.
483483
"""

pySDC/playgrounds/Allen_Cahn/AllenCahn_contracting_circle_standard_integrators.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def run_imex_Euler(t0, dt, Tend):
112112
return err, radius, exact_radius
113113

114114

115-
def run_CrankNicholson(t0, dt, Tend):
115+
def run_CrankNicolson(t0, dt, Tend):
116116
"""
117117
Routine to run particular SDC variant
118118
@@ -202,8 +202,8 @@ def main_radius(cwd=''):
202202
radii['implicit-Euler'] = radius
203203
_, radius, exact_radius = run_imex_Euler(t0=t0, dt=dt, Tend=Tend)
204204
radii['imex-Euler'] = radius
205-
_, radius, exact_radius = run_CrankNicholson(t0=t0, dt=dt, Tend=Tend)
206-
radii['CrankNicholson'] = radius
205+
_, radius, exact_radius = run_CrankNicolson(t0=t0, dt=dt, Tend=Tend)
206+
radii['CrankNicolson'] = radius
207207

208208
xcoords = [t0 + i * dt for i in range(int((Tend - t0) / dt))]
209209
plot_radius(xcoords, exact_radius, radii)
@@ -219,8 +219,8 @@ def main_error(cwd=''):
219219
# errors['implicit-Euler'] = err
220220
# err, _, _ = run_imex_Euler(t0=t0, dt=0.001/512, Tend=Tend)
221221
# errors['imex-Euler'] = err
222-
err, _, _ = run_CrankNicholson(t0=t0, dt=0.001 / 64, Tend=Tend)
223-
errors['CrankNicholson'] = err
222+
err, _, _ = run_CrankNicolson(t0=t0, dt=0.001 / 64, Tend=Tend)
223+
errors['CrankNicolson'] = err
224224

225225

226226
if __name__ == "__main__":

pySDC/projects/DAE/sweepers/rungeKuttaDAE.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pySDC.implementations.sweeper_classes.Runge_Kutta import (
33
RungeKutta,
44
BackwardEuler,
5-
CrankNicholson,
5+
CrankNicolson,
66
EDIRK4,
77
DIRK43_2,
88
)
@@ -171,7 +171,7 @@ class BackwardEulerDAE(RungeKuttaDAE, BackwardEuler):
171171
pass
172172

173173

174-
class TrapezoidalRuleDAE(RungeKuttaDAE, CrankNicholson):
174+
class TrapezoidalRuleDAE(RungeKuttaDAE, CrankNicolson):
175175
pass
176176

177177

pySDC/tests/test_sweepers/test_Runge_Kutta_sweeper.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
SWEEPER_NAMES = [
44
'ForwardEuler',
55
'ExplicitMidpointMethod',
6-
'CrankNicholson',
6+
'CrankNicolson',
77
'BackwardEuler',
88
'ImplicitMidpointMethod',
99
'RK4',
@@ -135,7 +135,7 @@ def test_order(sweeper_name, useGPU=False):
135135
'ExplicitMidpointMethod': 3,
136136
'ImplicitMidpointMethod': 3,
137137
'RK4': 5,
138-
'CrankNicholson': 3,
138+
'CrankNicolson': 3,
139139
'Cash_Karp': 6,
140140
'EDIRK4': 5,
141141
'ESDIRK53': 6,
@@ -221,7 +221,7 @@ def test_stability(sweeper_name, useGPU=False):
221221
'ExplicitMidpointMethod': False,
222222
'ImplicitMidpointMethod': True,
223223
'RK4': False,
224-
'CrankNicholson': True,
224+
'CrankNicolson': True,
225225
'Cash_Karp': False,
226226
'EDIRK4': True,
227227
'ESDIRK53': True,
@@ -338,7 +338,7 @@ def test_sweeper_equivalence(sweeper_name, useGPU=False):
338338

339339

340340
@pytest.mark.cupy
341-
@pytest.mark.parametrize("sweeper_name", ['BackwardEuler', 'CrankNicholson'])
341+
@pytest.mark.parametrize("sweeper_name", ['BackwardEuler', 'CrankNicolson'])
342342
def test_RK_sweepers_equivalence_GPU(sweeper_name):
343343
test_sweeper_equivalence(sweeper_name, useGPU=True)
344344

@@ -357,5 +357,5 @@ def test_RK_sweepers_with_GPU(test_name, sweeper_name):
357357

358358
if __name__ == '__main__':
359359
# test_rhs_evals('ARK54')
360-
test_order('CrankNicholson')
360+
test_order('CrankNicolson')
361361
# test_order('ARK54')

0 commit comments

Comments
 (0)