1010from pySDC .implementations .sweeper_classes .multi_implicit import multi_implicit
1111from pySDC .implementations .problem_classes .GrayScott_MPIFFT import grayscott_imex_diffusion , grayscott_imex_linear , \
1212 grayscott_mi_diffusion , grayscott_mi_linear
13- # from pySDC.implementations.problem_classes.GrayScott_FFT import grayscott_imex_linear
1413from pySDC .implementations .transfer_classes .TransferMesh_MPIFFT import fft_to_fft
1514
1615
@@ -30,7 +29,7 @@ def run_simulation(spectral=None, splitting_type=None, ml=None, num_procs=None):
3029 # initialize level parameters
3130 level_params = dict ()
3231 level_params ['restol' ] = 1E-12
33- level_params ['dt' ] = 1E -00
32+ level_params ['dt' ] = 8E -00
3433 level_params ['nsweeps' ] = [1 ]
3534 level_params ['residual_type' ] = 'last_abs'
3635
@@ -57,12 +56,12 @@ def run_simulation(spectral=None, splitting_type=None, ml=None, num_procs=None):
5756 problem_params ['Dv' ] = 0.00001
5857 problem_params ['A' ] = 0.04
5958 problem_params ['B' ] = 0.1
60- problem_params ['newton_maxiter' ] = 100
59+ problem_params ['newton_maxiter' ] = 50
6160 problem_params ['newton_tol' ] = 1E-11
6261
6362 # initialize step parameters
6463 step_params = dict ()
65- step_params ['maxiter' ] = 500
64+ step_params ['maxiter' ] = 100
6665 step_params ['errtol' ] = 1E-09
6766
6867 # initialize controller parameters
@@ -95,7 +94,7 @@ def run_simulation(spectral=None, splitting_type=None, ml=None, num_procs=None):
9594
9695 # set time parameters
9796 t0 = 0.0
98- Tend = 4
97+ Tend = 32
9998
10099 f = None
101100 if rank == 0 :
@@ -127,21 +126,21 @@ def run_simulation(spectral=None, splitting_type=None, ml=None, num_procs=None):
127126 # call main function to get things done...
128127 uend , stats = controller .run (u0 = uinit , t0 = t0 , Tend = Tend )
129128
130- plt .figure ()
131- plt .imshow (P .fft .backward (uend [..., 0 ]))#, vmin=0, vmax=1)
132- # plt.imshow(np.fft.irfft2(uend.values[..., 0]))#, vmin=0, vmax=1)
133- plt .title ('u' )
134- plt .colorbar ()
135- plt .figure ()
136- plt .imshow (P .fft .backward (uend [..., 1 ]))#, vmin=0, vmax=1)
137- # plt.imshow(np.fft.irfft2(uend.values[..., 1]))#, vmin=0, vmax=1)
138- plt .title ('v' )
139- plt .colorbar ()
140129 # plt.figure()
141- # plt.imshow(uend[..., 0] + uend[..., 1])
142- # plt.title('sum')
130+ # plt.imshow(P.fft.backward(uend[..., 0]))#, vmin=0, vmax=1)
131+ # # plt.imshow(np.fft.irfft2(uend.values[..., 0]))#, vmin=0, vmax=1)
132+ # plt.title('u')
133+ # plt.colorbar()
134+ # plt.figure()
135+ # plt.imshow(P.fft.backward(uend[..., 1]))#, vmin=0, vmax=1)
136+ # # plt.imshow(np.fft.irfft2(uend.values[..., 1]))#, vmin=0, vmax=1)
137+ # plt.title('v')
143138 # plt.colorbar()
144- plt .show ()
139+ # # plt.figure()
140+ # # plt.imshow(uend[..., 0] + uend[..., 1])
141+ # # plt.title('sum')
142+ # # plt.colorbar()
143+ # plt.show()
145144 # # exit()
146145
147146 if rank == 0 :
@@ -185,14 +184,14 @@ def main():
185184 """
186185 # run_simulation(spectral=False, splitting_type='diffusion', ml=False, num_procs=1)
187186 # run_simulation(spectral=True, splitting_type='diffusion', ml=False, num_procs=1)
188- run_simulation (spectral = True , splitting_type = 'linear' , ml = False , num_procs = 1 )
187+ # run_simulation(spectral=True, splitting_type='linear', ml=False, num_procs=1)
189188 # run_simulation(spectral=False, splitting_type='diffusion', ml=True, num_procs=1)
190189 # run_simulation(spectral=True, splitting_type='diffusion', ml=True, num_procs=1)
191190 # run_simulation(spectral=False, splitting_type='diffusion', ml=True, num_procs=10)
192191 # run_simulation(spectral=True, splitting_type='diffusion', ml=True, num_procs=10)
193192
194193 # run_simulation(spectral=False, splitting_type='mi_diffusion', ml=False, num_procs=1)
195- # run_simulation(spectral=True, splitting_type='mi_diffusion', ml=False, num_procs=1)
194+ run_simulation (spectral = True , splitting_type = 'mi_diffusion' , ml = False , num_procs = 1 )
196195 # run_simulation(spectral=False, splitting_type='mi_linear', ml=False, num_procs=1)
197196 # run_simulation(spectral=True, splitting_type='mi_linear', ml=False, num_procs=1)
198197
0 commit comments