Hello,
I’m solving the Maxwell equations, in Maxwell equations, there is a Gauss law:
so I need to calculate the error regarding the Gauss law, in DOLFINX, I can easily do:
abs(div(E)-rho)*dx
but the term E is usually defined in some curl space, so div(E)
is not well-posed and I can not calculate it in the strong form, then I would like to calculate the gauss error in the weak form, like:
abs(E*div(v)+rho*v)*dx
where v is the test function.
But it seems like the function abs can not be used when I have the test function in the form, and I got the error:
raise ArityMismatch("Applying nonlinear operator {0} to expression depending on form argument {1}.".format(o._ufl_class_.__name__, t))
ufl.algorithms.check_arities.ArityMismatch: Applying nonlinear operator Abs to expression depending on form argument v_0.
Does anyone know what I could do in this case?
Thanks!