CellSize(mesh) looks wrong in 1D
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
FFC |
Fix Released
|
Critical
|
Unassigned |
Bug Description
I am writing some testing code for stabilisation methods (SU and the like) and need the size of the cells therefore. I thought in 1D the CellSize would be the size of the elements, i.e. 1/N if I have N equally sized elements; the same as the CellVolume. However, there is a factor of 2 between those and I don't know why. The documentation is unfortunately rather "sparse" on this issue. Can you please explain to me what CellSize exactly returns? Also in higher dimensions? Thanks a lot.
Here is some sample code, showing the issue:
In [10]: mesh=UnitInterv
*** -------
*** Warning: UnitInterval has been deprecated in DOLFIN version 1.1.0.
*** The class UnitInterval has been replaced by UnitIntervalMesh.
*** -------
In [11]: assemble(
Out[11]: 0.1
In [12]: assemble(
Out[12]: 0.2
Changed in dolfin: | |
status: | New → Confirmed |
importance: | Undecided → Critical |
affects: | dolfin → ffc |
Changed in ffc: | |
status: | Confirmed → Fix Committed |
Changed in ffc: | |
milestone: | none → 1.2.0 |
Changed in ffc: | |
status: | Fix Committed → Fix Released |
Looks like a problem in ffc/codesnippets.py - should circumradius be divided by 2?