### Solution discontinuous over subdomains (continuous solution needed)

Hi everyone,

I'm working on a magnetic field simulation with the code attached below and I'm getting very strange results.

The 3D-geometry is divided into various subdomains, some of which have currents inducing the field. The solution should be a continuous function over the whole geometry, first for the vector potential A, then for its curl B. Unfortunately, that's not what I get. The PDE-solution A is computed as constant where $L\ne0$`L`≠0, and as zero everywhere else (where L = 0). So it has discontinuities on each of the subdomain boundaries. It looks as if the solution was computed for each subdomain separately, instead of connecting all the conditions to one field.

My guess would be that something is wrong with the integration measures, but I have no idea what. What's especially confusing is that the (probably) exact same approach worked fine on a 2D model. I'd really appreciate any help finding out what's wrong here. Thanks in advance.

P. S. Don't be surprised because I split up all the vectors - that's to get a better overview over the components while working and looking for the error. I've had the same problem with the vectorial formulation.

Sorry, I posted before adding the code. This is it: