Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

hdyn_init.C

Go to the documentation of this file.
00001 
00002        //=======================================================//    _\|/_
00003       //  __  _____           ___                    ___       //      /|\ ~
00004      //  /      |      ^     |   \  |         ^     |   \     //          _\|/_
00005     //   \__    |     / \    |___/  |        / \    |___/    //            /|\ ~
00006    //       \   |    /___\   |  \   |       /___\   |   \   // _\|/_
00007   //     ___/   |   /     \  |   \  |____  /     \  |___/  //   /|\ ~
00008  //                                                       //            _\|/_
00009 //=======================================================//              /|\ ~
00010 
00011 // hdyn_init:  Starlab hdyn-specific initialization functions.
00012 
00013 #include "hdyn.h"
00014 
00015 void hdyn::initialize_unperturbed()
00016 {
00017     // Unperturbed binary motion will have unperturbed_timestep > 0.
00018     // Fully inperturbed motion will also have fully_unperturbed = true.
00019 
00020     // Unperturbed binary (kepler) details are not saved, so reconstruct
00021     // them from the hdyn.
00022 
00023     for_all_nodes(hdyn, this, b)
00024         if (b->is_low_level_node()
00025             && !b->get_elder_sister()
00026             && b->get_unperturbed_timestep() > 0) {
00027 
00028           //        cerr << "Reestablishing unperturbed motion for "
00029           //             << "(" << b->format_label() << ",";
00030           //        cerr << b->get_binary_sister()->format_label() << ")\n";
00031           //        PRL(b->get_fully_unperturbed());
00032 
00033           set_kepler_tolerance(2);
00034           b->reinitialize_kepler_from_hdyn();   // sister parameters will
00035                                                 // mirror those of b
00036       }
00037 }
00038 
00039 void hdyn::initialize_slow()
00040 {
00041     // Slow motion will be already set up for elder binary sister.
00042 
00043     for_all_nodes(hdyn, this, b)
00044         if (b->is_low_level_node()
00045             && !b->get_elder_sister()
00046             && b->get_slow()) {
00047 
00048             // Elder sister contains all relevant data.  Parameters
00049             // for the younger sister simply follow those for b.
00050 
00051             get_younger_sister()->slow = slow;
00052       }
00053 }

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