Page 1 of 1

### Custom / Composite Matrix Assembly

Posted: 07 Jan 2022, 14:24
Hi!
I'm a bit stuck on a programming task. I would like to solve a system Ax=b using Elmer, where A = B+C*D, where B and C can be assembled as finite element matrices, but D is a dense matrix.
It is not really a problem to write routines to assemble each of the individual matrices, but I am stuck on fitting it into the existing Elmer structure. My main questions are:
• Is something like this possible with the usual Elmer linear solvers? My concern is the matrix A would be dense and possibly have a bad condition number.
• How could I allocate and access additional FE matrices (i.e. B and C) to assemble them with FE routines?
• How could I do the final step of accessing all three assembled matrices to compute the total matrix A?
I would be very thankful for any help or ideas!

### Re: Custom / Composite Matrix Assembly

Posted: 30 Jun 2023, 13:22
Hi,

Thank you for the post. I wish to answer this question, however I might need some additional research from my end to put down the answer. Thank you again.