00001 /* This file is part of Cloudy and is copyright (C)1978-2010 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 00004 #ifndef YIELD_H_ 00005 #define YIELD_H_ 00006 00007 /* yield.h */ 00008 00010 #define MEWE_FLUOR 12000 00011 00012 class t_yield : public Singleton<t_yield> 00013 { 00014 friend class Singleton<t_yield>; 00015 protected: 00016 t_yield(); 00017 private: 00025 realnum frac_elec_eject[30][30][7][10]; 00026 long int n_elec_eject[30][30][7]; 00027 00030 int nfl_nelem[MEWE_FLUOR]; 00031 int nfl_ion[MEWE_FLUOR]; 00032 int nfl_nshell[MEWE_FLUOR]; 00033 int nfl_ion_emit[MEWE_FLUOR]; 00034 int nfl_nLine[MEWE_FLUOR]; 00035 realnum fl_energy[MEWE_FLUOR]; 00037 realnum fl_yield[MEWE_FLUOR]; 00038 long int nfl_ipoint[MEWE_FLUOR]; 00039 00041 long int nfl_lines; 00042 00044 bool lgKillAuger; 00045 public: 00046 void init_yield(); 00047 00048 realnum elec_eject_frac( long n, long i, long ns, long ne ) const 00049 { 00050 if( lgKillAuger ) 00051 return ( ne == 0 ) ? 1.f : 0.f; 00052 else 00053 return frac_elec_eject[n][i][ns][ne]; 00054 } 00055 long nelec_eject( long n, long i, long ns ) const 00056 { 00057 return lgKillAuger ? 1 : n_elec_eject[n][i][ns]; 00058 } 00059 int nelem( long n ) const { return nfl_nelem[n]; } 00060 int ion( long n ) const { return nfl_ion[n]; } 00061 int nshell( long n ) const { return nfl_nshell[n]; } 00062 int ion_emit( long n ) const { return nfl_ion_emit[n]; } 00063 realnum energy( long n ) const { return fl_energy[n]; } 00064 00065 realnum yield( long n ) const 00066 { 00067 if( lgKillAuger ) 00068 return 0.; 00069 else 00070 return fl_yield[n]; 00071 } 00072 00073 void set_ipoint( long n, long val ) { nfl_ipoint[n] = val; } 00074 int ipoint( long n ) const { return nfl_ipoint[n]; } 00075 00076 int nlines() const { return nfl_lines; } 00077 00078 void kill_yield() { lgKillAuger = true; } 00079 void reset_yield() { lgKillAuger = false; } 00080 }; 00081 00082 #endif /* YIELD_H_ */