-
Notifications
You must be signed in to change notification settings - Fork 15
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
Compatible PRanges between FESpaces and linear systems #137
Comments
@santiagobadia involved |
Yes, this is something that I also realized a while ago. |
@JordiManyer The newly published version of PartitionedArrays (0.4.0) should help to fix these issues.
Now PsparseMatrix can be in 2 different states (sub-assembled, or assembled). When assembled, the matrix has no ghost rows and the ghost columns are only the ones strictly needed for the sparse matrix-vector product. In sub-assembled state, you have ghost rows and cols (which will be usually the same).
The Prange in your FE space will naturally match the ghost rows/cols of a PSparseMatrix in sub-assembled state.
Maybe this is not needed anymore since PSparseMatrix now considers split format (like in petsc). The way you re-compute a sparse matrix has also been improved. You have two main options: Either refill the matrix using the coo vectors (1), or using a sub-assembled matrix (2). A, cache = psparse(I,J,V,row_partition,col_partition;reuse=true) |> fetch
## modify V
psparse!(A,V,cache) |> wait A = psparse(I,J,V,fe_partition,fe_partition;assemble=false) |> fetch
I,J,V = (nothing,nothing,nothing) # You can destroy the coo vectors at this point
B, cacheB = assemble(A;reuse=true) |> fetch
## Modify the local values of A (this is like in any sequential FE code)
assemble!(B,A,cacheB) |> wait |
@fverdugo Thanks for the summary, I've had a look and I believe some of the issues have indeed been solved. However, I disagree on the following:
Maybe @amartinhuertas can correct me if I'm wrong, but my impression after the last discussion we had is that there is no way to match those two PRanges. |
After discussion, the following action points have been drafted:
|
Here are some notes on the issue:
Given these observations, we concluded the following:
LocalView
type wont be needed anymore.FECompatiblePSparseMatrix
, that containsThe text was updated successfully, but these errors were encountered: