-
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
WIP: 2D covariant form using P4estMesh
#31
Draft
tristanmontoya
wants to merge
60
commits into
main
Choose a base branch
from
tm/covariant_form
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tion in Trixi.jl (cherry-picked from f45378e) Co-authored-by: Tristan Montoya <[email protected]>
…ltype() and ndims() functions for new struct
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
==========================================
+ Coverage 81.78% 86.56% +4.77%
==========================================
Files 8 11 +3
Lines 829 1109 +280
==========================================
+ Hits 678 960 +282
+ Misses 151 149 -2 ☔ View full report in Codecov by Sentry. |
…o tm/covariant_form
…gitude as intermediate state, not Cartesian
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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. It should be merged after #34.
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 container,elements
, 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/equations.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.