Erroneous output when tdim != gdim for compute_vertex_values on RT
See https://bitbucket.org/fenics-project/dolfin/issue/75
FFC generates code for compute_vertex_values() which is the wrong dimension when tdim != gdim (at least for RT elements). See example in dolfin issue #75.
Comments (12)
-
-
reporter Sure, I am no expert on FFC/FIAT - and my patch was just a result of messing around to find something that sort of works (!) I know it is not right....
-
- changed status to resolved
Fix issue 10.
interpolate_vertex_values for elements where reference and physical value size is different. The fix will not extend to mixed elements, e.g. RT*DG0 on a manifold will likely fail.
→ <<cset b97e2b3689a6>>
-
For the record, there are probably more issues with this code for uncommon combinations such as mixed and fancy elements on manifolds. I added a safeguard in this particular code that should detect if the same problem pops up with another combo.
-
I had to make another fix to pass the tests: when the safeguard fails, interpolate_vertex_values is generated to throw an exception instead of failing at runtime. This will happen e.g. with a RT1*DG0 mixed element on a manifold (see the interpolate_vertex_values implementations in ProjectionManifold.h). Fixing this looks a bit trickier (because of code organization), I have no plans to do so.
-
@dnarnold found another failing case.
@martinal, shouldn't this issue be reopened as it was not fixed properly?
-
I'll take a look at the various manifolds issues first chance I get.
-- Marie
-
- changed status to open
This doesn't seem to be appropriately fixed
-
-
assigned issue to
-
assigned issue to
-
The original issue (DOLFIN issue 75, which was marked resolved, but was definitely still failing) now has a fix in DOLFIN next. I'll resolve this when that fix has graduated to master.
-
For completeness here: @martinal, FIAT should build an element of dimension tdim (topological dimension) as the reference element does not need to know about the geometrical dimension of the physical element. I'm not sure what the fixes made in the fall were (and I'm not sure if I want to ...)
-
- changed status to resolved
Fixed by DOLFIN commit:
commit 6c190f56177e767169ad2b80bfc5e7573f0dd3cf Author: Marie E. Rognes meg@simula.no Date: Tue Mar 25 22:21:06 2014 +0100
Fix various, highly dubious, cell_orientation bugs.
- Log in to comment
I think the bug is somewhere in this behaviour in fiatinterface.py:
Note how gdim is lost through cellname2dim[cell.cellname()] and FIAT builds a pure 2D RT element. Now the value size of element is 2 instead of 3 which results in the bug you tried to fix with your patch. I'm not sure what the proper solution is.