-
Notifications
You must be signed in to change notification settings - Fork 2
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
More integration tests for different material models #9
Comments
@TeroFrondelius Well, for the moment there are only the tests that I sent you. IMHO, there are three ways to go:
I would think that 1. could be left aside for the moment. Choices between strategy 2 or 3 depends on JuliaFEM.jl developers choices. Concerning 3. I stopped because I did not knew how to create views of raw arrays (i.e. take a continuous array and turn it into a matrix without copying) which can easily be done in C++ with Eigen or in Python with Numpy). Can you help me on this point ? |
This would be the right thing to do. I will also need a help here and all the people who could help are on holiday. We will continue after three weeks. |
Maybe I misunderstood, but here is the related information: https://pkg.julialang.org/docs/julia/THl1k/1.1.1/devdocs/subarrays.html julia> A = rand(3,3)
3×3 Array{Float64,2}:
0.726266 0.92312 0.083372
0.0676195 0.0912788 0.543187
0.864321 0.600093 0.888888
julia> S1 = view(A, 1, 2:3)
2-element view(::Array{Float64,2}, 1, 2:3) with eltype Float64:
0.9231199568455222
0.08337203046946584
julia> S1 = view(A, 1:2, 2:3)
2×2 view(::Array{Float64,2}, 1:2, 2:3) with eltype Float64:
0.92312 0.083372
0.0912788 0.543187
julia> |
Well, thanks for the view. Indeed, I was looking for a pure C++ solution as I do in Python. But CxxWrap does not provide such functionality right now. |
@thelfer maybe I have misunderstood, but you can call I started implementing this in JuliaFEM (Materials.jl to be exact). I will ping you when I will get my initial pull request together. |
Actually, I think I found the example: https://github.com/JuliaInterop/CxxWrap.jl#working-with-arrays. |
@thelfer as you commented in gitter chat that we should focus the testing to add few more integration tests similar than test_norton_model.jl. Do you have time to do it? I can do, if you can send me a corresponding
cxx
andmfront
files as an example/input.The text was updated successfully, but these errors were encountered: