Skip to content
Snippets Groups Projects
Commit e293909e authored by Simon Praetorius's avatar Simon Praetorius
Browse files

Rewrite the constructor of VirtualizedGF

parent f5a92da0
Branches
No related tags found
1 merge request!774Fix some issues with the VirtualizedGF in the python bindings
......@@ -27,7 +27,6 @@
#if HAVE_DUNE_VTK
#include <dune/vtk/gridfunctions/gridfunction.hh>
#include <dune/python/grid/pygridfunction.hh>
#endif
#include <dune/python/pybind11/numpy.h>
......@@ -173,7 +172,7 @@ namespace Dune
Python::IncludeFiles{"dune/vtk/gridfunctions/gridfunction.hh"});
vgfClass.first.def( pybind11::init( [] ( GridFunction &gf ) {
// TODO: perhaps grid functions should just have a name attribute in general
return new VirtualizedGF( pyGridFunction(gf), "tmp" );
return new VirtualizedGF( gf, Dune::Vtk::FieldInfo{"tmp"} );
} ) );
pybind11::implicitly_convertible<GridFunction,VirtualizedGF>();
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment