Skip to content

Conversation

@brownbaerchen
Copy link
Contributor

I should have done this long ago. For the Williamson 5 test case that simulates the Earth, the numbers are so huge, that you really need to look at relative errors. The tutorial for the Gusto coupling will use the Williamson 5 test case and with adaptive step size selection. However, I thought I would do a separate PR for all the non-Gusto related changes that are needed for that.

This PR includes a Firedrake-compatible version of dt-k-adaptivity. The interpolation was done in a NumPy specific way, which I want to keep because it is faster on NumPy and CuPy data than a more generic version. This Firedrake enabled version should actually work with any datatype, but we are not entirely sure if you need to invert the mass matrix during the interpolation. Currently I left in the FE/Firedrake specific bit as a comment. If we become more confident that we don't need to invert the mass matrix, we can eventually rename this to something more general and remove the comment.

@pancetta pancetta merged commit 5b92e94 into Parallel-in-Time:master Jan 23, 2025
87 checks passed
brownbaerchen added a commit to brownbaerchen/pySDC that referenced this pull request Aug 22, 2025
#!!!!!!!!!! WARNING: RUFF FAILED !!!!!!!!!!: 

#pySDC/projects/GPU/analysis_scripts/compare_RBC3D.py:418:9: E722 Do not use bare `except`
#    |
Parallel-in-Time#416 |                 k[_s > 1e-16], _s[_s > 1e-16], color=last_line.get_color(), ls=last_line.get_linestyle(), label=label
Parallel-in-Time#417 |             )
Parallel-in-Time#418 |         except:
#    |         ^^^^^^ E722
Parallel-in-Time#419 |             pass
#    |
#
#pySDC/projects/GPU/analysis_scripts/compare_RBC3D.py:517:5: F841 Local variable `Delta_Nu` is assigned to but never used
#    |
Parallel-in-Time#515 |     t = data['t']
Parallel-in-Time#516 |     avg_Nu = np.array([np.mean(Nu[40 : 40 + i + 1]) for i in range(len(Nu[40:]))])
Parallel-in-Time#517 |     Delta_Nu = np.array([abs(avg_Nu[i + 1] - avg_Nu[i]) for i in range(len(avg_Nu) - 1)])
#    |     ^^^^^^^^ F841
Parallel-in-Time#518 |     # ax.plot(data['t'][40:-1], Delta_Nu / avg_Nu[:-1])
Parallel-in-Time#519 |     # ax.plot(data['t'], np.abs(avg_Nu - avg_Nu[-1]) / avg_Nu[-1])
#    |
#    = help: Remove assignment to unused variable `Delta_Nu`:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants