This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Defining u_z = u_xx+u_yy

–1 vote

I have a 3D domain ( a box) , on which I'm trying to solve the following PDE

$
u_z = u_{xx} + u_{yy}
$

All FeniCS demos use a PDE, which has the full Laplace operator $\Delta u$ or the full gradient $\nabla u$ in it, and in my example I need to separate all variables, because I take fist derivative with respect to $z$ , and second derivatives with respect to the other variables $x$ and $y$.

How do I define in Fenics derivatives with respect to ${x,y,z}$ separately ?

I mean I would like to code something like

inner(xderivative(u), v) * dx
inner(yderivative(u), yderivative(v)) * dx

asked Feb 16, 2016 by jaco FEniCS Novice (110 points)
edited Feb 23, 2016 by jaco

You need to show that you've done due diligence in first looking at demos, and then ask a specific FEniCS question. You'll then be more likely to get an answer.

Ok, I modified the question a bit, I cannot find in any of the demos what I need.

2 Answers

0 votes

Maybe you should take a look at this, section 5.6. and create your own operator.
http://fenicsproject.org/pub/documents/ffc/ffc-user-manual/ffc-user-manual.pdf

answered Mar 1, 2016 by PEdBoscs FEniCS Novice (170 points)
+1 vote

xderivative(u) = u.dx(0)
yderivative(u) = u.dx(1)
and so on ..

answered Mar 2, 2016 by Kent-Andre Mardal FEniCS Expert (14,380 points)
...