00001 #ifndef _CLUSTER_SUPPORT
00002 # define _CLUSTER_SUPPORT
00003
00004
00005 #include "stdinc.h"
00006 #include "double_support.h"
00007 #include "stdfunc.h"
00008 #include "star_support.h"
00009 #include "star_state.h"
00010
00011 #define MIN_TYPE_NUMBER 0
00012 #define MAX_TYPE_NUMBER 60
00013
00014 enum profile {star_type=0, spectral_type,
00015 spectral_addition, no_of_profile};
00016
00017
00018
00019
00020
00021
00022 struct initial_cluster
00023 {
00024
00025 real start_time;
00026 real end_time;
00027 int field;
00028
00029 int start_id;
00030 int n_steps;
00031 int no_of_binaries;
00032 int no_of_singles;
00033 int nh_binaries;
00034 int nh_singles;
00035
00036 real r_core;
00037 real r_halfm;
00038 real r_tidal;
00039 real rho_core;
00040 real v_disp;
00041
00042 real m_min;
00043 real m_max;
00044 real m_alpha;
00045
00046 real q_min;
00047 real q_max;
00048 real q_alpha;
00049
00050 real a_min;
00051 real a_max;
00052 real a_alpha;
00053
00054 real e_min;
00055 real e_max;
00056 real e_alpha;
00057
00058 int seed;
00059
00060 initial_cluster();
00061 real get_delta_t() {return (end_time - start_time)/n_steps;}
00062
00063 double_init random_initial_conditions();
00064 };
00065
00066 double_init random_initial_conditions(initial_cluster&);
00067
00068
00069
00070
00071
00072
00073 struct cluster_profile
00074 {
00075
00076 int init_bins[MAX_TYPE_NUMBER][MAX_TYPE_NUMBER];
00077 int fin_bins[MAX_TYPE_NUMBER][MAX_TYPE_NUMBER];
00078 int mergers[MAX_TYPE_NUMBER];
00079 int singles[MAX_TYPE_NUMBER];
00080
00081 int bins_stt[MAX_TYPE_NUMBER][MAX_TYPE_NUMBER];
00082 int runner_stt[MAX_TYPE_NUMBER];
00083 int merge_stt[MAX_TYPE_NUMBER];
00084 int single_stt[MAX_TYPE_NUMBER];
00085
00086 int bins_spt[MAX_TYPE_NUMBER][MAX_TYPE_NUMBER];
00087 int runner_spt[MAX_TYPE_NUMBER];
00088 int merge_spt[MAX_TYPE_NUMBER];
00089 int single_spt[MAX_TYPE_NUMBER];
00090
00091 int bins_spa[MAX_TYPE_NUMBER][MAX_TYPE_NUMBER][no_of_spec_type];
00092 int runner_spa[MAX_TYPE_NUMBER][no_of_spec_type];
00093 int merge_spa[MAX_TYPE_NUMBER][no_of_spec_type];
00094 int single_spa[MAX_TYPE_NUMBER][no_of_spec_type];
00095
00096
00097 int no_of_init_bins;
00098 int no_of_fin_bins;
00099 int no_of_runners;
00100 int no_of_mergers;
00101 int no_of_singles;
00102
00103 cluster_profile();
00104 void enhance_cluster_profile(double_profile&, profile, star_type_spec);
00105 void enhance_cluster_profile(double_profile&);
00106 void enhance_cluster_profile(star_state&);
00107 void star_type_cluster_profile(double_profile&);
00108 void star_type_cluster_profile(star_state&);
00109 void spectral_type_cluster_profile(double_profile&);
00110 void spectral_type_cluster_profile(star_state&);
00111 void spectral_addition_single_profile(double_profile&, star_type_spec);
00112 void spectral_addition_cluster_profile(double_profile&, star_type_spec);
00113 void spectral_addition_cluster_profile(star_state&, star_type_spec);
00114 void print_profile();
00115 void print_profile(profile);
00116 void print_profile(stellar_type);
00117 void print_profile(spectral_class);
00118 void print_profile(star_type_spec, profile);
00119 void print_single_profile(star_type_spec);
00120 };
00121
00122 void make_profile(initial_cluster&,
00123 cluster_profile&, profile, star_type_spec);
00124
00125 real next_output_time(int, int, real, real);
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164 #endif // _CLUSTER_SUPPORT
00165
00166