Thank you very much for your response.
Could you please explain this with some example code? Do you mean assembling the matrices and vectors of a == L
separately and then combining them into a complete linear system? For example:
A11 = assemble(inner(grad(u), grad(v))*dx)
A12 = assemble(-p*div(v)*dx)
A21 = assemble(q*div(u)*dx)
A22 = assemble(Constant(0)*p*q*dx)
b1 = assemble(dot(Constant((0, 1)), v)*dx + dot(u0, v)*dx)
However, a warning message will also appear when assembling b1
:
*** Warning: assemble() with forms involving integrands belonging to different meshes might be inappropriate.
If you are using MeshView, please use assemble_mixed() instead
In the code, I intend to use u0
to represent any function from another mesh, which may appear in some iterations related to moving meshes. The mesh0
can also be any mesh, not necessarily a copy of mesh
. The code above is a MWE of the issue I’m encountering. How should I modify my code to make it run successfully?
Even if I replace assemble_mixed_system(a == L, sol, bc)
with solve(a == L, sol, bc)
, I still get an error message about
RuntimeError: Cannot find common parent mesh
I noticed that legacy DOLFIN seemed to have some major fixes last year, and the above code runs successfully in the version of fenics-dolfin: 2019.2.0.dev0
but throws an error in the version of fenics-dolfin: 2019.2.0.64.dev0
. Could this issue be related to the latest updates in legacy FEniCS?