Hi Alex,
Thanks for your feedback on the mixed-dimensional branch.
I ran your MWE and was able to reproduce the error you got.
As mentioned in your comment, the problem comes from the coupling term :
F_a_couple = - f * va * dxa(0) - ub * va * dxa(1)
The form is decomposed depending on the matrix block they belong to, and the assembler iterates overs the entities defined by the given Measure.
In the subform -ub*va*dxa(1)
, we iterate over the cells of the parent mesh.
Since ub
is defined on a submesh, the assembler uses the mapping built by MeshView
to get the appropriate cell index. But there are cells in mesh_full
that are not in mesh_mid
, for which it cannot find the index in the mapping (the subdomain_data
argument is not used at that point).
That’s why you get an “Out of range” error.
We assume that the integration mesh embedded in the Measure is the “smallest” one.
In your example, dxa(1)
is equivalent to dxb
(since mesh_mid
is built from the cells marked with 1
), but the assembler will iterate only over the submesh cells.
Then, using
F_a_couple = - f * va * dxa(0) - ub * va * dxb
should fix your problem.