FluidityProject/fluidity — pull request #15 by stephankramer (2014-08-06 12:38:39+00:00)
Title: Remove get_active_nparts().

This routine worked out how many of the parallel partitions where active by
checking which ones are empty. This number was then used to decide how for
how many processes to write output (in vtus and meshes). This however puts a strict
requirement for meshes to only have empty partitions in trailing process numbers
which breaks in the case where some of the meshes only cover part of the domain. This
currently breaks the viscous free surface (f.s. + no_normal_stress) and checkpointing.

The functionality of get_active_nparts() was only really useful for flredecomp
when redecomposing to a smaller number of processes. In that case however,
we know exactly how many partitions we want so instead of automagically working this
number, it's much more robust to pass this information on as an optional argument.
Thus in this commit, vtk_write_fields(), write_mesh_files(), write_gmsh_file() and
write_triangle_files() and also checkpoint_simulation(), checkpoint_meshes() and
checkpoint_fields() all get an extra optional argument number_of_partitions, that
when provided only write out to the specified number of processes. The default is now
to always write all processes (including the empty ones).

This fixes a bug reported by Rhodri Davies.