This HTML automatically generated with rman for NEMO
Table of Contents

Name

snapsort - sort particles of an N-body snapshot

Synopsis

snapsort in=in_file out=out_file [parameter=value] ...

Description

snapsort sorts the bodies of a snapshot by a user-specified ranking. Optionally, a different sort engine can be invoked.

Parameters

The following parameters are recognized.
in=in_file
Input data is read from in_file, which must be in snapshot(5NEMO) format. Default: required.
out=out_file
Sorted output data is written to out_file. No default.
rank=body_rank
Expression used to compute the rank of each body. See bodytrans(1NEMO) for the form of body_rank. Default: etot.
times=time_range
Only frames within time_range will be sorted. Default: all.
sort=sort_engine
Select the sort engine to use. Sorry, no minimum match here. If the code has been compiled with standard the flogger software (see $NEMO/usr/lib/sort), a number of sort engines are available (see below). Else, only the standard qsort(3) is available. Default: [qsort].

Sort Engines

The default UNIX engine qsort (a quick sort) is always available. If your friendly NEMO manager has compiled in a number of additional ones, the following list may be a complete one: (to get your current local list, run snapsort with debug=1, which will display the names it’s trying. Use some foolish name for sort= to get it to display all of them, and then fail.
  sort=    comments
  qsort           Standard UNIX sqort(3)
  bubble          any 1st semester course in CS
  heap         contributed by der Mouse
  insert     insertion sort, any 1st semester course in CS
  merge         roughly patterned after Knuth Vol. 3
  quick           C.A.R. Hoare’s recursive sort as given in K&R 2 pg 87
  shell           D.L. Shell as given in K&R 2 pg 62

See Also

snapshot(5NEMO) , qsort(3)

msort(1)

Author

Joshua E. Barnes.

Files

~src/nbody/trans/snapsort.c    program code ~usr/lib/sort/*_sort.c    additional sort routines;

History


2-jun-88    V1.0 original version          JEB
21-dec-92    V1.4 selectable sort engine (sort=)    PJT


Table of Contents