Skip to content

Conversation

@brownbaerchen
Copy link
Contributor

There are very simple relationships for the integrals across the entire intervals in some spectral methods. For instance, in Fourier methods, only the constant mode has nonzero integral since the integrals over the entire domain of sine and cosine modes vanish. For Chebychev methods, the relationship is less obvious but similarly easy to implement.

This PR includes tests with randomly generated solutions. For Chebychev methods, a reference value is computed using qmat in physical space. For Fourier methods, the reference value is simply derived from the coefficient of the constant mode.

@tlunet
Copy link
Member

tlunet commented Oct 22, 2025

Neat !

@pancetta pancetta merged commit 8b5e6b5 into Parallel-in-Time:master Oct 23, 2025
41 of 42 checks passed
@brownbaerchen brownbaerchen deleted the integrate_whole_interval branch October 23, 2025 08:51
brownbaerchen added a commit to brownbaerchen/pySDC that referenced this pull request Oct 26, 2025
#!!!!!!!!!! WARNING: RUFF FAILED !!!!!!!!!!: 

#pySDC/projects/GPU/analysis_scripts/compare_RBC3D.py:494:9: E722 Do not use bare `except`
#    |
Parallel-in-Time#492 |                 k[_s > 1e-16], _s[_s > 1e-16], color=last_line.get_color(), ls=last_line.get_linestyle(), label=label
Parallel-in-Time#493 |             )
Parallel-in-Time#494 |         except:
#    |         ^^^^^^ E722
Parallel-in-Time#495 |             pass
#    |
#
#pySDC/projects/GPU/analysis_scripts/compare_RBC3D.py:593:5: F841 Local variable `Delta_Nu` is assigned to but never used
#    |
Parallel-in-Time#591 |     t = data['t']
Parallel-in-Time#592 |     avg_Nu = np.array([np.mean(Nu[40 : 40 + i + 1]) for i in range(len(Nu[40:]))])
Parallel-in-Time#593 |     Delta_Nu = np.array([abs(avg_Nu[i + 1] - avg_Nu[i]) for i in range(len(avg_Nu) - 1)])
#    |     ^^^^^^^^ F841
Parallel-in-Time#594 |     # ax.plot(data['t'][40:-1], Delta_Nu / avg_Nu[:-1])
Parallel-in-Time#595 |     # 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.

3 participants