Dear all,
I am trying to apply the ideas of the "Avoid Assembly" paragraph from the "Time-Dependent problems" tutorial to speed up a slightly more complicated problem.
One of the form I would like to pre-assemble looks like the following:
mesh = RectangleMesh (0, 0, 1, 1, 10, 10)
V = VectorFunctionSpace(mesh, "CG", 1)
g = Function(V)
u = TrialFunction(V)
v = TestFunction(V)
a = inner(g, u)*inner(g, v)*dx
A = assemble(a)
The values of the function g
is changing at each iteration of the computation. So the assembly is done from zero at every iteration. Is there a way to assemble a matrix (or several) that would be multiplied by g
to get A
so that the repeated assembly of A
can be avoided ?