00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _STAR_STATE
00024 # define _STAR_STATE
00025
00026 #include "stdinc.h"
00027 #include "star_support.h"
00028
00029 class starbase;
00030 class star;
00031 class single_star;
00032 class node;
00033 single_star * new_single_star(stellar_type type = Main_Sequence,
00034 int id=0, real t_cur = 0, real t_rel=0,
00035 real m_rel=1, real m_tot=1,
00036 real m_core=0, real co_core=0,
00037 real p_rot=0, real b_fld=0,
00038 node* n=0);
00039
00040
00041
00042
00043
00044 struct star_hist {
00045 public:
00046
00047 stellar_type star_type;
00048
00049 real current_time;
00050 real last_update_age;
00051 real next_update_age;
00052 real relative_age;
00053 real relative_mass;
00054 real envelope_mass;
00055 real core_mass;
00056 real COcore_mass;
00057 real radius;
00058 real effective_radius;
00059 real magnetic_field;
00060 real rotation_period;
00061 real birth_mass;
00062
00063 void put_star_hist();
00064 void clean() {
00065 star_type=NAS;
00066 current_time=last_update_age=relative_age=relative_mass
00067 = next_update_age=envelope_mass=core_mass=COcore_mass
00068 = radius=effective_radius=0;
00069 magnetic_field=rotation_period=birth_mass=0;
00070 }
00071 };
00072
00073
00074
00075
00076
00077
00078
00079 struct star_state {
00080 public:
00081
00082 int identity;
00083
00084 stellar_type type;
00085 spectral_class class_tpe;
00086 luminosity_class lclass;
00087 int class_spec[no_of_spec_type];
00088
00089 real mass;
00090 real radius;
00091 real velocity;
00092 real mdot;
00093
00094 star_state();
00095 star_state(star*);
00096
00097 void put_star_state(ostream & s = cerr);
00098
00099 void make_star_state(star*);
00100 void init_star_state(star*);
00101 bool special();
00102
00103 void clean() {
00104 type=NAS;
00105 class_tpe=no_spectral_class;
00106 lclass=no_luminosity_class;
00107 for (int i=(int)NAC; i<(int)no_of_spec_type; i++)
00108 class_spec[(star_type_spec)i]=0;
00109 radius=velocity=0;
00110 mass=mdot=0;
00111 }
00112 };
00113
00114 void put_state(star_state, ostream & s=cerr);
00115 void put_short_state(star_state, ostream & s=cerr);
00116 char* type_dominant_state(star_state);
00117 void print_star(starbase*, ostream & s=cerr);
00118 void pretty_print_star(starbase*, int depth_level, ostream & s=cerr);
00119 void pretty_print_star(starbase*, ostream & s=cerr);
00120 bool remnant(stellar_type);
00121
00122
00123 #endif // _STAR_STATE