It is not possible to assemble (at least a matrix) with EquationBC boundary conditions through the "front door" assemble interface:
from firedrake import *
mesh = UnitSquareMesh(2, 2)
V = FunctionSpace(mesh, "CG", 1)
u = TrialFunction(V)
v = TestFunction(V)
a = - dot(grad(v), grad(u)) * dx
g = Function(V).assign(1)
e2 = as_vector([0., 1.])
a1 = (-dot(grad(v), e2) * dot(grad(u), e2) + v * u) * ds(1)
L1 = Constant(0) * v * ds(1)
bbc = DirichletBC(V, g, ((1, 3), (1, 4)))
u = Function(V)
bc1 = EquationBC(a1 == L1, u, 1, bcs=[bbc])
assemble(a, bcs=bc1)
=> AttributeError: 'Matrix' object has no attribute 'dat'
assemble(a, bcs=[bc1])
=> AttributeError: 'EquationBC' object has no attribute 'integrals'
If one is not supposed to use equation bcs like this, we need a proper error. I notice this because I am refactoring assembly in preparation for insertion into mixed dats/matrices directly (as an option). The equation bcs stuff is such a rat's nest, I have no confidence in my correctness.
It is not possible to assemble (at least a matrix) with
EquationBCboundary conditions through the "front door"assembleinterface:If one is not supposed to use equation bcs like this, we need a proper error. I notice this because I am refactoring assembly in preparation for insertion into mixed dats/matrices directly (as an option). The equation bcs stuff is such a rat's nest, I have no confidence in my correctness.