Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

freeze.C

Go to the documentation of this file.
00001 
00006 
00007 //   version 1:  Dec 1992   Piet Hut
00008 //               Oct 2001   Steve McMIllan
00009 
00010 #include "dyn.h"
00011 
00012 #ifdef TOOLBOX
00013 
00014 local void freeze(dyn * b, real fac)
00015 {
00016     for_all_daughters(dyn, b, bi)
00017         bi->scale_vel(fac);
00018 }
00019 
00020 main(int argc, char ** argv)
00021 {
00022     bool  c_flag = FALSE;
00023     char  *comment;
00024     real fac = 0;
00025 
00026     check_help();
00027 
00028     extern char *poptarg;
00029     int c;
00030     char* param_string = "c:f:";
00031 
00032     while ((c = pgetopt(argc, argv, param_string)) != -1)
00033         switch(c) {
00034 
00035             case 'c': c_flag = TRUE;
00036                       comment = poptarg;
00037                       break;
00038             case 'f': fac = atof(poptarg);
00039                       break;
00040             case '?': params_to_usage(cerr, argv[0], param_string);
00041                       get_help();
00042                       exit(1);
00043         }            
00044 
00045     dyn *b;
00046 
00047     while (b = get_dyn(cin)) {
00048         if (c_flag == TRUE)
00049             b->log_comment(comment);
00050         b->log_history(argc, argv);
00051 
00052         freeze(b, fac);
00053         put_dyn(cout, *b);      
00054         rmtree(b);
00055     }
00056 }
00057 
00058 #endif
00059 
00060 // endof: freeze.C

Generated at Sun Feb 24 09:57:00 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001