I have an integral kernel operator term in my PDE.
$$\widetilde{K}\psi(x)= [\int (a(x')*\psi(x')) dx'] * c(x) = \epsilon * \psi(x)$$.
The stiffness matrix of this integral kernel operator is a dense matrix.
I can't find a way to do the matrix assembly on this term directly by FEniCS. Thus I want to write a subroutine to do the integral for the stiffness matrix of this operator separately.
My plan is:
1. use FEniCS to get the stiffness matrix for other terms of my PDE.
2. use my subroutine to get the stiffness matrix of this kernel opertor.
3. use "add" function of FEniCS Matrix function, to add 2 into 1.
I find the data structure of FEniCS Matrix is CSR, and it seems strange to use CSR for a dense matrix (It is takes even more space than a common matrix data structure). How do you think about it? Also I feel worried about the efficiency of step 3, will that be very time consuming?