Hello Fenics pros,
In Fenics it is easily possible to impose boundary conditions to spaces.
But I need something more.
Solving the Problem
$$(\mu^{-1} curl(a),curl(v))=(j,v)$$
requires that $$a\in H_0(curl)\cap H(div^0)$$
That is, a gauging condition is applied. a is a vector potential and not unique up to an integration constant, which is a gradient. So we need to gauge the problem and need to impose div(a)=0 (the $H(div^0)$ part ) for the whole domain.
Can this be done in Fenics?
(For my specific purpose it does not suffice to add this constraint with a Lagrange multiplier. If someone needs to know why, I will explain.)
Getting an answer would be of great help. Thanks
Edit
The problem above is the primal formulation which gives us the vector potential $a$ as main variable and $b(=\mu h)$ is obtained by postprocessing, thus loosing some regularity.
So, to solve this very problem we introduce a Lagrange multiplier to "get $div(a)=0$ into the equation". Then we have
$$
(\mu^{-1}curl(a),curl(v))+(a,grad(psi))=(j,v)
$$
$$
(v,grad(phi))=0
$$
But what I need is $b$ as the primal variable (it only needs to be multiplied by $\mu^{-1}$ to obtain $h$). The goal is to obtain a $h$ that satisfies $curl(h)=j_q$ everywhere in the domain ($j_q$ is now a projected version).
Therefore I would like to solve the mixed formulation:
$$
(\mu h,h')-(curl(a),h')=0
$$
$$
(curl(h),v)=(j,v)
$$
$v,h'$ being the testfunctions, seeking $a,h$.
Now imposing $div(a)=0$ I have no working theory how this could be done.
If I had the possibility to impose it in the spaces, this formulation might work, but since this is not possible I don't know how to approach this formulation to obtain a $h$ with the required regularity.
I hope this explains it, is this clear?
A hint on how to impose div(a)=0 by a Lagrange multiplier to the mixed formulation would be equally helpful. I have been searching the web for this a long time...