On Wed, 13 Nov 2013 12:24:01 +0000
Achim Schroll <[email protected]> wrote:

> My version of the adaptivity prototype code from the 2010 Rognes and
> Logg paper "Automated goal-oriented error control I" results in a
> segmentation fault error:
> 
> Generating forms required for error control, this may take some
> time... Solving variational problem adaptively
> Adaptive iteration 0
>   Solving linear variational problem.
> Segmentation fault: 11
> Python quit unexpectedly while using the libdolfin.1.2.dylib plug-in.
> 
> Is that a coding issue or is my installation not working properly?
> I am running fenics 1.2.0 on OS X 10.8.5 with Xcode 5.0.2
> Below is the code.
> 
> Best, Achim
> 
> 
> from dolfin import *
> 
> 
> mesh = UnitSquareMesh(4, 4)
> 
> V = FunctionSpace(mesh , "CG", 1)
> 
> u = TrialFunction(V)
> 
> v = TestFunction(V)
> 
> u_h = Function(V)
> 
> 
> a = dot(grad (u), grad (v))*dx
> 
> L = v*dx
> 
> 
> def boundary (x):
> 
>     return x[0] < 1E-14
> 
> 
> bc = DirichletBC(V, Constant (0.0), boundary)
> 
> 
> M = u*dx

Hi,

you should do rather

  M = u_h*dx

There is an issue (even in development version) that segfault happens
instead of a meaningful error message. I will report it.

Jan

> 
> solve(a == L, u_h, bcs=bc, tol=1e-3, M=M)

_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to