Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

sys_stats.C

Go to the documentation of this file.
00001 
00002        //=======================================================//    _\|/_
00003       //  __  _____           ___                    ___       //      /|\ ~
00004      //  /      |      ^     |   \  |         ^     |   \     //          _\|/_
00005     //   \__    |     / \    |___/  |        / \    |___/    //            /|\ ~
00006    //       \   |    /___\   |  \   |       /___\   |   \   // _\|/_
00007   //     ___/   |   /     \  |   \  |____  /     \  |___/  //   /|\ ~
00008  //                                                       //            _\|/_
00009 //=======================================================//              /|\ ~
00010 
00011 // The help information below is copied directly from the dyn version.
00012 // The only difference between this program and the dyn version is that
00013 // possible GRAPE and dstar extensions are used here.
00014 
00057 
00058 #include "hdyn.h"
00059 
00060 #ifdef TOOLBOX
00061 
00062 #include "../evolve/kira_grape_include.C"       // GRAPE-specific functions:
00063                                                 // Invoke by setting USE_GRAPE
00064                                                 // at compilation time.
00065 
00066 // Main code follows dyn/util/sys_stats.C version.
00067 
00068 main(int argc, char **argv)
00069 {
00070     check_help();
00071 
00072     bool binaries, long_binary_output, B_flag, verbose, out, n_sq, calc_e;
00073     int which_lagr;
00074 
00075     // (Defaults are set in dyn/util/sys_stats.C)
00076 
00077     if (!parse_sys_stats_main(argc, argv,
00078                               which_lagr,
00079                               binaries, long_binary_output, B_flag,
00080                               calc_e, n_sq, out, verbose)) {
00081         get_help();
00082         exit(1);
00083     }
00084 
00085     if (!n_sq) {
00086 
00087 #ifndef USE_GRAPE
00088         calc_e = false;
00089 #endif
00090 
00091     }
00092 
00093     // Loop over input until no more data remain.
00094 
00095     hdyn *b;
00096     int i = 0;
00097 
00098     while (b = get_hdyn(cin)) {
00099 
00100         check_addstar(b);
00101         check_set_external(b, true);    // true ==> verbose output
00102         cerr << endl;
00103 
00104         if (B_flag || check_kira_flag(b, "kira_evolve_binaries"))
00105             b->set_use_dstar(true);
00106 
00107         if (i++ > 0) cerr << endl;
00108 
00109         // Simply invoke the dyn function with appropriate hdyn
00110         // extensions, as in kira_log.C.
00111 
00112         sys_stats(b,
00113                   0.5,                  // energy cutoff
00114                   verbose,
00115                   binaries,
00116                   long_binary_output,
00117                   which_lagr,
00118                   true,                 // print_time
00119                   calc_e,
00120                   n_sq,
00121                   kira_calculate_energies,
00122                   print_dstar_params,
00123                   print_dstar_stats);
00124 
00125         if (out) {
00126             b->log_history(argc, argv);
00127             put_node(cout, *b);
00128         }
00129 
00130         rmtree(b);      // causes core dump if B_flag is enabled...
00131     }
00132 }
00133 
00134 #endif

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