From ad9c0a3268fc8d4d240e9146640c0752031c09c9 Mon Sep 17 00:00:00 2001 From: Michael Fleck Date: Wed, 15 Sep 2021 19:46:42 +0200 Subject: [PATCH 1/4] Changed parameter set. --- .../problem_classes/AllenCahn_Temp_MPIFFT.py | 8 ++++---- .../AllenCahn_Bayreuth/run_temp_forcing_benchmark.py | 6 +++--- .../AllenCahn_Bayreuth/run_temp_forcing_reference.py | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py b/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py index d01fd83d2e..6cb7ec1d33 100644 --- a/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py +++ b/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py @@ -122,7 +122,7 @@ def eval_f(self, u, t): f.expl[..., 0] = self.fft.forward(tmpf) f.impl[..., 1] = -self.params.D * self.K2 * u[..., 1] - f.expl[..., 1] = -f.impl[..., 0] - f.expl[..., 0] + f.expl[..., 1] = + f.impl[..., 0] + f.expl[..., 0] else: @@ -138,7 +138,7 @@ def eval_f(self, u, t): u_hat = self.fft.forward(u[..., 1]) lap_u_hat = -self.params.D * self.K2 * u_hat f.impl[..., 1] = self.fft.backward(lap_u_hat, f.impl[..., 1]) - f.expl[..., 1] = -f.impl[..., 0] - f.expl[..., 0] + f.expl[..., 1] = + f.impl[..., 0] + f.expl[..., 0] return f @@ -225,10 +225,10 @@ def circle_rand(): def sine(): tmp_me = newDistArray(self.fft, self.params.spectral) if self.params.spectral: - tmp = np.sin(2 * np.pi * self.X[0]) * np.sin(2 * np.pi * self.X[1]) + tmp = 0.5*(2.0 + 0.0*np.sin(2 * np.pi * self.X[0]) * np.sin(2 * np.pi * self.X[1])) tmp_me[:] = self.fft.forward(tmp) else: - tmp_me[:] = np.sin(2 * np.pi * self.X[0]) * np.sin(2 * np.pi * self.X[1]) + tmp_me[:] = 0.5*(2.0 + 0.0*np.sin(2 * np.pi * self.X[0]) * np.sin(2 * np.pi * self.X[1])) return tmp_me assert t == 0, 'ERROR: u_exact only valid for t=0' diff --git a/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_benchmark.py b/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_benchmark.py index ab0f2ca0d4..4a4b8fcb4c 100644 --- a/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_benchmark.py +++ b/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_benchmark.py @@ -61,8 +61,8 @@ def run_simulation(name=None, nprocs_space=None): problem_params['eps'] = [0.04] problem_params['radius'] = 0.25 problem_params['TM'] = 1.0 - problem_params['D'] = 0.1 - problem_params['dw'] = [21.0] + problem_params['D'] = 1.0 + problem_params['dw'] = [300.0] problem_params['comm'] = space_comm problem_params['name'] = name problem_params['init_type'] = 'circle_rand' @@ -90,7 +90,7 @@ def run_simulation(name=None, nprocs_space=None): # set time parameters t0 = 0.0 - Tend = 32 * 0.001 + Tend = 100 * 0.001 if space_rank == 0 and time_rank == 0: out = f'---------> Running {name} with {time_size} process(es) in time and {space_size} process(es) in space...' diff --git a/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_reference.py b/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_reference.py index 0dd7062654..0e9a1d56e7 100644 --- a/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_reference.py +++ b/pySDC/projects/AllenCahn_Bayreuth/run_temp_forcing_reference.py @@ -41,7 +41,7 @@ def run_simulation(name='', spectral=None, nprocs_space=None): # initialize level parameters level_params = dict() level_params['restol'] = 1E-12 - level_params['dt'] = 1E-06 + level_params['dt'] = 1E-03 level_params['nsweeps'] = [1] # initialize sweeper parameters @@ -55,11 +55,11 @@ def run_simulation(name='', spectral=None, nprocs_space=None): problem_params = dict() problem_params['L'] = 1.0 problem_params['nvars'] = [(128, 128)] - problem_params['eps'] = [0.04] - problem_params['radius'] = 0.25 + problem_params['eps'] = [0.03] + problem_params['radius'] = 0.35682 problem_params['TM'] = 1.0 - problem_params['D'] = 0.1 - problem_params['dw'] = [21.0] + problem_params['D'] = 10.0 + problem_params['dw'] = [1.0] problem_params['comm'] = space_comm problem_params['name'] = name problem_params['init_type'] = 'circle' @@ -85,7 +85,7 @@ def run_simulation(name='', spectral=None, nprocs_space=None): # set time parameters t0 = 0.0 - Tend = 1 * 0.001 + Tend = 100 * 0.001 if space_rank == 0: out = f'---------> Running {name} with spectral={spectral} and {space_size} process(es) in space...' From 3bdd502ed8b7b27b9841fce07eb6178611ed7b02 Mon Sep 17 00:00:00 2001 From: Michael Fleck Date: Wed, 15 Sep 2021 19:52:44 +0200 Subject: [PATCH 2/4] Update gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index e242029b84..6f418176be 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ /doc/latex /doc/html *out.txt +*out_1x1.txt +*out_1x2.txt +*out_2x2.txt *sdc.txt *detail.txt data/* From c7170a0e0a1ffae3f28adba4e3e67e74416de4f5 Mon Sep 17 00:00:00 2001 From: Robert Speck Date: Thu, 16 Sep 2021 09:37:23 +0200 Subject: [PATCH 3/4] Update ci_pipeline.yml --- .github/workflows/ci_pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 960e53de1a..e712e9eaff 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -17,6 +17,7 @@ jobs: - name: Add packages run: | + sudo apt-get update sudo apt-get install texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra cm-super dvipng - name: Cache conda From 4a4e29dfd14c3730aec22f069709f0627c407372 Mon Sep 17 00:00:00 2001 From: Robert Speck Date: Thu, 16 Sep 2021 09:55:50 +0200 Subject: [PATCH 4/4] Update AllenCahn_Temp_MPIFFT.py --- .../implementations/problem_classes/AllenCahn_Temp_MPIFFT.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py b/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py index 6cb7ec1d33..1478abf2fe 100644 --- a/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py +++ b/pySDC/implementations/problem_classes/AllenCahn_Temp_MPIFFT.py @@ -225,10 +225,10 @@ def circle_rand(): def sine(): tmp_me = newDistArray(self.fft, self.params.spectral) if self.params.spectral: - tmp = 0.5*(2.0 + 0.0*np.sin(2 * np.pi * self.X[0]) * np.sin(2 * np.pi * self.X[1])) + tmp = 0.5 * (2.0 + 0.0 * np.sin(2 * np.pi * self.X[0]) * np.sin(2 * np.pi * self.X[1])) tmp_me[:] = self.fft.forward(tmp) else: - tmp_me[:] = 0.5*(2.0 + 0.0*np.sin(2 * np.pi * self.X[0]) * np.sin(2 * np.pi * self.X[1])) + tmp_me[:] = 0.5 * (2.0 + 0.0 * np.sin(2 * np.pi * self.X[0]) * np.sin(2 * np.pi * self.X[1])) return tmp_me assert t == 0, 'ERROR: u_exact only valid for t=0'