Coverage for pySDC/projects/Second_orderSDC/penningtrap_run_work_precision.py: 0%

3 statements  

« prev     ^ index     » next       coverage.py v7.6.7, created at 2024-11-16 14:51 +0000

1# This code checks if the "data" folder exists or not. 

2exec(open("check_data_folder.py").read()) 

3 

4from pySDC.projects.Second_orderSDC.penningtrap_Simulation import ComputeError 

5from pySDC.projects.Second_orderSDC.penningtrap_params import penningtrap_params 

6 

7if __name__ == '__main__': 

8 """ 

9 Work-precision implementation for the Second-order SDC 

10 All parameters are given in penningtrap_params 

11 Note: 

12 * time needs to be changed according to choosen axis 

13 * Tend fixed but it can be changed by defining Tend and include in it in ComputeError 

14 * To implement Velocity-Verlet scheme set VV=True like run_work_precision(VV=True) 

15 * RKN method can be removed by setting RKN=False like run_work_precision(RKN=False) 

16 * dt timestep can be changed here as well 

17 * Make sure dt_cont is setted manually to get suitable picture in work precision 

18 * it moves RKN and VV line left and right to get right position with SDC and Picard iterations 

19 """ 

20 controller_params, description = penningtrap_params() 

21 ## ============================================================================= 

22 ## dt-timestep and Tend can be changed here manually 

23 Tend = 128 * 0.015625 

24 description['level_params']['dt'] = 0.015625 * 2 

25 description['sweeper_params']['initial_guess'] = 'spread' #'random' 'zero', 'spread' 

26 ## ============================================================================= 

27 work_pre = ComputeError(controller_params, description, time_iter=3, Tend=Tend, K_iter=(1, 2, 3), axes=(2,)) 

28 work_pre.run_work_precision(RK=True)