-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add 2D covariant form using P4estMesh
#31
Conversation
…tion in Trixi.jl (cherry-picked from f45378e) Co-authored-by: Tristan Montoya <[email protected]>
…ltype() and ndims() functions for new struct
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
==========================================
+ Coverage 84.71% 87.88% +3.17%
==========================================
Files 11 17 +6
Lines 1125 1420 +295
==========================================
+ Hits 953 1248 +295
Misses 172 172 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
eb1ffdf
to
2b475d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is an initial "superficial" review. I still have to look at the following files in detail:
- src/solvers/dgsem_p4est/containers_2d_manifold_in_3d_covariant.jl
- src/solvers/dgsem_p4est/dg_2d_manifold_in_3d_covariant.jl
src/solvers/dgsem_p4est/containers_2d_manifold_in_3d_covariant.jl
Outdated
Show resolved
Hide resolved
After the discussion in #46, I wonder if this should be modified to not pass the cache around, or if it's best to merge it first and then look into cleaner alternatives. |
Superseded by #47. |
This PR contains a preliminary implementation of a two-dimensional DG solver for PDEs on surfaces in covariant form, starting here with the variable-coefficient linear advection equation on the sphere.
I defined a new
P4estElementContainerCovariant
type to carry the specific geometric information needed for the covariant form. Since only the scalar advection equation is supported so far, I didn't add Christoffel symbols as part of this PR.Trixi.jl's
rhs!
,weak_form_kernel!
,flux_differencing_kernel!
,compute_coefficients!
,calc_interface_flux!
,max_dt
, andcalc_error_norms
functions are specialized indg_2d_manifold_in_3d_covariant.jl
so as to dispatch on the new typeAbstractCovariantEquations{NDIMS, NVARS}
. The physical and numerical fluxes called by those functions take in the cache as well as the node and element indices, so that all the geometric information can be accessed by these fluxes. This way, we do not need to store the spatially varying geometric quantities that the contravariant fluxes depend upon as auxiliary solution variables as I did in an earlier implementation of my spherical shallow water solver.The initial condition is prescribed with zonal and meridional velocity or momentum components, which then get transformed in
compute_coefficients!
to get the local contravariant components. An additional elixirelixir_spherical_advection_covariant.jl
has been added as an example of this, using a smooth Gaussian bell test case adapted from the standard Cosine bell case (Case 1 from the Williamson et al. test suite). Standard values of geophysical parameters are provided as constants insrc/equations/reference_data.jl
.This PR also includes tests for the new weak-form and flux-differencing solvers, which give the same results when the arithmetic mean is used for the two-point volume flux. As discussed in #43, Trixi.jl versions below 0.9 are no longer supported.