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

Use ContMechTensors whith JuAFEM #51

Merged
merged 10 commits into from
Apr 2, 2016
Merged

Use ContMechTensors whith JuAFEM #51

merged 10 commits into from
Apr 2, 2016

Conversation

KristofferC
Copy link
Collaborator

@KristofferC KristofferC commented Mar 5, 2016

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.

@KristofferC KristofferC changed the title WIP: Use ContMechTensors whKc/dim param WIP: Use ContMechTensors whith JuAFEM Mar 5, 2016
@KristofferC KristofferC force-pushed the kc/dim_param branch 3 times, most recently from bacbe94 to f65aa21 Compare March 6, 2016 13:33
@KristofferC
Copy link
Collaborator Author

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.

@KristofferC
Copy link
Collaborator Author

Benchmarked a bit and 100 000 quad elements take about 0.5 seconds to assemble which seems to be a bit faster than before.

@fredrikekre
Copy link
Member

Looks good!

@JimBrouzoulis
Copy link
Collaborator

So we obtain higher preformance while still gaining benefits in terms of tensor abstraction (instead of having to resort to Voigt vectors and matrices)?

@KristofferC
Copy link
Collaborator Author

That's the plan ;)

@KristofferC
Copy link
Collaborator Author

This is unfortunately garbage slow on 0.4 because JuliaLang/julia#15274 and some other stuff are not fixed on 0.4..

@KristofferC
Copy link
Collaborator Author

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

@KristofferC
Copy link
Collaborator Author

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 Pkg.checkout("JuAFEM", "kc/dim_param") or just use git to check out the branch.

If someone wants to add stuff to this branch just open PR against this branch and we merge it into this.

@fredrikekre
Copy link
Member

Sweet!

I started a bit on some mesh and dof functions. Should I use 1st order tensors for the coordinates then? For the reinit! function I saw that you use

function reinit!{dim, T}(fe_v::FEValues{dim}, x::Vector{Vec{dim, T}})
    ...
end

so I guess x is a vector of first order tensors, with one tensor per node? So that

x[i] = [x_i, y_i, z_i]

is the coordinates of node i ? Just making sure I have understand it correctly!

@KristofferC
Copy link
Collaborator Author

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 Tensor{1, 2}((1.0,2.0)).

If you get something going we can iron out the details together.

@KristofferC KristofferC changed the title WIP: Use ContMechTensors whith JuAFEM Use ContMechTensors whith JuAFEM Mar 7, 2016
@KristofferC
Copy link
Collaborator Author

@KristofferC
Copy link
Collaborator Author

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.

@KristofferC
Copy link
Collaborator Author

Julia 0.5 shouldnt be that far away as well. Maybe two months..?

@fredrikekre
Copy link
Member

Okay, maybe that's another issue then, that only we are using it? ;) We need to spread the word!

@KristofferC
Copy link
Collaborator Author

Hehe, need better documentation and examples for it to be usable by other people though.

@KristofferC
Copy link
Collaborator Author

Ok, lets do this.

@KristofferC KristofferC merged commit 2aac092 into master Apr 2, 2016
@fredrikekre fredrikekre deleted the kc/dim_param branch November 13, 2017 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants