# Solving a problem with only Neumann boundary conditions

Dear all

I'm trying to solve the following problem:

-d/dx(du/dx) - (du/dx)^3 = 0 on 0 < x < 1

subject to the following bcs:

@ x= 0: du/dx + u = 3/sqrt(2)

@ x = 1: du/dx = 0.5

I have in my ufl file:

L = inner(grad(v), grad(u))*dx - v*( (u.dx(0))**3 )*dx - v*((1.5*

I assume that ufl doesn't know about the boundaries, so in main.cpp, I have marked them like so:

MeshFunction<

LeftNeumannBou

boundaryL.

RightNeumannBo

boundaryR.

The problem is how to use the VariationalProblem class. It requires the dirichlet bc, the cell_domains, the interior and exterior_

How can I use VariationalProblem without specifying the dirichlet bc?

Thanks

Jack

## Question information

- Language:
- English Edit question

- Status:
- Solved

- For:
- DOLFIN Edit question

- Assignee:
- No assignee Edit question

- Solved by:
- Johan Hake

- Solved:
- 2010-03-28

- Last query:
- 2010-03-28

- Last reply:
- 2010-03-28

Johan Hake (johan-hake) said : | #1 |

On Saturday March 27 2010 05:54:46 Jack wrote:

> New question #105698 on DOLFIN:

> https:/

>

> Dear all

>

> I'm trying to solve the following problem:

>

> -d/dx(du/dx) - (du/dx)^3 = 0 on 0 < x < 1

>

> subject to the following bcs:

>

> @ x= 0: du/dx + u = 3/sqrt(2)

> @ x = 1: du/dx = 0.5

>

> I have in my ufl file:

> L = inner(grad(v), grad(u))*dx - v*( (u.dx(0))**3 )*dx -

> v*((1.5*

>

> I assume that ufl doesn't know about the boundaries, so in main.cpp, I have

> marked them like so: MeshFunction<

> mesh.topology(

>

> LeftNeumannBoundary boundaryL;

> boundaryL.

>

> RightNeumannBou

> boundaryR.

>

> The problem is how to use the VariationalProblem class. It requires the

> dirichlet bc, the cell_domains, the interior and exterior_

Just pass boundaries as exterior_

correct forms at the marked boundaries.

Johan

> How can I use VariationalProblem without specifying the dirichlet bc?

>

> Thanks

>

> Jack

Jack (attacking-chess) said : | #2 |

Thanks Johan Hake, that solved my question.

Jack

I might be wrong but shouldn't that first BC be in the bilinear form rather than the linear?

Tom