00001
00002
00003
00004
00005 #include "cddefines.h"
00006 #include "opacity.h"
00007 #include "geometry.h"
00008 #include "transition.h"
00009 #include "prt.h"
00010 #include "rt.h"
00011
00012 void RT_line_one_tau_reset(const TransitionProxy& t)
00013 {
00014 char chSave[11];
00015
00016 DEBUG_ENTRY( "RT_line_one_tau_reset()" );
00017
00018 if( t.ipCont() <= 0 )
00019 {
00020 return;
00021 }
00022
00023
00024 if( prt.lgPrtMaser &&
00025 ( t.Emis().TauTot() < -0.01 || t.Emis().TauIn() < -0.01 ) )
00026 {
00027 strcpy( chSave, chLineLbl(t) );
00028 fprintf( ioQQQ, " Masing line:%10.10s t(in, out)=%10.2e%10.2e\n",
00029 chSave, t.Emis().TauIn(), t.Emis().TauTot() );
00030 }
00031
00032 realnum TauNext;
00033
00034
00035 if( geometry.lgSphere && geometry.lgStatic )
00036 {
00037
00038 TauNext = 2.f*t.Emis().TauIn();
00039 }
00040 else
00041 {
00042
00043
00044
00045
00046 TauNext = rt.DoubleTau*t.Emis().TauIn();
00047 }
00048
00049
00050
00051 if( iteration > 1 )
00052 TauNext = t.Emis().TauTrack().next_val( t.Emis().TauTot(), TauNext );
00053
00054 if( geometry.lgSphere && geometry.lgStatic )
00055 t.Emis().TauIn() = TauNext/2.f;
00056 else
00057 t.Emis().TauIn() = min(opac.taumin,TauNext/2.f);
00058
00059 t.Emis().TauTot() = TauNext;
00060
00061
00062 t.Emis().Pesc() = 0.5f*(1.f + 1.f/MAX2(1.f,t.Emis().TauTot()));
00063
00064
00065 t.Emis().FracInwd() = MIN2(1.f,1.5f-t.Emis().Pesc());
00066
00067
00068 t.Emis().Pdest() = 0.;
00069 t.Emis().Pelec_esc() = 0.;
00070
00071
00072 t.Emis().TauCon() = opac.taumin;
00073
00074
00075 (*t.Lo()).Pop() = 0.;
00076
00077
00078 (*t.Hi()).Pop() = 0.;
00079
00080 t.Emis().PopOpc() = 0.;
00081
00082 t.Coll().cool() = 0.;
00083 t.Coll().heat() = 0.;
00084
00085 t.Emis().xIntensity() = 0.;
00086
00087 t.Emis().phots() = 0.;
00088 return;
00089 }