-
Notifications
You must be signed in to change notification settings - Fork 120
Validate PlotData2D
with LinearScalarAdvectionEquation3D
#2377
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
base: main
Are you sure you want to change the base?
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. |
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.
Thanks for taking the initiative! I added a couple small first comments
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2377 +/- ##
=======================================
Coverage 96.95% 96.95%
=======================================
Files 504 504
Lines 41721 41721
=======================================
Hits 40448 40448
Misses 1273 1273
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:
|
@@ -691,6 +691,58 @@ end | |||
end | |||
end | |||
end | |||
|
|||
@trixi_testset "PlotData2D" begin |
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.
@trixi_testset "PlotData2D" begin | |
@trixi_testset "PlotData1D and PlotData2D from 3D simulation" begin |
c = 1.0; | ||
A = 0.5; | ||
L = 2; | ||
f = 1 / L; |
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.
c = 1.0; | |
A = 0.5; | |
L = 2; | |
f = 1 / L; | |
c = 1.0 | |
A = 0.5 | |
L = 2 | |
f = 1 / L |
sol = solve(ode, ode_solver; dt = 1.0, adaptive = false, | ||
save_everystep = false) |
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.
Where is the ode
defined?
for i in eachindex(pd.x) | ||
x = SVector(pd.x[i], pd.y[i], 0.0) | ||
u = initial_condition(x, 0.1, equations)[1] | ||
@test isapprox(pd.data[1][i], u, atol = 0.9) | ||
end | ||
|
||
pd = @inferred PlotData1D(ode.u0, ode.p, slice = :z) | ||
for i in eachindex(pd.x) | ||
x = SVector(0, 0, pd.x[i]) | ||
u = initial_condition(x, 0.1, equations)[1] | ||
@test isapprox(pd.data[1], u, atol = 0.5) | ||
end |
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.
The tolerances are quite large. Maybe the time integration method should be adapted to get better results?
I am trying to get started on #2335 based off of #2334 and #2340.