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

Using a solution to a PDE, to define another PDE - FEniCS

0 votes

I am currently trying to solve the Monge-Ampere equation in FEniCS, by implementing a non standard boundary condition.

The boundary condition, requires that the gradient of the solution must map the boundary of the original domain to another prescribed domain.

When the target domain is prescribed to be the unit circle, the implementation is quite simple, and I have tackled it by putting the following into my system:

+(dot(grad(uh),grad(uh))-1)*vh*ds\
where uh, is a trial function, and vh is a test function.

When considering a more complex target space, such as the square $[−1,1]\times[−1,1]$ things become more difficult, since it is not so simple to solve by hand, so my idea is to use the distance function.

To do this I have solved a stabilized version of the Eikonal Equation, who's solution is the signed distance function, then my idea was to replace (1) with:

+E(grad(uh))*vh*ds
Where E is the solution of the Eikonal equation, but when I try to implement this, I get an error, stating that the function expected scalar arguments,

Is there a way to programme the solution to accept grad(uh) as an input, in a second differential form?

Thank you all for your time!

asked Jul 15, 2014 by ellya FEniCS Novice (170 points)
edited Jul 16, 2014 by ellya

Hi Ellya, please use Latex and code formatting to make your question better readable.

Thank you for the comment Jan, what syntax do I use to do the code formatting?

http://fenicsproject.org/qa/49/how-does-one-use-mathjax-in-the-fenics-q&a-forum

have a look here... inline math is enclosed in $.

For code there is code block {} in the editor toolbar. Inline, you simply use backticks. `

...