Skip to content

Commit 1276f79

Browse files
committed
align with paper
1 parent edd3cb4 commit 1276f79

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

pySDC/implementations/problem_classes/AllenCahn_2D_FD.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def u_exact(self, t):
175175
for i in range(self.params.nvars[0]):
176176
for j in range(self.params.nvars[1]):
177177
r2 = self.xvalues[i] ** 2 + self.xvalues[j] ** 2
178-
me.values[i, j] = np.tanh((self.params.radius - np.sqrt(r2)) / self.params.eps)
178+
me.values[i, j] = np.tanh((self.params.radius - np.sqrt(r2)) / (np.sqrt(2) * self.params.eps))
179179

180180
return me
181181

pySDC/projects/TOMS/AllenCahn_contracting_circle.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def show_results(fname, cwd=''):
294294
ax.plot(xcoords, init_width, color='k', linestyle='--', linewidth=1, label='exact')
295295

296296
ax.yaxis.set_major_formatter(ticker.FormatStrFormatter('%1.2f'))
297-
ax.set_ylabel('interface')
297+
ax.set_ylabel(r'interface width ($\epsilon$)')
298298
ax.set_xlabel('time')
299299
ax.grid()
300300
ax.legend(loc=3)
@@ -318,19 +318,19 @@ def main(cwd=''):
318318
cwd (str): current working directory (need this for testing)
319319
"""
320320

321-
# Loop over variants, exact and inexact solves
322-
results = {}
323-
for variant in ['multi-implicit', 'semi-implicit', 'fully-implicit', 'semi-implicit_v2', 'multi-implicit_v2']:
324-
325-
results[(variant, 'exact')] = run_SDC_variant(variant=variant, inexact=False)
326-
results[(variant, 'inexact')] = run_SDC_variant(variant=variant, inexact=True)
327-
328-
# dump result
321+
# # Loop over variants, exact and inexact solves
322+
# results = {}
323+
# for variant in ['multi-implicit', 'semi-implicit', 'fully-implicit', 'semi-implicit_v2', 'multi-implicit_v2']:
324+
#
325+
# results[(variant, 'exact')] = run_SDC_variant(variant=variant, inexact=False)
326+
# results[(variant, 'inexact')] = run_SDC_variant(variant=variant, inexact=True)
327+
#
328+
# # dump result
329329
fname = 'data/results_SDC_variants_AllenCahn_1E-03'
330-
file = open(cwd + fname + '.pkl', 'wb')
331-
dill.dump(results, file)
332-
file.close()
333-
assert os.path.isfile(cwd + fname + '.pkl'), 'ERROR: dill did not create file'
330+
# file = open(cwd + fname + '.pkl', 'wb')
331+
# dill.dump(results, file)
332+
# file.close()
333+
# assert os.path.isfile(cwd + fname + '.pkl'), 'ERROR: dill did not create file'
334334

335335
# visualize
336336
show_results(fname, cwd=cwd)

0 commit comments

Comments
 (0)