-
Notifications
You must be signed in to change notification settings - Fork 90
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
DG heat equation tutorial #787
DG heat equation tutorial #787
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #787 +/- ##
==========================================
- Coverage 93.28% 93.27% -0.01%
==========================================
Files 36 36
Lines 5224 5235 +11
==========================================
+ Hits 4873 4883 +10
- Misses 351 352 +1 ☔ View full report in Codecov by Sentry. |
Is the continuous below order 2 or the discontinuous above order 2? |
I think you mean what the two lines at the bottom are, right? |
But they differ in slope, right? What are their exact orders? |
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.
I think we must clarify some details here.
Some convergence script results as graphs can be harder to read (all for quadrilateral):
Row │ N Linf L2 L2_expected_next H1 H1_expected_next
│ Int64 Float64 Float64 Float64 Float64 Float64
─────┼────────────────────────────────────────────────────────────────────────────────
1 │ 2 0.130196 0.202511 0.0506276 1.00388 0.50194
2 │ 4 0.0460564 0.0510494 0.0127623 0.502255 0.251128
3 │ 8 0.012506 0.0128262 0.00320656 0.251625 0.125813
4 │ 16 0.00319102 0.00321117 0.000802793 0.125888 0.0629439
5 │ 32 0.000801829 0.00080309 0.000200773 0.0629537 0.0314769
6 │ 64 0.000200712 0.000200791 5.01978e-5 0.0314781 0.015739
Row │ N Linf L2 L2_expected_next H1 H1_expected_next
│ Int64 Float64 Float64 Float64 Float64 Float64
─────┼────────────────────────────────────────────────────────────────────────────────
1 │ 2 0.130196 0.202511 0.0506276 1.00388 0.50194
2 │ 4 0.0453722 0.0501761 0.012544 0.502248 0.251124
3 │ 8 0.0124713 0.0127358 0.00318395 0.251674 0.125837
4 │ 16 0.00318923 0.00320436 0.000801089 0.125898 0.0629488
5 │ 32 0.000801729 0.000802629 0.000200657 0.0629551 0.0314776
6 │ 64 0.000200707 0.000200761 5.01903e-5 0.0314783 0.0157391
Row │ N Linf L2 L2_expected_next H1 H1_expected_next
│ Int64 Float64 Float64 Float64 Float64 Float64
─────┼──────────────────────────────────────────────────────────────────────────────────
1 │ 2 0.0247816 0.028836 0.0036045 0.204098 0.0510244
2 │ 4 0.00307976 0.00386503 0.000483128 0.0511228 0.0127807
3 │ 8 0.000388316 0.000490246 6.12807e-5 0.0127715 0.00319286
4 │ 16 4.81335e-5 6.14925e-5 7.68657e-6 0.00319204 0.00079801
5 │ 32 5.97622e-6 7.6931e-6 9.61637e-7 0.000797955 0.000199489
6 │ 64 7.44099e-7 9.61841e-7 1.2023e-7 0.000199485 4.98713e-5
Row │ N Linf L2 L2_expected_next H1 H1_expected_next
│ Int64 Float64 Float64 Float64 Float64 Float64
─────┼──────────────────────────────────────────────────────────────────────────────────
1 │ 2 0.0247816 0.028836 0.0036045 0.204098 0.0510244
2 │ 4 0.00283828 0.00320227 0.000400284 0.0531917 0.0132979
3 │ 8 0.000371974 0.000358141 4.47676e-5 0.0133091 0.00332728
4 │ 16 4.69751e-5 4.18634e-5 5.23293e-6 0.00332116 0.00083029
5 │ 32 5.88702e-6 5.04621e-6 6.30776e-7 0.000829385 0.000207346
6 │ 64 7.36358e-7 6.18999e-7 7.73749e-8 0.000207235 5.18088e-5
Row │ N Linf L2 L2_expected_next H1 H1_expected_next
│ Int64 Float64 Float64 Float64 Float64 Float64
─────┼──────────────────────────────────────────────────────────────────────────────────
1 │ 2 0.00287087 0.00271881 0.000169926 0.0268203 0.00335254
2 │ 4 0.000242052 0.000176249 1.10156e-5 0.00338103 0.000422628
3 │ 8 1.61882e-5 1.11276e-5 6.95476e-7 0.000423456 5.2932e-5
4 │ 16 1.03618e-6 6.97278e-7 4.35799e-8 5.29573e-5 6.61966e-6
5 │ 32 6.51477e-8 4.36082e-8 2.72552e-9 6.62044e-6 8.27556e-7
6 │ 64 4.07782e-9 2.72595e-9 1.70372e-10 8.2758e-7 1.03448e-7
Row │ N Linf L2 L2_expected_next H1 H1_expected_next
│ Int64 Float64 Float64 Float64 Float64 Float64
─────┼──────────────────────────────────────────────────────────────────────────────────
1 │ 2 0.00287087 0.00271881 0.000169926 0.0268203 0.00335254
2 │ 4 0.000228848 0.000172388 1.07742e-5 0.00351791 0.000439739
3 │ 8 1.60126e-5 1.10347e-5 6.89667e-7 0.000436887 5.46109e-5
4 │ 16 1.03317e-6 6.95645e-7 4.34778e-8 5.36008e-5 6.7001e-6
5 │ 32 6.50996e-8 4.35815e-8 2.72385e-9 6.64427e-6 8.30534e-7
6 │ 64 4.07685e-9 2.72552e-9 1.70345e-10 8.28381e-7 1.03548e-7 The expected norm is the current norm * 1/2^(order) for H1 and norm * 1/2^(order + 1) for L2 [ Info: order = 1
[ Info: slopes of L2 vs N = [-2.0129235398778857, -1.9781123405090923, -1.9907819594249005, -1.9972307802964462, -1.9992507830984803]
[ Info: slopes of H1 vs N = [-0.9991152976325772, -0.9968411962760191, -0.999308479759299, -0.9998539901566406, -0.9999670340139399]
[ Info: order = 2
[ Info: slopes of L2 vs N = [-3.1707031297879107, -3.1604949308839316, -3.096765601242465, -3.052417650566909, -3.027191020911541]
[ Info: slopes of H1 vs N = [-1.939987107438954, -1.99878412103502, -2.0026566568598767, -2.001573208098428, -2.000772421073222]
[ Info: order = 3
[ Info: slopes of L2 vs N = [-3.979248450192239, -3.9655415209701683, -3.9875483912823775, -3.9965627848873275, -3.999110899899076]
[ Info: slopes of H1 vs N = [-2.9305366294295183, -3.0093852067151214, -3.0269354855259873, -3.012071199303561, -3.0037441172379964] |
…to DG-HeatEq-IP-example
…to DG-HeatEq-IP-example
…to DG-HeatEq-IP-example
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.
LGTM
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.
Very nice work!
I just had some time to read and give some thoughts and comments (this is how far I got now)
Overall, I think it would be nice to avoid repeating too many things from the basic heat equation tutorial and focus on what is new here. IMO this is an advanced tutorial and readers should be familiar with the basic Ferrite syntax.
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.
This is looking very good!
Mostly formatting (boldface) comments.
Co-authored-by: Knut Andreas Meyer <[email protected]>
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.
After the suggested fine-tuning, it is good to go from my perspective regarding formatting and clarity. (But I haven't checked the correctness wrt. the literature. I leave this to @termi-official :))
Nice work @AbdAlazezAhmed!
Co-authored-by: Knut Andreas Meyer <[email protected]> Co-authored-by: Dennis Ogiermann <[email protected]>
🎉 |
Tested convergence using an edited version of #640 and it seems to converge * currently doing some edits to optimize it and see where the results stagnate. Will leave the script in a resolved comment once finished so it doesn't take much space *
These plots are in log-log, and N is the number of elements in one of the dimensions (so for quad the number of elements is N^2)