Hello!
I was trying to use assemble_system
at the same time as using multiple subdomains and I was getting the following error:
*** Warning: Bilinear and linear forms do not have same cell_domains subdomains in SystemAssembler. Taking cell_domains subdomains from bilinear form
so I took the demo_subdomains-poisson.py that FEniCS offers, modifying just the way of solving the system, to do it now with assemble_system
,
# Define new measures associated with the interior domains and exterior boundaries
dx = Measure("dx")[domains]
ds = Measure("ds")[boundaries]
# Define variational form
F = (inner(a0*grad(u), grad(v))*dx(0) + inner(a1*grad(u), grad(v))*dx(1)
- g_L*v*ds(1) - g_R*v*ds(3)
- f*v*dx(0) - f*v*dx(1))
# Separate left and right hand sides of equation
a, L = lhs(F), rhs(F)
# Solve problem
A = assemble(a)
b = assemble(L)
A, b = assemble_system(a, L, bcs)
u = Function(V)
solve(A, u.vector(), b)
and I still get the same message. Why is that not possible?
Thank you in advance!