Skip to content

Fix fixed size ordering detection

There is a bug in the code that detects whether a function space that doesn't claim to be fixed size is actually fixed size: While the code correctly detects if the number of DOFs associated with different entities of one GeometryType takes on different positive values, it fails to detect the case where that number alternates between a fixed positive number and 0.

Fixed by adding an additional check. Note that this will still fail to detect one very niche case: If all but the very last cell in the grid traversal associate 0 DOFs with entities of a given GeometryType, and the last cell has an entity with a positive number of DOFs, the space will still be flagged as const size. However, this is very expensive to detect because we would have to track whether we have actually seen entities of that GeometryType before (there might only be a single entity of that type, think hybrid meshes), so we just leave that as a tolerable risk in there.

The merge request also adds a test for this problem that was originally written by @andreas.nuessing for #59 (closed). Thanks for providing a fully working test case, that really helped with the problem!

This fixes #59 (closed).

Merge request reports

Loading