Skip to content
Snippets Groups Projects

[DRAFT] relax consistency guarantees.

Open Christian Engwer requested to merge feature/less-guarantees-to-allow-multidomain into master

In order to support multi-domain spaces we relaxed the consistency guarantees between leaf-nodes and the corresponding finiteElement.

If node.size() == 0 accessing finiteElement is undefined behaviour and thus we skip nodes with size() == 0.

Currently this change only impacts the semantics, but leaves the interface unchanged. We should consider introducing a convenience function on the leaf-nodes that make the current now state explicit. Different possible names got proposed:

  • active
  • valid
  • hasFiniteElement
  • empty

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Since the method describes if calling finiteElement() is OK, hasFiniteElement() seems to be reasonable.

  • Could we also add these "guarantees" somewhere into the documentation of the interface? E.g. into the documentation of the finiteElement() method. We do not have contracts of something like this in c++20 to annotate a precondition, but maybe an assert(size() > 0) in the top of finiteElement() would also be documentation in code. I would guess, that this additional check does not lead to any performance costs.

Please register or sign in to reply
Loading