Assembly produces erraneous results when mesh comes from csg Circle

Bug #1301252 reported by Andreas Hellander
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
New
Undecided
Unassigned

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)

Tags: circle csg mesh
Revision history for this message
Johannes Ring (johannr) wrote :

FEniCS no longer uses Launchpad for bug reports. Please consult the documentation on the FEniCS web page for where and how to (re)post your bug report: http://fenicsproject.org/support/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.