diff --git a/scripts/openmc-track-to-vtk b/scripts/openmc-track-to-vtk index a2dca34e1..65b92345d 100755 --- a/scripts/openmc-track-to-vtk +++ b/scripts/openmc-track-to-vtk @@ -44,7 +44,7 @@ def main(): if not (fname.endswith('.h5') or fname.endswith('.binary')): raise ValueError("Input file names must either end with '.h5' or" "'.binary'.") - + # Make sure that the output filename ends with '.pvtp'. if not args.out: args.out = 'tracks.pvtp' @@ -75,21 +75,21 @@ def main(): n_points = coords.shape[0] for i in range(n_points): points.InsertNextPoint(coords[i,:]) - + # Create VTK line and assign points to line. line = vtk.vtkPolyLine() line.GetPointIds().SetNumberOfIds(n_points) for i in range(n_points): line.GetPointIds().SetId(i, point_offset+i) - + cells.InsertNextCell(line) point_offset += n_points data = vtk.vtkPolyData() data.SetPoints(points) data.SetLines(cells) - + writer = vtk.vtkXMLPPolyDataWriter() - writer.SetInput(data) + writer.SetInputData(data) writer.SetFileName(args.out) writer.Write() diff --git a/scripts/openmc-voxel-to-silovtk b/scripts/openmc-voxel-to-silovtk index 18488e1c0..668c2594a 100755 --- a/scripts/openmc-voxel-to-silovtk +++ b/scripts/openmc-voxel-to-silovtk @@ -62,7 +62,7 @@ def main(file_, o): grid.GetCellData().AddArray(data) writer = vtk.vtkXMLImageDataWriter() - writer.SetInput(grid) + writer.SetInputData(grid) if not o.output[-4:] == ".vti": o.output += ".vti" writer.SetFileName(o.output) writer.Write() diff --git a/src/fixed_source.F90 b/src/fixed_source.F90 index 78ae3d5a7..7db6d58fa 100644 --- a/src/fixed_source.F90 +++ b/src/fixed_source.F90 @@ -126,7 +126,7 @@ contains if (master) call check_triggers() #ifdef MPI call MPI_BCAST(satisfy_triggers, 1, MPI_LOGICAL, 0, & - MPI_COMM_WORLD, mpi_err) + MPI_COMM_WORLD, mpi_err) #endif if (satisfy_triggers .or. & (trigger_on .and. current_batch == n_max_batches)) then @@ -157,6 +157,9 @@ contains ! Copy source attributes to the particle call copy_source_attributes(p, source_site) + ! Determine whether to create track file + if (write_all_tracks) p % write_track = .true. + end subroutine sample_source_particle end module fixed_source