00001
00002
00003
00004
00005 #include "dyn.h"
00006
00007 void dyn::null_pointers()
00008 {
00009
00010
00011
00012 kep = NULL;
00013
00014 node::null_pointers();
00015 }
00016
00017 bool dyn::nn_stats(real energy_cutoff, real kT,
00018 vector center, bool verbose,
00019 bool long_binary_output,
00020 int which)
00021 {
00022
00023
00024
00025
00026 if (verbose && long_binary_output
00027 && is_top_level_node() && elder_sister == NULL && which == 0)
00028 cerr << "\n (No NN information available for dyn class)" << endl;
00029
00030 return true;
00031 }
00032
00033 real dyn::print_pert(bool long_binary_output,
00034 int indent)
00035 {
00036
00037
00038 if (!long_binary_output) cerr << endl;
00039 return 0;
00040 }
00041
00042 real dyn::get_radius()
00043 {
00044 if (oldest_daughter == NULL) return 0;
00045
00046 real rmax2 = 0;
00047
00048 for (dyn* b = this; b != NULL; b = (dyn*) b->next_node(this))
00049 if (b->get_oldest_daughter() == NULL) {
00050
00051 vector dx = b->get_pos();
00052 real r2 = dx*dx;
00053 if (r2 > rmax2) rmax2 = r2;
00054 }
00055 return sqrt(rmax2);
00056 }
00057
00058 vector something_relative_to_root(dyn* bi,
00059 dyn_VMF_ptr get_something)
00060 {
00061 #ifdef DEBUG
00062 cerr << "something_relative_to_ancestor\n";
00063 #endif
00064 vector d_something = 0.0;
00065 for(dyn * b = bi;b->get_parent() != NULL; b = b->get_parent()){
00066 if(b == NULL){
00067 cerr << "something_relative_to_root: Error, bj is not the "
00068 << "ancestor of bi\n";
00069 exit(1);
00070 }
00071 d_something += (b->*get_something)();
00072 }
00073 return d_something;
00074 }