Assembly produces erraneous results when mesh comes from csg Circle

Issue #284 wontfix
Andreas Hellander created an issue

Bug description: When assembling the stiffness matrix for a mesh created with dolfin.Circle, the resulting matrix contains huge values (for radius 1) or even "nan" (for radius different from 1). Here is an example that will reproduce the problem. Visually, the mesh looks fine with no apparent very bad elements.

This error started to appear after I upgraded to Dolfin 1.3.0 and I have confirmed this behaviour on OSX 10.8 and Linux Mint Maya (Ubuntu). Here is a the test I ran


import dolfin dolfin.parameters["linear_algebra_backend"] = "uBLAS"

import numpy

c = dolfin.Circle(0,0,1) mesh = dolfin.Mesh(c,20)

function_space = dolfin.FunctionSpace(mesh,"Lagrange",1) trial_function = dolfin.TrialFunction(function_space) test_function = dolfin.TestFunction(function_space)

form = dolfin.inner(dolfin.nabla_grad(trial_function), dolfin.nabla_grad(test_function))*dolfin.dx K = dolfin.assemble(form) rows, cols, vals = K.data() print numpy.max(vals)

Comments (3)

  1. Benjamin Dam Kehlet

    Do you have the development version of dolfin available? If yes, could you check with that. I suspect this is due to a bug that occasionally caused degenerate cells in 2D. The bug was reported and fixed after the release of 1.3.0.

  2. Bartlomiej Siudeja

    I was working on an eigenvalue problem on a large polygonal domain, and I was getting many internal LAPACK errors in the eigensolver. Though not at all consistently. E.g. Polygon(points,n) would work for n=500 or n=520, but not n=510. At the same time rectangular domain is always OK.

    I have access to FEniCS 1.2.0 on my older computer (slow). I generated the same meshes on this one, saved as xml files and run the eigensolver on imported meshes in FEniCS 1.3.0. Never any errors. Hence this does seem like a problem with mesh generation in 1.3.0.

    Unfortunately, I have no access to development version to check if this is solved there. At this point I am alternating between my computers, until OS X 10.9 snapshot or a new version is available and I can generate meshes in 1.3.0.

  3. Log in to comment