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

Alternative to div(arg) for solving nonlinear PDE using derivative

0 votes

When using the following method to solve a nonlinear PDE

J = derivative(F, w)
solve(F == 0, w, J=J)

Instead of using div(arg) for a 1D problem I have used (arg).dx(0) as suggested by Miro Kutcha.

Is there another alternative for this (besides writing it term by term) that can work in higher dimensions?

asked Apr 18, 2017 by alexmm FEniCS User (4,240 points)

1 Answer

+1 vote

dx(0) means you are doing this integral in domain "0".
For 1D problem you have to specify it in your mesh.

If you are using div(arg) you will assemble everything and make your solver to do all.

I recommend you open div(arg), if it is possible. For example if your arg is $\nabla u$ you should use Divergent Theorem.

answered May 6, 2017 by LeoCosta FEniCS User (1,190 points)
...