Skip to content
Snippets Groups Projects
Forked from agnumpde / dune-fufem
Source project has a limited visibility.
  • Ansgar Burchardt's avatar
    c6360609
    VTKBasisGridFunction: do not check size in constructor · c6360609
    Ansgar Burchardt authored
    With a Dune::VTKSequenceWriter I would like to have code like
    
        Vector x;
        VTKSequenceWriter<...> writer(...);
        VTKBasisGridFunction<...> function(..., x, ...);
        writer.addVertexData(function);
    
        for (int i = 0; i < level; ++i) {
            ... // refine grid, solve PDE, change size of x
            writer.write(static_cast<double>(i));
        }
    
    As the size of "x" is only correct in the for-loop, it cannot be checked
    when constructing the "writer". However the "function" needs to be setup
    outside the loop as well. So the VTKBasisGridFunction constructor should
    not check the size of "x".
    c6360609
    History
    VTKBasisGridFunction: do not check size in constructor
    Ansgar Burchardt authored
    With a Dune::VTKSequenceWriter I would like to have code like
    
        Vector x;
        VTKSequenceWriter<...> writer(...);
        VTKBasisGridFunction<...> function(..., x, ...);
        writer.addVertexData(function);
    
        for (int i = 0; i < level; ++i) {
            ... // refine grid, solve PDE, change size of x
            writer.write(static_cast<double>(i));
        }
    
    As the size of "x" is only correct in the for-loop, it cannot be checked
    when constructing the "writer". However the "function" needs to be setup
    outside the loop as well. So the VTKBasisGridFunction constructor should
    not check the size of "x".
Code owners
Assign users and groups as approvers for specific file changes. Learn more.