Index: /proiecte/NBody/NBI/NBIparalel.c
===================================================================
--- /proiecte/NBody/NBI/NBIparalel.c	(revision 161)
+++ /proiecte/NBody/NBI/NBIparalel.c	(revision 162)
@@ -3,352 +3,4 @@
 #define CODENAME "NBI"
 #define VERSION	   "1"
-
-/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-			NBI 
-  A set of numerical integrators for the gravitational N-body problem.
-
-	(C) Copyright 1996 Ferenc Varadi.  All rights reserved.
-  This copyright notice is intended to prevent the commercial use of this code.
-  The code is free and can be freely distributed.
-  Do not remove this copyright notice unless you make changes in the code.
-  If you make changes in the code, add your name to the copyright notice.
-
-  The usual disclaimers apply, i.e., use the code at your own risk.
-  The author does not guarantee anything.
-
-  This code was developed by F. Varadi in collaboration
-  with M. Ghil, W. I. Newman, W. M. Kaula, K. Grazier, D. Goldstein 
-  and M. Lessnick. The partial financial support of NSF Grant 
-  ATM95-23787 (M. Ghil and F. Varadi) is gratefully acknowledged.
-
-  If you have any questions, suggestions etc., contact F. Varadi, 
-  e-mail: varadi@ucla.edu
-  WWW: http://www.atmos.ucla.edu/~varadi
-
- 
-  For the impatient: 
-	Save this file as NBI.c
-	Compile the code as
-	cc -o NBI NBI.c -lm
-
-	Download the sample input file NBIsampleinput and save it as 
-	NBIsampleinput.  It is an input file for the outer Solar System, with
-	the planets from Jupiter through Neptune based on the Jet Propulsion 
-	Laboratory's DE403 (Digital Ephemeris 403).  This was obtained 
-	from the ftp site navigator.jpl.nasa.gov, updates can be accessed 
-	there.
-
-	Run the code:
-	NBI NBIsampleinput
-	Take a look at the output in NBIsampleoutput and the log file 
-	NBIsampleoutput.log Change the MAXNBODIES macro, i.e., the 
-	maximum number of particles, to suit your needs.  It is set to 
-	2100 in this version.
-
-1) Description:
-	Four numerical integrators for the gravitational (nonrelativistic) 
-	N-body problem are bundled into a single source code. The N bodies 
-	are assumed to be point masses. Particles with zero mass are called
-	test particles; they are assumed not to influence each other and 
-	the particles with nonzero mass.
-
-	The integrators are:
-
-	a) A Wisdom-Holman-type mapping for hierarchical N-body systems.
-		Code name: HWH, maximum global order = 4
-	   This can deal with more general arrangements than the standard
-	   Wisdom-Holman mapping.  Hierarchical N-body systems are described
-	   by Roy (1988). These are represented in the code by binary trees.
-	   The integrator takes advantage of certain properties of 
-	   symplectic forms and Jacobi coordinates, these will be described
-	   in a paper (in preparation). We also use singularly weighted
-	   symplectic forms, these are discussed by Varadi et al. (1995).
-
-	b) A modified Cowell-Stormer integrator, with modifications by 
-	   W. I. Newman and his students. 
-		Code name: CSN, max global order = 15
-	   Note: (global order) = (local order) - 2 (Goldstein, 1996)
-
-	c) A Gragg-Bulirsch-Stoer integrator, as it is described by
-	   Hairer et al., (1993).
-		Code name: GBS, max order = 20 (max stage = 10)
-	IMPORTANT: The user has to specify the number of stages
-	in the input file and not the order. Order = 2*(number of stages),
-	see the Notes below.
-
-	d) A symplectic mapping with Kinetic-Potential energy splitting
-		Code name: SKP, max global order = 4 
-	   This is included for the sake of completeness.
-
-	
-2) References:
-	
-	Goldstein, D.: 1996, The Near-Optimality of Stormer
-	Methods for Long Time Integrations of y''=g(y), 
-	Ph.D. Dissertation, Univ. of California, Los Angeles,
-	Dept. of Mathematics
-
-	Hairer, E., Norsett, S. P. and Wanner, G.: 1993, 
-	Solving Ordinary Differential Equations I.  Nonstiff Problems.
-	Second Revised Edition
-	
-	Lessnick, M.: 1996, Stability Analysis of Symplectic
-	Integration Schemes, Ph.D. Dissertation, Univ. of California, 
-	Los Angeles, Dept. of Mathematics
-
-	Roy, A. E.: 1988, Orbital Motion, Institute of Physics
-	Publishing, Bristol
-	
-	Varadi, F. De la Barre, Kaula, W. M. and Ghil, M.: 1995,
-	Singularly Weighted Symplectic Forms and Applications to 
-	Asteroid Motion, Celestial Mechanics and Dynamical Astronomy,
-	vol. 62, pp. 23-41
-
-	Yoshida, H.: 1993, Recent Progress in The Theory and 
-	Application of Symplectic Integrators,
-	Celestial Mechanics and Dynamical Astronomy, vol. 56, pp. 27-43
-	
-	
-
-3) Notes
-	
-	All long-term integrations suffer from roundoff errors.
-	Symplectic schemes guarantee symplecticity for short 
-	integrations but they are not strictly symplectic
-	for very long integrations.  The implementation of 
-	the Wisdom-Holman mapping in this code was aimed at
-	reducing the effects of roundoff errors and thus make
-	the scheme as symplectic as possible.
-	
-	The Cowell-Stormer integrator, being a multistep
-	integrator, has to be intialized.  In theory, the starting 
-	points should be computed with machine precision. This
-	can be done using quadrupole precision arithmetic but
-	the Gragg-Bulirsch-Stoer scheme in double precision 
-	appers to be quite adequate. It should be noted that
-	the stability of the Cowell-Stormer scheme ensures
-	that initial errors do not grow due to computational
-	limitations (Goldstein, 1996).
-
-	In the case of the Gragg-Bulirsch-Stoer scheme one
-	specifies the number of stages k in the extrapolation
-	scheme. The order of the method is then 2*k.
-	This factor of 2 comes from the fact that the 
-	underlying method (Gragg's) has only even powers
-	of the step size in the expansion of the local error
-	(cf. Hairer et al., 1993, especially equation 9.22).
-
-	All integrators use only G*mass, there is no need for
-	the masses themselves nor the value of G.  Any set of units 
-	can be used:
-	distance_unit for position,
-	time_unit for time and step size,
-	distance_unit/time_unit for velocity.
-	E.g., one can use AU, day and AU/day as units.
-
-	None of the codes is regularized in any sense. We intend
-	to provide regularized code in the future. For the Wisdom-Holman 
-	mapping this involves changing the tree of Jacobian reference 
-	frames and dealing with the transition region accurately. 
-
-	In the case of the Wisdom-Holman mapping, the computation of 
-	acceleration differences between Jacobi and inertial coordinates 
-	could be improved in order to further reduce roundoff error.
-	These differences can be represented by multi-pole expansions
-	of the potential but we have not explored the details yet.
-
-	The present version of the integrator does not monitor error.
-
-	The choice of step size is up to the user. In most cases
-	one has to adjust the step size to the shortest orbital
-	period T in the system. The Wisdom-Holman mapping at second 
-	order is usually used with step size of T/10-T/100.
-	We recommend T/1000 for Cowell-Stormer integrator
-	since this renders the calculation EXACT to double
-	precision, even for high (e=0.5) eccentricities.
-	The cost of using this short time step is substantially
-	compensated by reduced computational complexity (as
- 	compared to the Wisdom-Holman mapping).  For much larger 
-	step sizes the integrator is not stable.
-
-	The Gragg-Bulirsch-Stoer method appears to be stable
-	for large orders and step sizes. For order 20 one can
-	even use T/5 as the step size and still get accurate results.
-	Since this is an accurate but compuationally very expensive
-	integrator, it is mainly used by us for short integrations.
-	We have not investigated the propagation of roundoff 
-	error in the GBS method.
-	
-
-4) How to compile:
-	Since there is only a single source file, it is very easy to 
-	compile the code with whatever C compiler is available. The 
-	code was compiled and tested on Sun SPARCstations (Solaris 2.5.1 
-	and earlier) and DEC Alpha workstations (Digital UNIX V3.2).
-	For instance, on the SPARCstations,
-	
-	cc -fast -xO5 -xdepend -o NBI NBI.c -lm
-
-	should work with Sun's C compiler.  The code uses only the standard 
-	C library, more exactly: I/O functions, exit, malloc and free for 
-	the tree, sqrt, cbrt, sin, cos, sinh, cosh.
-
-	Caution: optimization may introduce problems with some compilers 
-	and it is prudent to check the correctness of the optimized code 
-	by compiling without optimization, e.g., 
-	cc -g -o NBI_no_op NBI.c -lm
-	By comparing the output from NBI and NBI_no_op one can detect if 
-	the optimization leads to any problems.  (It should not but in 
-	practice the situation is not so clear.)
-
-	One also can play with various compiler switches which control 
-	roundoff but we have not explored these.
-
-5) How to run
-
-	NBI inputfile
-
-	(Everything has to be specified in inputfile.)
-
-6) On hierarchical N-body systems
-
-	We can give only a brief introduction into these; a detailed technical 
-	description is in preparation.  Our approach is somewhat different 
-	from that of Roy (1988). 
-
-	One starts with the concept of joining subsystems and applies this 
-	concept recursively to form new systems. When two subsystems are 
-	joined, the two subsystems are assumed to behave as point masses
-	and thus define the appropriate two-body problem for the Wisdom-Holman 
-	mapping. The subsystems are, in general, not point masses and one 
-	takes this into account in the perturbation step of the Wisdom-Holman 
-	mapping. 
-
-	Instead of a simple chain of Jacobi coordinates, the code uses a 
-	tree of Jacobi coordinates. This makes it possible to use the code
-	e.g., in situations when the massive particles have sattelites, either 
-	massive ones or not. It also reduces, when carefully specified, the 
-	integration error since more of the perturbations are absorbed into 
-	two-body interactions. The tree has to be specified in the input file.  
-	One can define this tree formally as it is processed by the code which 
-	works like a simple finite automaton but we did not use lex, yacc or 
-	any other compiler-compiler tools.
-
- Tree description rules:
- Rule 1) particles are indexed by consecutive natural numbers, from 1 to N,
- Rule 2) particles are subsystems,
- Rule 3) (x y) : join the subsystems x and y to create a new subsystem.,
- Rule 4) [i1 - i2] denotes a set of test particles, from index i1 to index i2,
-	which are treated the same way,
-     	Note: the space before and after - is necessary!
- Rule 5) ([i1 - i2] i3) is forbidden, use instead (i3 [i1 - i2]) 
-
- Example: 2000 main belt asteroids, from  6 to 2006, and
-	Sun, Jupiter, Saturn, Uranus and Neptune (1 - 5) 
-	can described as
- (((((1 [6 - 2006]) 2) 3) 4) 5)
-
- Another example for the tree specification when test particles between 
- Jupiter and Saturn are added with indeces from 6 to 1000 and another set 
- of test particles is added between Saturn and Uranus with indices from 
- 1001 to 2000. The indices for the massive bodies are:
- Sun 1, Jupiter, 2, Saturn 3, Uranus 4, Neptune 5.
-((((((1 2) [6 - 1000]) 3) [1001 - 2000]) 4) 5)
-
- Yet another example: the Sun, Earth, Moon, Jupiter and Io with indeces 
- 1,2,3,4 and 5, respectively, for which the tree is
- ((1 (2 3)) (4 5))
-
-
-7) Format of the input file
-Id method order step_size  total_integration_time printing_time 
-	number_of_particles
-
- tree_description
-
-GMs of particles, possibly zeros
-
-Initial conditions: x,y,z, vx, vy, vz
-
-Explanation:
-
-	Id is an arbitrary string which specifies the name of the experiment.
-
- 	Method can be SKP, HWH, CSN and GBS.
-
-	Tree_description is used only when the method is HWH or the HWH is used
-	to initialize CSN. One can put a dummy tree description of the form
-	(1 2)
-	in the input file when HWH is not used.  This will satisfy the parser 
-	which processes the tree description but will not play any role in the 
-	integration.
-
-
-Example: 
- For Sun, Jupiter, Saturn, Uranus and Neptune, 
- with indeces 1,2,3,4 and 5, in heliocentric coordinates.
-
-SomeId HWH 4 100.0 365.0e+4 1.0e+4 
-5
-((((1 2) 3) 4) 5)
-
-0.295912208285591095e-03   
-0.282534590952422643e-06  0.845971518568065874e-07  
-0.129202491678196939e-07   0.152435890078427628e-07  
-
-0.0 0.0 0.0 0.0 0.0 0.0
-
--0.538420940678015203e+01   -0.831247035699103631e+00 -0.225095848657298592e+00  
-0.109236311953937086e-02   -0.652329334256263223e-02 -0.282301443780311710e-02  
-
-0.788989169798583756e+01   0.459570785756998301e+01  0.155843220515231762e+01 
--0.321720261683698921e-02   0.433063255278440598e-02  0.192641782724487106e-02 
-
--0.182698980946940850e+02   -0.116271406901560681e+01 -0.250371938307287545e+00  
-0.221540447608191936e-03   -0.376765389967669917e-02 -0.165324449144407023e-02 
-
--0.160595376822070470e+02   -0.239429495784517528e+02 -0.940042953888094424e+01  
-0.264312302715172384e-02   -0.150349219713705076e-02 -0.681271071793930938e-03 
-
-
-There are 2 output files:
-	1) SomeId contains the actual integration data
-	2) SomeId.log contains a copy of the input data and error messages.
-	Some error messages might be sent to the standard output and the user 
-	has to redirect it in order to capture them.
-
-In the case of the Cowell-Stormer integrator, an additional file, SomeId.lerr 
-is created. This contains the LOCAL truncation error of the integration, 
-computed for each step but only printed for the last step in the printing 
-cycle. This also should help to determine the appropriate step size.
-
-The output is in the original coordinate system, i.e., inertial and not Jacobian.
-Output is produced when time is an integer multiple of the specified printing 
-time. The following is printed:
-time 	relative_change_in_total_energy relative_change_in_ang.mom.z.comp.
-after which
-x y z 
-dx dy dz 
-for each particle.
-
-
-9) The uset can change the code, of course. The section MAIN LOOP is where 
-   this can be done easily. You can insert code to do more things, e.g., 
-   detecting close approaches.
-
-10) MACROS TO GIVE SOME CONTROL OVER THINGS.
-Changes in the code that you can make HERE:
-	CHANGE the DIM macro to 2 for planar motions.
-	(Note: a variables dim is also used, easy to change
-		it everywhere to DIM. It is still better to keep
-		the Kepler solver in the more general 3-dimensional form.)
-	CHANGE the MAXNBODIES macro to whatever you want,
-		including test particles.
-
-**************** END OF DESCRIPTION ********************** */
-
-/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 	USER-CHANGEABLE MACROS    */
 
 /* dimension of physical space */
@@ -383,20 +35,6 @@
 
 
-/* VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV */
-
-/* 	The actual code.
-	Change things below this line at your own peril.
-	
- */
-
 /* MACROS TO DISTINGUISH BETWEEN TEST PARTICLES AND
    PARTICLES WITH FINITE MASS
-   You can add more types here, these values are stored
-	in tpstore for each particle
-   e.g., you could define stopped test particles,
-   but you have to change the code accordingly.
-   It is perhaps easier to add more integer arrays.
-   IMPORTANT: THE TREE MAINTAINS ITS OWN INTEGER ARRAYS
-   WHICH HOLD TEST PARTICLE INDICES. 
 */
 
Index: oiecte/NBody/NBI/NBIsampleoutput1
===================================================================
--- /proiecte/NBody/NBI/NBIsampleoutput1	(revision 161)
+++ 	(revision )
@@ -1,131 +1,0 @@
-0.000000000000   -0.0000000000000000e+00  0.0000000000000000e+00
-4.50417099317595e-03  7.62961724685589e-04  2.64217371485701e-04  
--2.68697979929186e-07  5.22529622296852e-06  2.24893094591555e-06  
--5.37970523578698e+00  -8.30484073974418e-01  -2.24831631285813e-01  
-1.09209442155944e-03  -6.51806804633966e-03  -2.82076550685720e-03  
-7.89439586897901e+00  4.59647081929467e+00  1.55869642252380e+00  
--3.21747131481692e-03  4.33585784900737e-03  1.92866675819079e-03  
--1.82653939237009e+01  -1.16195110729092e+00  -2.50107720935802e-01  
-2.21271749628263e-04  -3.76242860345373e-03  -1.65099556049815e-03  
--1.60550335112139e+01  -2.39421866167271e+01  -9.40016532150946e+00  
-2.64285432917179e-03  -1.49826690091408e-03  -6.79022140848015e-04  
-end of step, time = 100.000000
-100.000000000000   3.1833330095145376e-06  0.0000000000000000e+00
-4.43470163799496e-03  1.27881617027082e-03  4.87169548090825e-04  
--1.11650683486053e-06  5.07395274516697e-06  2.20235889538463e-06  
--5.22177706769564e+00  -1.47273457596714e+00  -5.03999255723156e-01  
-2.06158745571407e-03  -6.30740421968653e-03  -2.75409259857205e-03  
-7.55812238591514e+00  5.02121264801879e+00  1.74853560928254e+00  
--3.50631128748689e-03  4.15607858332428e-03  1.86684693053287e-03  
--1.82388583447985e+01  -1.53788291438590e+00  -4.15133513249719e-01  
-3.09408166782867e-04  -3.75590576521328e-03  -1.64938766719185e-03  
--1.57898995885472e+01  -2.40907383549782e+01  -9.46756680406041e+00  
-2.65977732482993e-03  -1.47274129942280e-03  -6.68995472394411e-04  
-end of step, time = 200.000000
-200.000000000000   5.6476979739305321e-06  0.0000000000000000e+00
-4.28193883600039e-03  1.77424193093240e-03  7.03157606181118e-04  
--1.93224968021170e-06  4.81733658902443e-06  2.10985689790137e-06  
--4.96861452881590e+00  -2.08812008838431e+00  -7.73972057404004e-01  
-2.99428784504893e-03  -5.98143590405836e-03  -2.63709446480907e-03  
-7.19349357674360e+00  5.42711437992709e+00  1.93181408062007e+00  
--3.78435266814374e-03  3.95913801957762e-03  1.79747667516786e-03  
--1.82035194244026e+01  -1.91307201387244e+00  -5.79958766677753e-01  
-3.97330571484281e-04  -3.74757557370095e-03  -1.64698516089011e-03  
--1.55230874357681e+01  -2.42367296075453e+01  -9.53396202565169e+00  
-2.67641863579295e-03  -1.44705762648138e-03  -6.58897094085098e-04  
-end of step, time = 300.000000
-300.000000000000   7.3865420854433705e-06  0.0000000000000000e+00
-4.04977926155266e-03  2.23891489506285e-03  9.07659296215067e-04  
--2.70217587368023e-06  4.45970140834114e-06  1.97292283353421e-06  
--4.62463967265561e+00  -2.66533079887110e+00  -1.02979398959264e+00  
-3.87539384423796e-03  -5.54478047979900e-03  -2.47138966745866e-03  
-6.80165661700951e+00  5.81248621792361e+00  2.10778477369029e+00  
--4.05025181993996e-03  3.74557987249766e-03  1.72072275087504e-03  
--1.81594009612966e+01  -2.28733802736740e+00  -7.44504142277774e-01  
-4.84991063077416e-04  -3.73744536956626e-03  -1.64379057782127e-03  
--1.52546253095784e+01  -2.43801446993267e+01  -9.59934386714829e+00  
-2.69277650197591e-03  -1.42121852563903e-03  -6.48728044142499e-04  
-end of step, time = 400.000000
-400.000000000000   8.4014629120944070e-06  2.0004763764791396e-16
-3.74347935687927e-03  2.66299423450318e-03  1.09632737559165e-03  
--3.41284209252147e-06  4.00646796653433e-06  1.79356273648099e-06  
--4.19573841296085e+00  -3.19358082974420e+00  -1.26669792167572e+00  
-4.69043198560084e-03  -5.00330847735433e-03  -2.25914196690840e-03  
-6.38389206250193e+00  6.17569787638520e+00  2.27571946621414e+00  
--4.30268655785009e-03  3.51605083979174e-03  1.63679536241057e-03  
--1.81065315285780e+01  -2.66050137086335e+00  -9.08690581368448e-01  
-5.72342063111074e-04  -3.72552369742407e-03  -1.63980698608947e-03  
--1.49845416413168e+01  -2.45209682203765e+01  -9.66370531359938e+00  
-2.70884919076286e-03  -1.39522665642566e-03  -6.38489368013643e-04  
-end of step, time = 500.000000
-500.000000000000   8.6976174731421496e-06  2.0004763764791396e-16
-3.36962366834482e-03  3.03724228814317e-03  1.26504180408840e-03  
--4.05113651632841e-06  3.46429285858795e-06  1.57432078829002e-06  
--3.68922655739975e+00  -3.66273688685910e+00  -1.48016161591597e+00  
-5.42528568466351e-03  -4.36421571732426e-03  -2.00309194416796e-03  
-5.94161116049950e+00  6.51518891608248e+00  2.43491315956388e+00  
--4.54036710216602e-03  3.27130114836189e-03  1.54594885686208e-03  
--1.80449444392974e+01  -3.03238337442468e+00  -1.07243935844040e+00  
-6.59336358016544e-04  -3.71182029159280e-03  -1.63503798003310e-03  
--1.47128650342026e+01  -2.46591850274917e+01  -9.72703945495643e+00  
-2.72463499717430e-03  -1.36908469412638e-03  -6.28182118282058e-04  
-end of step, time = 600.000000
-600.000000000000   8.2807943701113841e-06  2.0004763764791396e-16
-2.93608889801093e-03  3.35315278045891e-03  1.40996561078366e-03  
--4.60434235294456e-06  2.84116522490936e-06  1.31832226209558e-06  
--3.11381101924540e+00  -4.06345563725238e+00  -1.66596756357677e+00  
-6.06626517692627e-03  -3.63612441830140e-03  -1.70660204828907e-03  
-5.47635204349755e+00  6.82947907616276e+00  2.58468850866821e+00  
--4.76204745011304e-03  3.01218393305239e-03  1.44848195590137e-03  
--1.79746777078709e+01  -3.40280640038206e+00  -1.23567213346957e+00  
-7.45927140961730e-04  -3.69634606032894e-03  -1.62948767391305e-03  
--1.44396242605648e+01  -2.47947802457757e+01  -9.78933948678235e+00  
-2.74013224403298e-03  -1.34279532955478e-03  -6.17807354579075e-04  
-end of step, time = 700.000000
-700.000000000000   7.1564067508089714e-06  0.0000000000000000e+00
-2.45199913734639e-03  3.60308975067932e-03  1.52760556063849e-03  
--5.06025261559541e-06  2.14652251879342e-06  1.02932587695307e-06  
--2.47954144914123e+00  -4.38733226741861e+00  -1.82026784744986e+00  
-6.60023120894513e-03  -2.82920388460447e-03  -1.37371134751867e-03  
-4.98977477156768e+00  7.11717848187924e+00  2.72440025009881e+00  
--4.96653700255652e-03  2.73965335984200e-03  1.34473748055526e-03  
--1.78957740073504e+01  -3.77159395987703e+00  -1.39831100356664e+00  
-8.32068052806902e-04  -3.67911306860361e-03  -1.62316069494958e-03  
--1.41648482590527e+01  -2.49277392701806e+01  -9.85059871095189e+00  
-2.75533928212815e-03  -1.31636126882479e-03  -6.07366143494546e-04  
-end of step, time = 800.000000
-800.000000000000   5.3300551417616823e-06  0.0000000000000000e+00
-1.92766658849532e-03  3.78043852249901e-03  1.61487832898167e-03  
--5.40734736839962e-06  1.39137323430739e-06  7.11780652300366e-07  
--1.79774631779193e+00  -4.62706157647161e+00  -1.93965475682201e+00  
-7.01478417686661e-03  -1.95529808833808e-03  -1.00919483119124e-03  
-4.48365520688614e+00  7.37699759900516e+00  2.85343957575419e+00  
--5.15271226164252e-03  2.45476142740796e-03  1.23510153329619e-03  
--1.78082806226468e+01  -4.13857082761334e+00  -1.56027855389842e+00  
-9.17713222091436e-04  -3.66013451946995e-03  -1.61606217572835e-03  
--1.38885661318321e+01  -2.50580477670251e+01  -9.91081053634296e+00  
-2.77025449037808e-03  -1.28978523312122e-03  -5.96859558486974e-04  
-end of step, time = 900.000000
-900.000000000000   2.8090517521581794e-06  0.0000000000000000e+00
-1.37451102565442e-03  3.87976864822592e-03  1.66918231943803e-03  
--5.63504308914401e-06  5.88410657355560e-07  3.70880666697070e-07  
--1.08094638350058e+00  -4.77661149471615e+00  -2.02123728018911e+00  
-7.29852875779565e-03  -1.02804344201647e-03  -6.18620346692741e-04  
-3.95987772329120e+00  7.60775680054539e+00  2.97123839652598e+00  
--5.31952839775412e-03  2.15865340727430e-03  1.12000211235745e-03  
--1.77122493998059e+01  -4.50356315467677e+00  -1.72149790781927e+00  
-1.00281730398437e-03  -3.63942473407376e-03  -1.60819774599750e-03  
--1.36108071417633e+01  -2.51856916754904e+01  -9.96996847951898e+00  
-2.78487627599101e-03  -1.26306995846903e-03  -5.86288679793060e-04  
-end of step, time = 1000.000000
-1000.000000000000   -3.9565189531119833e-07  0.0000000000000000e+00
-8.04950420409227e-04  3.89700695119693e-03  1.68847450520941e-03  
--5.73402078130268e-06  -2.47902691920044e-07  1.26091677916143e-08  
--3.42737616773387e-01  -4.83140702164559e+00  -2.06272280903873e+00  
-7.44142091582259e-03  -6.29554642815864e-05  -2.08394209498509e-04  
-3.42042677457069e+00  7.80839540884993e+00  3.07727343840199e+00  
--5.46603047146411e-03  1.85256191272964e-03  9.99907145008186e-04  
--1.76077366914428e+01  -4.86639857929047e+00  -1.88189277615268e+00  
-1.08733551813521e-03  -3.61699913036238e-03  -1.59957352387901e-03  
--1.33316007095650e+01  -2.53106572090924e+01  -1.00280661654022e+01  
-2.79920307462434e-03  -1.23621819550115e-03  -5.75654594336657e-04  
Index: /proiecte/NBody/NBI/NBIserial.c
===================================================================
--- /proiecte/NBody/NBI/NBIserial.c	(revision 161)
+++ /proiecte/NBody/NBI/NBIserial.c	(revision 162)
@@ -3,352 +3,4 @@
 #define CODENAME "NBI"
 #define VERSION	   "1"
-
-/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-			NBI 
-  A set of numerical integrators for the gravitational N-body problem.
-
-	(C) Copyright 1996 Ferenc Varadi.  All rights reserved.
-  This copyright notice is intended to prevent the commercial use of this code.
-  The code is free and can be freely distributed.
-  Do not remove this copyright notice unless you make changes in the code.
-  If you make changes in the code, add your name to the copyright notice.
-
-  The usual disclaimers apply, i.e., use the code at your own risk.
-  The author does not guarantee anything.
-
-  This code was developed by F. Varadi in collaboration
-  with M. Ghil, W. I. Newman, W. M. Kaula, K. Grazier, D. Goldstein 
-  and M. Lessnick. The partial financial support of NSF Grant 
-  ATM95-23787 (M. Ghil and F. Varadi) is gratefully acknowledged.
-
-  If you have any questions, suggestions etc., contact F. Varadi, 
-  e-mail: varadi@ucla.edu
-  WWW: http://www.atmos.ucla.edu/~varadi
-
- 
-  For the impatient: 
-	Save this file as NBI.c
-	Compile the code as
-	cc -o NBI NBI.c -lm
-
-	Download the sample input file NBIsampleinput and save it as 
-	NBIsampleinput.  It is an input file for the outer Solar System, with
-	the planets from Jupiter through Neptune based on the Jet Propulsion 
-	Laboratory's DE403 (Digital Ephemeris 403).  This was obtained 
-	from the ftp site navigator.jpl.nasa.gov, updates can be accessed 
-	there.
-
-	Run the code:
-	NBI NBIsampleinput
-	Take a look at the output in NBIsampleoutput and the log file 
-	NBIsampleoutput.log Change the MAXNBODIES macro, i.e., the 
-	maximum number of particles, to suit your needs.  It is set to 
-	2100 in this version.
-
-1) Description:
-	Four numerical integrators for the gravitational (nonrelativistic) 
-	N-body problem are bundled into a single source code. The N bodies 
-	are assumed to be point masses. Particles with zero mass are called
-	test particles; they are assumed not to influence each other and 
-	the particles with nonzero mass.
-
-	The integrators are:
-
-	a) A Wisdom-Holman-type mapping for hierarchical N-body systems.
-		Code name: HWH, maximum global order = 4
-	   This can deal with more general arrangements than the standard
-	   Wisdom-Holman mapping.  Hierarchical N-body systems are described
-	   by Roy (1988). These are represented in the code by binary trees.
-	   The integrator takes advantage of certain properties of 
-	   symplectic forms and Jacobi coordinates, these will be described
-	   in a paper (in preparation). We also use singularly weighted
-	   symplectic forms, these are discussed by Varadi et al. (1995).
-
-	b) A modified Cowell-Stormer integrator, with modifications by 
-	   W. I. Newman and his students. 
-		Code name: CSN, max global order = 15
-	   Note: (global order) = (local order) - 2 (Goldstein, 1996)
-
-	c) A Gragg-Bulirsch-Stoer integrator, as it is described by
-	   Hairer et al., (1993).
-		Code name: GBS, max order = 20 (max stage = 10)
-	IMPORTANT: The user has to specify the number of stages
-	in the input file and not the order. Order = 2*(number of stages),
-	see the Notes below.
-
-	d) A symplectic mapping with Kinetic-Potential energy splitting
-		Code name: SKP, max global order = 4 
-	   This is included for the sake of completeness.
-
-	
-2) References:
-	
-	Goldstein, D.: 1996, The Near-Optimality of Stormer
-	Methods for Long Time Integrations of y''=g(y), 
-	Ph.D. Dissertation, Univ. of California, Los Angeles,
-	Dept. of Mathematics
-
-	Hairer, E., Norsett, S. P. and Wanner, G.: 1993, 
-	Solving Ordinary Differential Equations I.  Nonstiff Problems.
-	Second Revised Edition
-	
-	Lessnick, M.: 1996, Stability Analysis of Symplectic
-	Integration Schemes, Ph.D. Dissertation, Univ. of California, 
-	Los Angeles, Dept. of Mathematics
-
-	Roy, A. E.: 1988, Orbital Motion, Institute of Physics
-	Publishing, Bristol
-	
-	Varadi, F. De la Barre, Kaula, W. M. and Ghil, M.: 1995,
-	Singularly Weighted Symplectic Forms and Applications to 
-	Asteroid Motion, Celestial Mechanics and Dynamical Astronomy,
-	vol. 62, pp. 23-41
-
-	Yoshida, H.: 1993, Recent Progress in The Theory and 
-	Application of Symplectic Integrators,
-	Celestial Mechanics and Dynamical Astronomy, vol. 56, pp. 27-43
-	
-	
-
-3) Notes
-	
-	All long-term integrations suffer from roundoff errors.
-	Symplectic schemes guarantee symplecticity for short 
-	integrations but they are not strictly symplectic
-	for very long integrations.  The implementation of 
-	the Wisdom-Holman mapping in this code was aimed at
-	reducing the effects of roundoff errors and thus make
-	the scheme as symplectic as possible.
-	
-	The Cowell-Stormer integrator, being a multistep
-	integrator, has to be intialized.  In theory, the starting 
-	points should be computed with machine precision. This
-	can be done using quadrupole precision arithmetic but
-	the Gragg-Bulirsch-Stoer scheme in double precision 
-	appers to be quite adequate. It should be noted that
-	the stability of the Cowell-Stormer scheme ensures
-	that initial errors do not grow due to computational
-	limitations (Goldstein, 1996).
-
-	In the case of the Gragg-Bulirsch-Stoer scheme one
-	specifies the number of stages k in the extrapolation
-	scheme. The order of the method is then 2*k.
-	This factor of 2 comes from the fact that the 
-	underlying method (Gragg's) has only even powers
-	of the step size in the expansion of the local error
-	(cf. Hairer et al., 1993, especially equation 9.22).
-
-	All integrators use only G*mass, there is no need for
-	the masses themselves nor the value of G.  Any set of units 
-	can be used:
-	distance_unit for position,
-	time_unit for time and step size,
-	distance_unit/time_unit for velocity.
-	E.g., one can use AU, day and AU/day as units.
-
-	None of the codes is regularized in any sense. We intend
-	to provide regularized code in the future. For the Wisdom-Holman 
-	mapping this involves changing the tree of Jacobian reference 
-	frames and dealing with the transition region accurately. 
-
-	In the case of the Wisdom-Holman mapping, the computation of 
-	acceleration differences between Jacobi and inertial coordinates 
-	could be improved in order to further reduce roundoff error.
-	These differences can be represented by multi-pole expansions
-	of the potential but we have not explored the details yet.
-
-	The present version of the integrator does not monitor error.
-
-	The choice of step size is up to the user. In most cases
-	one has to adjust the step size to the shortest orbital
-	period T in the system. The Wisdom-Holman mapping at second 
-	order is usually used with step size of T/10-T/100.
-	We recommend T/1000 for Cowell-Stormer integrator
-	since this renders the calculation EXACT to double
-	precision, even for high (e=0.5) eccentricities.
-	The cost of using this short time step is substantially
-	compensated by reduced computational complexity (as
- 	compared to the Wisdom-Holman mapping).  For much larger 
-	step sizes the integrator is not stable.
-
-	The Gragg-Bulirsch-Stoer method appears to be stable
-	for large orders and step sizes. For order 20 one can
-	even use T/5 as the step size and still get accurate results.
-	Since this is an accurate but compuationally very expensive
-	integrator, it is mainly used by us for short integrations.
-	We have not investigated the propagation of roundoff 
-	error in the GBS method.
-	
-
-4) How to compile:
-	Since there is only a single source file, it is very easy to 
-	compile the code with whatever C compiler is available. The 
-	code was compiled and tested on Sun SPARCstations (Solaris 2.5.1 
-	and earlier) and DEC Alpha workstations (Digital UNIX V3.2).
-	For instance, on the SPARCstations,
-	
-	cc -fast -xO5 -xdepend -o NBI NBI.c -lm
-
-	should work with Sun's C compiler.  The code uses only the standard 
-	C library, more exactly: I/O functions, exit, malloc and free for 
-	the tree, sqrt, cbrt, sin, cos, sinh, cosh.
-
-	Caution: optimization may introduce problems with some compilers 
-	and it is prudent to check the correctness of the optimized code 
-	by compiling without optimization, e.g., 
-	cc -g -o NBI_no_op NBI.c -lm
-	By comparing the output from NBI and NBI_no_op one can detect if 
-	the optimization leads to any problems.  (It should not but in 
-	practice the situation is not so clear.)
-
-	One also can play with various compiler switches which control 
-	roundoff but we have not explored these.
-
-5) How to run
-
-	NBI inputfile
-
-	(Everything has to be specified in inputfile.)
-
-6) On hierarchical N-body systems
-
-	We can give only a brief introduction into these; a detailed technical 
-	description is in preparation.  Our approach is somewhat different 
-	from that of Roy (1988). 
-
-	One starts with the concept of joining subsystems and applies this 
-	concept recursively to form new systems. When two subsystems are 
-	joined, the two subsystems are assumed to behave as point masses
-	and thus define the appropriate two-body problem for the Wisdom-Holman 
-	mapping. The subsystems are, in general, not point masses and one 
-	takes this into account in the perturbation step of the Wisdom-Holman 
-	mapping. 
-
-	Instead of a simple chain of Jacobi coordinates, the code uses a 
-	tree of Jacobi coordinates. This makes it possible to use the code
-	e.g., in situations when the massive particles have sattelites, either 
-	massive ones or not. It also reduces, when carefully specified, the 
-	integration error since more of the perturbations are absorbed into 
-	two-body interactions. The tree has to be specified in the input file.  
-	One can define this tree formally as it is processed by the code which 
-	works like a simple finite automaton but we did not use lex, yacc or 
-	any other compiler-compiler tools.
-
- Tree description rules:
- Rule 1) particles are indexed by consecutive natural numbers, from 1 to N,
- Rule 2) particles are subsystems,
- Rule 3) (x y) : join the subsystems x and y to create a new subsystem.,
- Rule 4) [i1 - i2] denotes a set of test particles, from index i1 to index i2,
-	which are treated the same way,
-     	Note: the space before and after - is necessary!
- Rule 5) ([i1 - i2] i3) is forbidden, use instead (i3 [i1 - i2]) 
-
- Example: 2000 main belt asteroids, from  6 to 2006, and
-	Sun, Jupiter, Saturn, Uranus and Neptune (1 - 5) 
-	can described as
- (((((1 [6 - 2006]) 2) 3) 4) 5)
-
- Another example for the tree specification when test particles between 
- Jupiter and Saturn are added with indeces from 6 to 1000 and another set 
- of test particles is added between Saturn and Uranus with indices from 
- 1001 to 2000. The indices for the massive bodies are:
- Sun 1, Jupiter, 2, Saturn 3, Uranus 4, Neptune 5.
-((((((1 2) [6 - 1000]) 3) [1001 - 2000]) 4) 5)
-
- Yet another example: the Sun, Earth, Moon, Jupiter and Io with indeces 
- 1,2,3,4 and 5, respectively, for which the tree is
- ((1 (2 3)) (4 5))
-
-
-7) Format of the input file
-Id method order step_size  total_integration_time printing_time 
-	number_of_particles
-
- tree_description
-
-GMs of particles, possibly zeros
-
-Initial conditions: x,y,z, vx, vy, vz
-
-Explanation:
-
-	Id is an arbitrary string which specifies the name of the experiment.
-
- 	Method can be SKP, HWH, CSN and GBS.
-
-	Tree_description is used only when the method is HWH or the HWH is used
-	to initialize CSN. One can put a dummy tree description of the form
-	(1 2)
-	in the input file when HWH is not used.  This will satisfy the parser 
-	which processes the tree description but will not play any role in the 
-	integration.
-
-
-Example: 
- For Sun, Jupiter, Saturn, Uranus and Neptune, 
- with indeces 1,2,3,4 and 5, in heliocentric coordinates.
-
-SomeId HWH 4 100.0 365.0e+4 1.0e+4 
-5
-((((1 2) 3) 4) 5)
-
-0.295912208285591095e-03   
-0.282534590952422643e-06  0.845971518568065874e-07  
-0.129202491678196939e-07   0.152435890078427628e-07  
-
-0.0 0.0 0.0 0.0 0.0 0.0
-
--0.538420940678015203e+01   -0.831247035699103631e+00 -0.225095848657298592e+00  
-0.109236311953937086e-02   -0.652329334256263223e-02 -0.282301443780311710e-02  
-
-0.788989169798583756e+01   0.459570785756998301e+01  0.155843220515231762e+01 
--0.321720261683698921e-02   0.433063255278440598e-02  0.192641782724487106e-02 
-
--0.182698980946940850e+02   -0.116271406901560681e+01 -0.250371938307287545e+00  
-0.221540447608191936e-03   -0.376765389967669917e-02 -0.165324449144407023e-02 
-
--0.160595376822070470e+02   -0.239429495784517528e+02 -0.940042953888094424e+01  
-0.264312302715172384e-02   -0.150349219713705076e-02 -0.681271071793930938e-03 
-
-
-There are 2 output files:
-	1) SomeId contains the actual integration data
-	2) SomeId.log contains a copy of the input data and error messages.
-	Some error messages might be sent to the standard output and the user 
-	has to redirect it in order to capture them.
-
-In the case of the Cowell-Stormer integrator, an additional file, SomeId.lerr 
-is created. This contains the LOCAL truncation error of the integration, 
-computed for each step but only printed for the last step in the printing 
-cycle. This also should help to determine the appropriate step size.
-
-The output is in the original coordinate system, i.e., inertial and not Jacobian.
-Output is produced when time is an integer multiple of the specified printing 
-time. The following is printed:
-time 	relative_change_in_total_energy relative_change_in_ang.mom.z.comp.
-after which
-x y z 
-dx dy dz 
-for each particle.
-
-
-9) The uset can change the code, of course. The section MAIN LOOP is where 
-   this can be done easily. You can insert code to do more things, e.g., 
-   detecting close approaches.
-
-10) MACROS TO GIVE SOME CONTROL OVER THINGS.
-Changes in the code that you can make HERE:
-	CHANGE the DIM macro to 2 for planar motions.
-	(Note: a variables dim is also used, easy to change
-		it everywhere to DIM. It is still better to keep
-		the Kepler solver in the more general 3-dimensional form.)
-	CHANGE the MAXNBODIES macro to whatever you want,
-		including test particles.
-
-**************** END OF DESCRIPTION ********************** */
-
-/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 	USER-CHANGEABLE MACROS    */
 
 /* dimension of physical space */
@@ -381,23 +33,4 @@
 /* cange this line accordingly */
 EXSEQBUL
-
-
-/* VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV */
-
-/* 	The actual code.
-	Change things below this line at your own peril.
-	
- */
-
-/* MACROS TO DISTINGUISH BETWEEN TEST PARTICLES AND
-   PARTICLES WITH FINITE MASS
-   You can add more types here, these values are stored
-	in tpstore for each particle
-   e.g., you could define stopped test particles,
-   but you have to change the code accordingly.
-   It is perhaps easier to add more integer arrays.
-   IMPORTANT: THE TREE MAINTAINS ITS OWN INTEGER ARRAYS
-   WHICH HOLD TEST PARTICLE INDICES. 
-*/
 
 #define NOTTESTPARTICLE		1
Index: oiecte/NBody/NBI/scr.sh
===================================================================
--- /proiecte/NBody/NBI/scr.sh	(revision 161)
+++ 	(revision )
@@ -1,6 +1,0 @@
-set THREADS=$1
-set SCHED=$2
-export OMP_NUM_THREADS=$THREADS
-export OMP_SCHEDULE=$SCHED
-echo $SCHED $THREADS
-./NBIparalel NBIsampleinput
Index: /proiecte/NBody/NBI/scr_paralel.sh
===================================================================
--- /proiecte/NBody/NBI/scr_paralel.sh	(revision 162)
+++ /proiecte/NBody/NBI/scr_paralel.sh	(revision 162)
@@ -0,0 +1,6 @@
+set THREADS=$1
+set SCHED=$2
+setenv OMP_NUM_THREADS $THREADS
+setenv OMP_SCHEDULE $SCHED
+echo $SCHED $THREADS
+~valentina.sandulescu/NBI/NBIparalel ~valentina.sandulescu/NBI/NBIsampleinput
