Inconsistent use of PrimitiveStorage inside VTKOutput class
at some point we should make our use of the PrimitiveStorage inside VTKOutput more consistent. Currently we pass a PrimitiveStorage to the object in its constructor. However, internally that get's used sometimes, but e.g. not in writeP1() or writeP2(). The latter ask the first of the functions to export for its PrimitiveStorage. This can of course lead to consistency issues, see e.g. this snippet from
auto p1 = std::make_shared< P1Function< real_t > >( "p1", storage2, minLevel, maxLevel ); VTKOutput vtkOutput( "../../output", "interpolate_test", storage ); vtkOutput.add( *p1 );
Also we implicitely assume that all functions that we add in order to write to the same VTK file use the same PrimitiveStorage.
Maybe we should make
add() check whether the functions have the same storage as the one passed in the constructor?