-
Notifications
You must be signed in to change notification settings - Fork 93
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
Use ContMechTensors whith JuAFEM #51
Conversation
bacbe94
to
f65aa21
Compare
Ok, juafem now works with the stack allocated version of ContMechTensors. Still some stuff missing in that package though, like inverses of 4th order tensors. |
Benchmarked a bit and 100 000 quad elements take about 0.5 seconds to assemble which seems to be a bit faster than before. |
Looks good! |
So we obtain higher preformance while still gaining benefits in terms of tensor abstraction (instead of having to resort to Voigt vectors and matrices)? |
That's the plan ;) |
This is unfortunately garbage slow on 0.4 because JuliaLang/julia#15274 and some other stuff are not fixed on 0.4.. |
I think https://github.com/KristofferC/JuAFEM.jl/blob/7c9661bc9cbb884182d1f63c3fc03023ea2bee4f/examples/Yeoh_large_deformations.ipynb is a nice example of the new stuff. The internal element force function feels quite clean |
So this is pretty much done. I want to add some more examples and fix up some stuff at https://github.com/KristofferC/ContMechTensors.jl but nothing big. However, since the performance is so bad on julia 0.4 I won't merge this until 0.5 is out which will be in quite a long time. Anyone who wants to use it can just If someone wants to add stuff to this branch just open PR against this branch and we merge it into this. |
7c9661b
to
c0ecd0d
Compare
c0ecd0d
to
cf1d95c
Compare
Sweet! I started a bit on some mesh and dof functions. Should I use 1st order tensors for the coordinates then? For the function reinit!{dim, T}(fe_v::FEValues{dim}, x::Vector{Vec{dim, T}})
...
end so I guess x[i] = [x_i, y_i, z_i] is the coordinates of node |
Go for it :). Yes like you say, one first order tensor per node. I need to add more documentation for the tensor stuff. The simplest way to create a first order tensor should be for example in 2D If you get something going we can iron out the details together. |
fix bugs in node order and add tests
4b27076
to
2d38fcd
Compare
Added an example for tangent stiffness with tensors: https://github.com/KristofferC/JuAFEM.jl/blob/kc/dim_param/examples/stiffness_example.ipynb |
2d38fcd
to
57d5ebe
Compare
I think we should merge this. It is only us using this at the moment and it is awkward to have it in a PR. |
Julia 0.5 shouldnt be that far away as well. Maybe two months..? |
add function space and gauss rule for tetraheder
Okay, maybe that's another issue then, that only we are using it? ;) We need to spread the word! |
Hehe, need better documentation and examples for it to be usable by other people though. |
Ok, lets do this. |
This is a WIP to using Tensors wherever something in JuAFEM actually is a tensor instead of just using a Julia Vector.
I added a full example on how this would look for a large deformation problem.
Things to do before merging:
Also, tuples on julia 0.4 seems quite slow so it is possible we wait with merging this or just decide that it is worth starting using julia 0.5.