Skip to content

Simplify implementation for vectors with scalar entries

Carsten Gräser requested to merge feature/simplify-scalar-entries into master

Using the new Impl::asVector() from dune-common we can get rid of

  • several Hybrid::isElse() constructions used to implement special cases for isNumber,
  • undefined behaviour invoked by toVector() due to the latter violating strict aliasing rules.

This also removed the dangerous toVector() methods. This is only a partial solution to #63 (closed). We also need to do the same for toMatrix() which requires an analogue Impl::asMatrix() function and a ScalarMatrixView wrapper class.

Edited by Oliver Sander

Merge request reports

Loading