RuntimeError: std::bad_array_new_length

Hi all, I’m trying to get a vtk file to visualise the surface neutron spectra tally on my blanket. I’m using a surface mesh filter, since this seems to be the only way to get a vtk file - however I ran into the error in the title. I’ve ran the simulation using a simple surface filter, foregoing the mesh, and there’s no problem, but as soon as I try to use a mesh this happens.

This issue was mentioned here - but this related to a build/compilation issue. Since I’m running in the neutronics workshop docker container, this shouldn’t be a problem for me. I’d appreciate any pointers, thanks.

neutron_surface_spectra (1).py (12.3 KB)

We can write any mesh tallies to vtk files. Perhaps take a peak at this example as it writes out a 3d regular mesh tally result to a vtk file. So I would expect the tally you are writing to a vtk to have a MeshFilter.

The write_data_to_vtk method doesn’t actually know where the data comes from so it doesn’t check. But the intention is that it should be used for mesh tallies.