On Saturday March 27 2010 05:54:46 Jack wrote: > New question #105698 on DOLFIN: > https://answers.launchpad.net/dolfin/+question/105698 > > 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*sqrt(2)-u))*ds(0) - v*(0.5)*ds(1) > > I assume that ufl doesn't know about the boundaries, so in main.cpp, I have > marked them like so: MeshFunction<dolfin::uint> boundaries(mesh, > mesh.topology().dim()-1); > > LeftNeumannBoundary boundaryL; > boundaryL.mark(boundaries, 0); > > RightNeumannBoundary boundaryR; > boundaryR.mark(boundaries, 1); > > The problem is how to use the VariationalProblem class. It requires the > dirichlet bc, the cell_domains, the interior and exterior_facet_domains.
Just pass boundaries as exterior_facet_domains and DOLFIN will assemble the correct forms at the marked boundaries. Johan > How can I use VariationalProblem without specifying the dirichlet bc? > > Thanks > > Jack _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

