/*PutLine enter local line intensity into the intensity stack for eventual printout */ #include #include "cddefines.h" #include "taulines.h" #include "linesave.h" #include "extrintn.h" #include "linadd.h" #include "iwavlen.h" #include "chionlbl.h" #include "putline.h" void PutLine(EmLine * t) { char chLabel[5]; long int iWL; float xIntensity; # ifdef DEBUG_FUN fputs( "<+>PutLine()\n", debug_fp ); # endif /* routine to use line array data to generate input * for emission line array */ /* subroutine linadd(xIntensity , lam , chLab , chInfo) * real f * integer lam * character chLab*4 , chInfo*1 */ /* if ipass=0 then we must generate label info since first pass * gt.0 then only need line intensity data */ if( LineSave.ipass == 0 ) { /* these variables not used by linadd if ipass ne 0 */ /* chIonLbl is function that generates a null terminated 4 char string, of form "C 2" */ chIonLbl(chLabel, t); /* iWavLen converts wavelength into truncated form used in printout, ie, * FIR lines are small integers */ iWL = iWavLen(t); LineSv[LineSave.nsum].xLineEnergy = t->EnergyRyd; xIntensity = 0.; } else { /* both the counting and integrating modes comes here */ strcpy( chLabel, " " ); iWL = 0; /* total line intensity or luminosity */ xIntensity = t->xIntensity + ExtrIntn.ExtraInten; } /* initial counting case, where ipass == -1, just ignored above, call linadd below */ /* ExtraInten is option that allows extra intensity (i.e., recomb) * to be added to this line with Call PutExtra( exta ) * in main lines this extra * contribution must be identified explicitly */ ExtrIntn.ExtraInten = 0.; linadd(xIntensity,iWL,chLabel,'i'); /* inward part of line - do not move this away from previous lines * since xIntensity is used here */ xIntensity *= t->FracInwd; linadd(xIntensity,iWL,"Inwd",'i'); /* cooling part of line */ xIntensity = t->cool; linadd(xIntensity,iWL,"Coll",'c'); /* fluorescent excited part of line */ xIntensity = t->PopOpc * t->pump * t->AovTot * t->EnergyErg; linadd(xIntensity,iWL,"Pump",'i'); /* heating part of line */ xIntensity = t->heat; linadd(xIntensity,iWL,"Heat",'h'); # ifdef DEBUG_FUN fputs( " <->PutLine()\n", debug_fp ); # endif return; }