FFC

volume/radius giving wrong results?

Bug #1088918 reported by Marie Rognes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FFC
Invalid
Undecided
Unassigned

Bug Description

I'm puzzled: I would expect

from dolfin import *
mesh = UnitIntervalMesh(3)
volume = mesh.ufl_cell().volume
radius = mesh.ufl_cell().circumradius
print "volume = ", assemble(volume*dx, mesh=mesh)
print "radius = ", assemble(radius*dx, mesh=mesh)

to return 1.0 (in both cases). I do however get 1.0/3.

Can anyone reproduce? If yes, is my expectation wrong or
is really volume/circumradius wrong in FFC?

Revision history for this message
Martin Sandve Alnæs (martinal) wrote :

The volume of each cell is 1/3, and integrating 1/3 over the unit interval yields 1/3. Sounds about right to me.

Revision history for this message
Kristian B. Ølgaard (k.b.oelgaard) wrote : Re: [Bug 1088918] Re: volume/radius giving wrong results?

Yes, I can confirm this as I spent a day hunting down this 'bug' :)

Kristian

On 11 December 2012 15:38, Martin Sandve Alnæs
<email address hidden> wrote:
> The volume of each cell is 1/3, and integrating 1/3 over the unit
> interval yields 1/3. Sounds about right to me.
>
> --
> You received this bug notification because you are a member of FFC Core
> Team, which is subscribed to FFC.
> https://bugs.launchpad.net/bugs/1088918
>
> Title:
> volume/radius giving wrong results?
>
> Status in FEniCS Form Compiler:
> New
>
> Bug description:
> I'm puzzled: I would expect
>
> from dolfin import *
> mesh = UnitIntervalMesh(3)
> volume = mesh.ufl_cell().volume
> radius = mesh.ufl_cell().circumradius
> print "volume = ", assemble(volume*dx, mesh=mesh)
> print "radius = ", assemble(radius*dx, mesh=mesh)
>
> to return 1.0 (in both cases). I do however get 1.0/3.
>
> Can anyone reproduce? If yes, is my expectation wrong or
> is really volume/circumradius wrong in FFC?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ffc/+bug/1088918/+subscriptions

Revision history for this message
Marie Rognes (meg-simula) wrote :

Aaah... , thanks!

Changed in ffc:
status: New → Invalid
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.