Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/benchmarks/todo/bh/README
ViewVC logotype

Annotation of /sml/trunk/benchmarks/todo/bh/README

Parent Directory Parent Directory | Revision Log Revision Log


Revision 193 - (view) (download)

1 : monnier 193 Basic SML version of the hierachical N-body problem (Barnes-Hut),
2 :     adapted from the C version.
3 :    
4 :     Load the BarnesHut structure as follows:
5 :    
6 :     use "random.sml";
7 :     use "bhmath.sml";
8 :     use "bhutil.sml";
9 :     use "bh.sml";
10 :    
11 :     To run it on the Plummer model, evaluate
12 :     (BarnesHut.testit n)
13 :     where n is the number of bodies. (n=128 is a good value.)
14 :    
15 :     Currently, no "body" interface is provided, i.e., it's not possible to
16 :     load a set of bodies from a file nor are final positions, velocities, etc.
17 :     reported.
18 :    
19 :    
20 :    
21 :     README file for the C version:
22 :     ---------------------------------------------------------------------------
23 :     January 3 1991
24 :    
25 :     This is the third release of the hierarchical N-body program. The
26 :     algorithm used to compute gravitational forces has asymptotic complexity of
27 :     O(N log N). This is achieved by building a tree structure to represent the
28 :     mass distribution and estimating forces by a partial recursive descent of this
29 :     tree. See "A Hierarchical O(N log N) Force Calculation Algorithm", by Joshua
30 :     Barnes and Piet Hut, Nature, 324, 446, and "Error Analysis of a Tree Code", by
31 :     Joshua Barnes and Piet Hut, Astrophysical Journal Supplement, 70, 389, for
32 :     more information.
33 :    
34 :     This version includes several improvements on version one. At the cost of
35 :     3 real numbers per particle, used to remember the acceleration from the last
36 :     step, the leap-frog integrator has been reorganized so as to synchronize
37 :     positions and velocities at the end of each step; this makes the control and
38 :     output procedures simpler. Tree construction has been recast as an iterative
39 :     rather than recursive procedure, again reducing the complexity. Last but not
40 :     least, Lars Hernquist has implemented quadrupole corrections for body-cell
41 :     interactions, much improving the accuracy of the method; see "Performance
42 :     Characteristics of Tree Codes", by Lars Hernquist, Astrophysical Journal
43 :     Supplement, 64, 715.
44 :    
45 :     The source files for our tree code have been bundled together for ease of
46 :     distribution. On a UNIX system, you can split this file simply by invoking
47 :     the Bourne shell on it (use the sh command). On other systems, you may have
48 :     to edit this file and split it up by hand; note that file X is delimited by
49 :     lines containing the message End of X. Once you have split this file, you can
50 :     compile it by running make on a UNIX system (NOTE: on a CRAY, you must first
51 :     uncomment the Makefile line defining CFLAGS = -DCRAY). On other systems, you
52 :     will have to figure out how to run the C compiler; take a look at the Makefile
53 :     for hints. Running the program with the default input parameters (type a <CR>
54 :     to all prompts) will start a short calculation with a few particles to test
55 :     things out.
56 :    
57 :     These sources include a few files which you may find generally useful:
58 :     "stdinc.h", a standard include file with common definitions, "vectmath.h", a
59 :     set of macros for elementary vector and matrix operations, "getparam.c", a
60 :     simple, standardized user interface, and "util.c", some miscellaneous
61 :     utilities. These are part of a large collection of software for numerical
62 :     experiments with gravitating systems.
63 :    
64 :     We offer NO WARRANTY on the software supplied here -- use it at your own
65 :     risk. We impose NO RESTRICTIONS on use and distribution of our code -- you
66 :     are free to use this software for any application, modify it in any way, use
67 :     pieces in other programs, and give it away to anyone else. We encourage you
68 :     to extend these rights to others who receive this software from you (in this
69 :     we follow the philosophy and intentions of the Free Software Foundation). We
70 :     would appreciate a brief acknowledgement in any scientific papers you write
71 :     using our code, and we would also like to receive preprints of such papers.
72 :     To avoid placing lengthy copyright notices in each file, we simply state that
73 :     "It's free because it's yours".
74 :    
75 :     Have fun and stay in touch.
76 :    
77 :     Joshua E. Barnes
78 :    
79 :     Institute for Astronomy
80 :     University of Hawaii
81 :     2680 Woodlawn Drive
82 :     Honolulu, Hawaii 96822
83 :    
84 :     (808) 956-8138
85 :    
86 :     barnes@zeno.ifa.hawaii.edu
87 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0