Feature: Mesh-IO and Save Solution support for DGMulti#2259
Feature: Mesh-IO and Save Solution support for DGMulti#2259tristanmontoya merged 29 commits intomainfrom
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2259 +/- ##
==========================================
- Coverage 96.80% 96.77% -0.04%
==========================================
Files 495 495
Lines 40917 41055 +138
==========================================
+ Hits 39608 39727 +119
- Misses 1309 1328 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jlchan
left a comment
There was a problem hiding this comment.
Thanks for putting this together @jmark! I'm still going through the related Trixi2Vtk PR. Is it correct to say that the main structural changes here are:
- adding
dg.basisto the mesh type, - making
DGMultiMesha mutable struct?
Some questions:
- why is making
DGMultiMesha mutable struct necessary? - I saw that
RefElemDatais used to interpolate data in https://github.com/trixi-framework/Trixi2Vtk.jl/pull/103/files#. Is it necessary elsewhere? I am wondering if we can avoid addingRefElemDatato the mesh type by modifying the interface for Trixi2Vtk to pass in adg::DGMultiobject
Correct!
Correct!
Because the solution file interface of Trixi.jl modifies the fields current_filename :: String
unsaved_changes :: Boolduring the lifetime resp. after initialization of the mesh object.
Good point! I agree with your proposal. |
Gotcha! That makes sense to me. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This doesn't seem straightforward to me, unless we make Trixi.jl always save the |
First, sorry for the slow reply - just got back from a conference. I really don't like adding I don't understand why other meshes don't take the basis into account. Aren't there finite difference SBP solvers which use a non-LGL node set? I guess I'm not as familiar with the save solution and i/o interface - is there no way to wrap a DGMultiMesh and DGMulti basis into a struct, write that single instance to hdf5, then load that? |
By default, it's assumed that everything is LGL unless one specifies
I think it is possible - I do something similar in StableSpectralElements.jl with JLD2 - but saving custom Julia structs doesn't seem like the favoured approach in Trixi.jl, which is understandable for backward compatibility reasons. I actually misunderstood what @jmark implemented, as I assumed he was directly saving a This actually makes it easy to avoid duplicating |
I see - but I'd also note is that this approach might not work if using |
|
I'll consider adding To clarify, is Trixi.jl/src/callbacks_step/save_solution.jl Lines 152 to 166 in c36369f DGMulti semi-discretizations, with both the basis and mesh being passed in to save_mesh_file.
@tristanmontoya @jmark thoughts? |
Yes, I think that's the main thing that would need to be changed. Even with Wouldn't it still be possible to visualize solutions from |
jlchan
left a comment
There was a problem hiding this comment.
As discussed on Slack:
[make] a special case to allow both tuple and integer polynomial degrees for wedges.
Adding a test for the case when using Wedge with N::Int would also be great.
Thanks!
…multi-mesh-io-support
jlchan
left a comment
There was a problem hiding this comment.
Thanks for differentiating between Wedges and TensorProductWedges! This looks good to me. Can you open an issue on support for non-Polynomial approximation types?
Sure. I am still trying to figure out why the ubuntu CI fails for the prism test with scalar polynomial degree (on my Mac get |
|
Does changing the timestepper make the test results more consistent? Can you link the elixir that is failing? |
|
Looks like tests pass now - guess it was an issue of tolerances? |
|
Hi @jlchan, the elixir that failed was https://github.com/trixi-framework/Trixi.jl/blob/dgmulti-mesh-io-support/examples/dgmulti_3d/elixir_advection_tensor_wedge.jl, but only when I use a scalar I can get the difference in |
Gotcha. That could be a conditioning issue since the One other check - does lowering the CFL make a difference? |
|
Whether using a (much) smaller CFL, a different time-marching method, or turning off adaptive time stepping, |
|
If you'd rather not merge until the tolerance issue is resolved, I could go through some of the |
Thanks, but I think it's ok to merge this with the relaxed tolerance for now and make an issue describing the CI failure under a tighter tolerance. Can you do file that issue? |
jlchan
left a comment
There was a problem hiding this comment.
Thanks for pushing this through @tristanmontoya!
Title says it all. It is still considered draft. Any comments, advice and contributions are welcome!
The pendant Trixi2Vtk PR: trixi-framework/Trixi2Vtk.jl#103