-
Notifications
You must be signed in to change notification settings - Fork 89
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 a doc section comparing different assembly strategies #1063
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1063 +/- ##
=======================================
Coverage 93.75% 93.75%
=======================================
Files 39 39
Lines 6018 6018
=======================================
Hits 5642 5642
Misses 376 376 ☔ View full report in Codecov by Sentry. |
2586a0a
to
6ef5894
Compare
https://ferrite-fem.github.io/Ferrite.jl/previews/PR1063/topics/assembly/#Comparison-of-assembly-strategies if someone wants to review the rendered version. |
Quick comments (didn't read super carefully). I think this is very nice to put numbers on! Thanks for putting this together! Wouldn't using broadcasting be the more "julian" way instead of manually looping or directly doing non-dot function assemble_v1d(_, K, dofs, Ke)
@. K[dofs, dofs] += Ke # Or K[dofs, dofs] .+= Ke
return
end;
function assemble_v1v(_, K, dofs, Ke)
Kv = view(K, dofs, dofs);
Kv .+= Ke
return
end;
julia> @btime assemble_v1d($assembler, $K, $dofs, $Ke);
22.300 μs (11 allocations: 716.23 KiB)
julia> @btime assemble_v1v($assembler, $K, $dofs, $Ke);
2.511 μs (0 allocations: 0 bytes) Regarding the content, personally I find it a bit too verbose with both the single and full assembly for what its showing. Perhaps a golden midway would be to include the timings for the full assembly, but collapse the actual element routine and assembly routine, and simply report the results? Finally, why not use the heat equation assembly which is simpler for new users to follow? |
6ef5894
to
ad62eb7
Compare
Yea, maybe, I can add a note about this.
I can hide the global assembly routine perhaps? I don't think verbosity is really a problem though. This is in a "topic" section where we can dig a bit deeper.
I just wanted a bit of a bigger local matrix but probably the point can be made also with the smaller heat eq one. |
No description provided.