-
Notifications
You must be signed in to change notification settings - Fork 53
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
Feature request: modify exising matrix #68
Comments
We're trying to encourage a more functional style so creating two matrices and adding them together is preferred:
or
Our intention (and belief) is that our compiler will eventually be able to fuse these together. We have some stuff in the pipeline that we think will lead to such advanced capabilities. To directly answer your question, there is no such syntax at the moment. We could add it as an extension if it's really needed to get the performance you seek, but we think it's not desirable longer term. |
This works fine if the matrix has the same sparsity pattern. I get segmentation fault if I try with different patterns. A typical scenario here is to assemble all interior terms (body forces) as one function call and all boundary terms (external forces) as a second function call. The boundary terms will not create any new non-zero entries in the global matrix, but rather be a lot more sparse, i.e. edge functions already create internal contributions in addition to their now edge contributions. The following code will cause a crash:
Interestingly if you swap the sum, i.e. |
Sorry if this functionality already exist, but I could not find it. Say I have two functions, which both should contribute to my system matrix and/or force vectors. Is it possible to chain these, so the second would be added to the results from the first, instead of just overwriting. In the example below I was hoping to get 3 along the diagonal, but I only get 2.
The text was updated successfully, but these errors were encountered: