Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt jacobian_ad_forward for hyperbolic-parabolic semidiscretizations #1589

Merged
merged 19 commits into from
Aug 9, 2023

Conversation

DanielDoehring
Copy link
Contributor

Related to #1147.

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Merging #1589 (47cc392) into main (ddf0892) will decrease coverage by 2.73%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1589      +/-   ##
==========================================
- Coverage   85.63%   82.90%   -2.73%     
==========================================
  Files         401      402       +1     
  Lines       33004    33052      +48     
==========================================
- Hits        28260    27399     -861     
- Misses       4744     5653     +909     
Flag Coverage Δ
unittests 82.90% <100.00%> (-2.73%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...d_dgsem/elixir_navierstokes_taylor_green_vortex.jl 100.00% <ø> (ø)
...d_dgsem/elixir_navierstokes_taylor_green_vortex.jl 100.00% <100.00%> (ø)
...ization/semidiscretization_hyperbolic_parabolic.jl 98.97% <100.00%> (+2.34%) ⬆️

... and 138 files with indirect coverage changes

Copy link
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you please post some plots of the spectra computed for linear advection diffusion? Do the Jacobians agree well with what you get from linear_structure?

@DanielDoehring
Copy link
Contributor Author

DanielDoehring commented Jul 28, 2023

Thanks! Could you please post some plots of the spectra computed for linear advection diffusion?

Sure, for 1D, DGSEM(3), Local Lax-Friedrichs, Domain $[- \pi, \pi]$ and 128 elements I attach 5 ratios $a/d = 10^n, n = 0, \dots, 4$.
If the grid is refined, the diffusive part starts to become more influential since then $\frac{d}{\Delta x^2}$ grows quicker than $\frac{a}{\Delta x}$.

Spectra

ad1e0-1

ad1e1-1

ad1e2-1

ad1e3-1

ad1e4-1

Do the Jacobians agree well with what you get from linear_structure?

I thought about implementing linear_structure as well for parabolic semidiscretizations but since I do not need it and not really understand what is going on here

b_tmp = copy(b)
# wrap the linear operator
A = LinearMap(length(u_ode), ismutating = true) do dest, src
rhs!(dest, src, semi, t0)
@. dest += b_tmp
dest
end

decided to omit it for the moment.

@ranocha
Copy link
Member

ranocha commented Jul 29, 2023

Sure

Thanks

Copy link
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ranocha ranocha enabled auto-merge (squash) August 8, 2023 07:28
@ranocha ranocha disabled auto-merge August 9, 2023 11:33
@ranocha
Copy link
Member

ranocha commented Aug 9, 2023

macOS MPI CI seems to time out again - see #1590. I will merge this manually.

@ranocha ranocha merged commit 7936e61 into trixi-framework:main Aug 9, 2023
29 of 31 checks passed
@DanielDoehring DanielDoehring deleted the JacobianParabolic branch August 9, 2023 11:39
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.

None yet

2 participants