Beispiel #1
0
void free_tree_table(enum Valid_TreeTypes my_TreeType)
{
  int n;

  for(n = NOUT - 1; n >= 0; n--)
    myfree(TreeNgals[n]);

  myfree(TreeFirstHalo);
  myfree(TreeNHalos);
	
  // Don't forget to free the open file handle

  switch (my_TreeType)
  {
#ifdef HDF5
    case genesis_lhalo_hdf5:
      close_hdf5_file();
      break;
#endif
      
    case lhalo_binary:
      close_binary_file();
      break;

    default:
      fprintf(stderr, "Your tree type has not been included in the switch statement for ``load_tree_table`` in ``core_io_tree.c``.\n");
      fprintf(stderr, "Please add it there.\n");
      ABORT(EXIT_FAILURE);

  }

}
Beispiel #2
0
void close_hdf5_file_(int *iun)
{
  /* Fortran interface to the function "close_hdf5_file".
     We add an underscore at the end of the function name. */

     close_hdf5_file(iun);
}