Generic finite element implementations rely on undefined behaviour

All 'generic' finite element implementations, i.e., those building up on the infrastructure in dune/localfunctions/utility/ make heavy use of reinterpret_cast breaking strict aliasing rules. As a consequence evaluation of the basis functions leads to undefined behaviour.

For those not aware of strict aliasing errors: A typical manifestation of this is, that optimized code may silently compute wrong numbers in special cases because the compiler makes wrong assumptions on when to sync register values with memory.

Assignee Loading
Time tracking Loading