Good evening,
i'm having problems using the new mshr module. Before the updating my code
worked, then i've had troubles with the mesh generator. I've fixed the
problem with the mesh, but my code isn't still working well. A minimal part
of my program is:

from dolfin import *
from mshr import *
geom=Rectangle(dolfin.Point(0.0,0.0),dolfin.Point(16.0,11.0))
mesh=generate_mesh(geom,100,"cgal")
V=FunctionSpace(mesh,'Lagrange',1)
class Boundary(SubDomain):
        def inside(self,x,on_boundary):
            return near(x[0],0.0)

boundary=Boundary()
bc=DirichletBC(V,Constant('0.0'),boundary)
u=TrialFunction(V)
v=TestFunction(V)
f=Constant('0.0')
a=(inner(nabla_grad(u),nabla_grad(v))+u*v)*dx
L=f*v*dx
u=Function(V)

problem=LinearVariationalProblem(a,L,u,bc)
solver=LinearVariationalSolver(problem)
solver.solve()

After running this code i receive this warning:
*** Warning: Found no facets matching domain for boundary condition.
 and the solution is not exact

the syntax for the boundary conditions is copied from the fenics tutorial,
that has not been updated, and i've not found useful code in mshr demos.
Please can you help me to fix my problem?
Thank you for support
_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to