Rapid integration on finite elements
Dear all,
I need to evaluate inner products between many finite element
functions rapidly. Let's write
f(x) = \sum_i a_i \phi_i(x)
g(x) = \sum_i b_i \phi_i(x)
We now want to quickly compute the L2-inner product \int dx f(x) g(x).
With Deal.II, I would compute the exact L2-inner product by a sparse
vector-
the mass matrix (or overlap matrix):
\int dx f(x) g(x) = \sum_{i,j} a_i b_j \int dx \phi_i(x) \phi_j(x)
Due to the sparsity of M, this is an O(Ndof)-operation. However, when
doing the same using Dolfin (C++), this is an incredibly slow
operation that seems to scale as O(n^2), i.e. as a dense matrix-vector
product. This becomes unusable even for moderate sized finite element
meshes. I cannot access the sparsity pattern of a matrix, so I also
dont't see how to implement the operation myself.
I get the feeling that this is not the "blessed" way to go about this
with FEniCS/Dolfin, and would appreciate your input on this: How does
one compute L1 (\int dx f(x)) and L2 (\int dx f(x) g(x)) integrals for
finite element functions when using Dolfin - efficiently and
accurately?
Thanks very, very much in advance for your help!
Best regards,
James
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Garth Wells
- Solved:
- Last query:
- Last reply: