Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

sstar_state.C

Go to the documentation of this file.
00001 #include "sstar_to_dyn.h"
00002 #include "star_state.h"
00003 #include "single_star.h"
00004 #include "dyn.h"
00005 
00006 #ifndef TOOLBOX
00007 
00008 //Declaration can be cound in: sstar_to_dyn.h
00009 star_state make_star_state(dyn* bi) {
00010 
00011   star_state str;
00012   if (bi->get_oldest_daughter() != NULL)
00013     return str;
00014 
00015   starbase *sb = bi->get_starbase();
00016   if (bi->get_use_sstar() && has_sstar(bi)) 
00017     str.make_star_state((star*) sb);
00018   else if (sb->get_star_story()!=NULL) {
00019     
00020     real t_curr, t_rel, m_rel, m_env, m_core, co_core, T_eff, L_eff, R_eff;
00021     real p_psr, b_fld;
00022     stellar_type type=NAS;
00023     story *st = sb->get_star_story();
00024     extract_story_chapter(type, t_curr, t_rel, m_rel, m_env, m_core, co_core,
00025                           T_eff, L_eff, p_psr, b_fld, *st);
00026     R_eff = sqrt(max(0.0, (1130.*L_eff)/pow(T_eff, 4)));
00027     str.lclass    = get_luminosity_class(T_eff, L_eff);
00028     str.class_tpe = get_spectral_class(T_eff);
00029     str.type      = type;
00030     str.mass      = m_env + m_core;
00031     str.radius    = R_eff;
00032     //str.magnetic_field = b_fld;
00033     //str.rotation_period = p_psr;
00034   }
00035   else {
00036     bi->pretty_print_node(cerr);
00037     return str;
00038   }
00039   return str;
00040 }
00041 
00042 #else
00043 
00044 
00045 main() {
00046   cerr <<"Hallo"<<endl;
00047 }
00048 
00049 
00050 #endif

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