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

Add analytical unit tests for Cylinder and CylinderSurface #162

Merged
merged 6 commits into from
Dec 31, 2024
Merged

Conversation

mikeingold
Copy link
Collaborator

@mikeingold mikeingold commented Dec 31, 2024

Changed

  • Update units tests for Cylinder and CylinderSurface to include analytical solutions.
  • Added using CoordRefSystems to @testsnippet Combinations.
  • Updated CHANGELOG.md.

Continues progress on #67

mikeingold and others added 2 commits December 31, 2024 12:10
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
z = p_cyl.z
ρ^(-1) * (ρ + φ * u"m" + z) * u"A"
end
solution = let
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
solution = let
solution = let

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (dc4fe79) to head (fc474a6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #162   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines          181       181           
=========================================
  Hits           181       181           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 31, 2024

Benchmark Results

main fc474a6... main/fc474a615c5a4b...
Differentials/Differential 0.202 ± 0.001 μs 0.203 ± 0.0011 μs 0.995
Differentials/Jacobian 0.166 ± 0.001 μs 0.167 ± 0.001 μs 0.994
Integrals/Segment/Scalar GaussKronrod 0.831 ± 0.0088 μs 0.828 ± 0.0081 μs 1
Integrals/Segment/Scalar GaussLegendre 1.61 ± 0.008 μs 1.64 ± 0.0089 μs 0.979
Integrals/Segment/Scalar HAdaptiveCubature 1.08 ± 0.09 μs 1.16 ± 0.15 μs 0.931
Integrals/Segment/Vector GaussKronrod 3.01 ± 0.056 μs 3 ± 0.05 μs 1
Integrals/Segment/Vector GaussLegendre 17.2 ± 0.44 μs 18.2 ± 0.41 μs 0.944
Integrals/Segment/Vector HAdaptiveCubature 3.89 ± 0.083 μs 3.85 ± 0.089 μs 1.01
Integrals/Sphere/Scalar GaussKronrod 0.0738 ± 0.00098 ms 0.0727 ± 0.00081 ms 1.01
Integrals/Sphere/Scalar GaussLegendre 1.82 ± 0.0081 ms 1.81 ± 0.0087 ms 1
Integrals/Sphere/Scalar HAdaptiveCubature 0.0472 ± 0.00013 ms 0.047 ± 0.00012 ms 1
Integrals/Sphere/Vector GaussKronrod 0.108 ± 0.0013 ms 0.107 ± 0.001 ms 1.01
Integrals/Sphere/Vector GaussLegendre 3.29 ± 0.065 ms 3.23 ± 0.079 ms 1.02
Integrals/Sphere/Vector HAdaptiveCubature 0.099 ± 0.00086 ms 0.0989 ± 0.001 ms 1
Rules/GaussLegendre 21.7 ± 0.62 μs 21.7 ± 0.59 μs 1
Specializations/Scalar GaussLegendre/BezierCurve 0.25 ± 0.00074 ms 0.253 ± 0.00069 ms 0.99
Specializations/Scalar GaussLegendre/Line 7.23 ± 0.06 μs 7 ± 0.058 μs 1.03
Specializations/Scalar GaussLegendre/Plane 0.741 ± 0.0024 ms 0.74 ± 0.0022 ms 1
Specializations/Scalar GaussLegendre/Ray 5.94 ± 0.042 μs 5.87 ± 0.043 μs 1.01
Specializations/Scalar GaussLegendre/Rope 0.062 ± 0.0005 ms 0.0506 ± 0.00023 ms 1.23
Specializations/Scalar GaussLegendre/Tetrahedron 0.153 ± 0.0013 s 0.154 ± 0.0014 s 0.991
Specializations/Scalar GaussLegendre/Triangle 0.616 ± 0.0034 ms 0.812 ± 0.013 ms 0.758
time_to_load 1.47 ± 0.029 s 1.54 ± 0.035 s 0.955

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR.
Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

Copy link
Member

@JoshuaLampert JoshuaLampert left a comment

Choose a reason for hiding this comment

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

Looks good (I didn't check the maths, but I assume the solution is correct if tests are successful). Thanks!

@mikeingold mikeingold merged commit 7818474 into main Dec 31, 2024
12 checks passed
@mikeingold mikeingold deleted the cyltest branch December 31, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants