Skip to content

Feature/remove nodeindexset

Carsten Gräser requested to merge feature/remove-nodeindexset into master

This implements PreBasis::indices(node,iterator) and deprecates the use of PreBases only providing this via a NodeIndexSet. See #61 (closed) for a discussion of the proposal.

To be precise this MR implements the following:

  • In DefaultLocalView: Add support for the interface. Support for the old one persists for transition.
  • In DefaultGlobalBasis: Deprecate using PreBasis classes which do not implement the new interface.
  • Provide Impl::DefaultNodeIndexSet which allows to implement the old interface in terms of the new one to stay compatible for a transition period.
  • In any PreBasis: Implement new interface, replace custom NodeIndexSet by Impl::DefaultNodeIndexSet.
  • Provide a fallback method Impl::preBasisIndices that mimics the new interface in term of the old one if the new one was not implemented already. Using this may come with a performance penalty.
  • In (Power|Composite|TransformedIndex)PreBasis: Use Impl::preBasisIndices to access indices of wrapped prebases.
  • Deprecate PreBasis::(makeIndexSet|IndexSet) and all internal transition utilities listed above.
  • Allow either the new or the old interface in the PreBasis concept.

The risk of a performance impact is IMO acceptable, since it may only happen in the unlikely case that all of the conditions apply:

  • One uses a custom PreBasis not contained in dune-functions.
  • This PreBasis does not yet implement the new interface.
  • This PreBasis is wrapped in a (Power|Composite|TransformedIndex)PreBasis
  • Either the stored data or the bind method of PreBasis::NodeIndexSet are nontrivial.
Edited by Carsten Gräser

Merge request reports