Coverage for pySDC/projects/Second_orderSDC/harmonic_oscillator_run_stability.py: 0%
2 statements
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-20 14:51 +0000
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-20 14:51 +0000
1from pySDC.projects.Second_orderSDC.harmonic_oscillator_params import get_default_harmonic_oscillator_description
2from pySDC.projects.Second_orderSDC.stability_simulation import StabilityImplementation
5if __name__ == '__main__':
6 """
7 To implement Stability region for the Harmonic Oscillator problem
8 Run for
9 SDC stability region: model_stab.run_SDC_stability()
10 Picard stability region: model_stab.run_Picard_stability()
11 Runge-Kutta-Nzström stability region: model_run_RKN_stability()
12 To implement spectral radius of iteration matrix
13 Run:
14 Iteration matrix of SDC method: model_stab.run_Ksdc()
15 Iteration matrix of Picard method: model_stab.run_Kpicard()
17 """
18 # This code checks if the "data" folder exists or not.
19 exec(open("check_data_folder.py").read())
20 # Execute the stability analysis for the damped harmonic oscillator
21 description = get_default_harmonic_oscillator_description()
22 # =============================================================================
23 # maxiter can be changed here manually. By default, maxiter is 50
24 description['step_params']['maxiter'] = 50
25 # =============================================================================
27 model_stab = StabilityImplementation(description, kappa_max=18, mu_max=18, Num_iter=(200, 200))
29 model_stab.run_SDC_stability()
30 model_stab.run_Picard_stability()
31 model_stab.run_RKN_stability()
32 model_stab.run_Ksdc()
33 # model_stab.run_Kpicard()