Replies: 2 comments 8 replies
-
I think the difference is in when we assemble the two things. When we have a I expect that one could optimise |
Beta Was this translation helpful? Give feedback.
0 replies
-
It seems the following already exhibits memory leak:
|
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I encountered a result that raised some questions. Let me summarise this:
In the code below,
q_s
is aCofunction
added on the right-hand side (RHS) of the equation. I executed two tests:Test 1: The code is implemented exactly as shown, with the Confunction
q_s
directly included in the RHS.Test 2: I first transform
q_s
into its Riesz representation usingq_s = q_s.riesz_representation()
. I then rewriteF
as:F = time_term + a - q_s * v * dx
and set up the problem aslin_var = LinearVariationalProblem(lhs(F), rhs(F), u_np1)
Both approaches should solve the same system. However, I noticed differences in runtime and memory usage between the two implementations, as illustrated in the figure below. Is this difference in performance expected? Could this behavior indicate a bug or an inefficiency in how the system handles
Cofunction
compared to its Riesz representation?Beta Was this translation helpful? Give feedback.
All reactions