-
Notifications
You must be signed in to change notification settings - Fork 97
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
Extend table to support arbitrary vector types #310
Extend table to support arbitrary vector types #310
Conversation
Two tests are failing. See in particular: https://travis-ci.com/github/gridap/Gridap.jl/jobs/357231183 The first of the two test fails in the first line of the following method: function array_cache(a::LocalToGlobalArray)
gids = testitem(a.lid_to_gid)
T = eltype(a.gid_to_val)
r = zeros(T,size(gids))
c = CachedArray(r)
cl = array_cache(a.lid_to_gid)
(cl,c)
end because |
Hi @amartinhuertas. The extension of The thing is that Perhaps we can allow |
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.
Do not merge for the moment. See my comment above.
For my understanding: Who imposes this constraint (i.e., eltype consistent with getindex)? |
Can we at least partially merge this, leaving apart the following?
Just an idea ... |
Its the definition of eltype in Julia |
we need to think how to do this properly before merging... |
Perhaps it is better to discuss this face-to-face since it is not an obvious topic. The performance / design of |
I found the following comment by one of the Julia developers, on an issue related to the topics we are discussing: JuliaLang/julia#9586 (comment) Accordingly to this comment, effectively the type returned by |
…e_to_support_arbitrary_vector_types
Hi @fverdugo. I am positive that I need a general version of Table for GridapDistributed.jl (even we decided to put on hold this development for a while). Recall that now we are going to leave on the hands of the user to select the type of the local vector for DistributedVectors. If the user selects a Table, that's ok. This Table will be in the ordering of the APP, and not that of PETSc. Thus, I cannot pass the In order to solve this, I need to create a new So far so good, but I need the general Table in order to implement this. We can discard the part related to getindex/setindex, I only need Table generalization. What do u think? Do u see another possible solution? Thanks! |
As far as I remember, this PR had two parts:
The part (1) can be done and merged since it is conceptually straight-forward (even though it will break some code downstream, but it should be easy to fix). However, part (2) is quite more difficult and we haven't found a (good) solution yet. I assume that you only need part (1) right? |
Yes, that's it. I am aware that this change will have an impact in Gridap.jl satellite packages as well (e.g., GridapEmbedded). I am now going to eliminate (2) from this branch, and try to see whether the tests pass or not. |
…e_to_support_arbitrary_vector_types
Thus, now, one cannot longer modify the contents of a Table using Base.getindex()
The tests passed! You can proceed with the code review (if you feel it is necessary). It was not rocket science. |
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.
Thanks for the changes!
Agreed with @fverdugo that the changes in this PR (branch |
This PR should be reviewed after PR #309 is accepted
This PR solves issue #295
I have only the following concern/doubt w.r.t. the present PR. Should we keep the current interface for the
indentity_table
andempty_table
methods? i.e,Gridap.jl/src/Arrays/Tables.jl
Line 47 in cce0534
Table
?