x = SpatialCoordinate(mesh)
u_D = -((pow(x[0],2)-pow(x[1],2))*x[2])/12
and I want to plug it into errornorm like this
errornorm(u_D, u, 'H1')
where u is the solution to some PDE.
Unfortunately, as it stands, u_D is an object of type ufl.algebra.Division, and errornorm complains that
AttributeError: 'Division' object has no attribute 'ufl_element'
so I am trying to convert this u_D into anything that can be used into errornorm.
I tried assembling the error manually but I get numerical instabilities; I know I can use Expression but I was advised to avoid it.
Is there any way I can convert my u_D in something I can use in errornorm?
I’m using 2019.1.0.
Now, as it’s customary in computer science, I pasted your code and it worked. Then I tried again the code I posted above, just the way it was, and now it worked. This totally eludes my comprehension XD
Now that I looked silly enough, I can go back to it.
I saw UMFPACK running out of memory at some point so it’s gonna be a fun day.
Thank you very much for your help, both! I would mark both your messages as “Solution” but I can only mark one, apparently.