cdspec.cpp File Reference

#include "cddefines.h"
#include "cddrive.h"
#include "physconst.h"
#include "geometry.h"
#include "radius.h"
#include "rfield.h"
#include "opacity.h"
#include "optimize.h"
#include "grid.h"

Include dependency graph for cdspec.cpp:

Go to the source code of this file.

Functions

static double Spec_cont (float cont[])
void cdSPEC (int nOption, double EnergyLow[], long int nEnergy, double ReturnedSpectrum[])
void cdSPEC2 (int nOption, long int nEnergy, float ReturnedSpectrum[])

Variables

static long int iplo
static long int iphi
static double Elo
static double Ehi


Function Documentation

void cdSPEC ( int  Option,
double  EnergyLow[],
long int  nEnergy,
double  ReturnedSpectrum[] 
)

set flag so that exit handler will clean up MPI this routine returns the spectrum needed for Keith Arnaud's XSPEC X-Ray analysis code. It should be called after cdDrive has successfully computed a model. The calling routine must ensure that the vectors have enough space to store the resulting spectrum, given the bounds and energy resolution

Parameters:
Option 
	 option - the type of spectrum to be returned
	 1			the incident continuum 4\pi nuJ_nu, , erg cm-2 s-1
	
	 2			the attenuated incident continuum, same units
	 3			the reflected continuum, same units
	
	 4			diffuse continuous emission outward direction
	 5			diffuse continuous emission, reflected
	
	 6			collisional+recombination lines, outward
	 7			collisional+recombination lines, reflected
	
				all lines and continuum emitted by the cloud assume full coverage of 
				continuum source
	
EnergyLow[] * the energy of the lower edge of each cell (in Ryd to be consistent with all the rest of Cloudy
nEnergy the number of cells + 1
ReturnedSpectrum[] the returned spectrum, same size is two energy spectra (see option), returns nEnergy -1 pts

Definition at line 32 of file cdspec.cpp.

References t_rfield::anu, cdEXIT(), t_rfield::ConEmitOut, t_rfield::ConEmitReflec, t_rfield::ConRefIncid, t_geometry::covgeo, DEBUG_ENTRY, DEBUG_EXIT, Ehi, Elo, t_rfield::flux, t_rfield::FluxSave, geometry, ioQQQ, iphi, iplo, t_geometry::lgSphere, MALLOC, t_rfield::nflux, t_rfield::nupper, t_rfield::outlin, t_radius::r1r0sq, radius, t_rfield::reflin, rfield, Spec_cont(), and t_rfield::widflx.

Referenced by PunchNewContinuum().

Here is the call graph for this function:

void cdSPEC2 ( int  Option,
long int  nEnergy,
float  ReturnedSpectrum[] 
)

Parameters:
Option 
the type of spectrum to be returned
	 1			the incident continuum 4\pi nuJ_nu, , erg cm-2 s-1
	
	 2			the attenuated incident continuum, same units
	 3			the reflected continuum, same units
	
	 4			diffuse continuous emission outward direction
	 5			diffuse continuous emission, reflected
	
	 6			collisional+recombination lines, outward
	 7			collisional+recombination lines, reflected
	
				all lines and continuum emitted by the cloud assume full coverage of 
				continuum source
	
nEnergy the number of cells + 1
ReturnedSpectrum[] the returned spectrum, same size is two energy spectra (see option), returns nEnergy -1 pts

Definition at line 314 of file cdspec.cpp.

References ASSERT, cdEXIT(), t_rfield::ConEmitOut, t_rfield::ConEmitReflec, t_rfield::ConRefIncid, t_geometry::covgeo, DEBUG_ENTRY, DEBUG_EXIT, t_opac::ExpmTau, t_rfield::flux, t_rfield::FluxSave, geometry, ioQQQ, iphi, iplo, t_geometry::lgSphere, MALLOC, t_rfield::nflux, NUM_OUTPUT_TYPES, t_rfield::nupper, opac, t_rfield::outlin, t_radius::r1r0sq, radius, t_rfield::reflin, rfield, SMALLFLOAT, and t_rfield::trans_coef_total.

Referenced by GridGather(), GridInitialize(), and punchFITS_GenericData().

Here is the call graph for this function:

static double Spec_cont ( float  cont[]  )  [static]

Definition at line 183 of file cdspec.cpp.

References t_rfield::anu, t_rfield::anu2, t_rfield::AnuOrg, ASSERT, Ehi, Elo, EN1RYD, iphi, iplo, t_rfield::nflux, rfield, and t_rfield::widflx.

Referenced by cdSPEC().


Variable Documentation

double Ehi [static]

Definition at line 27 of file cdspec.cpp.

Referenced by cdSPEC(), fiddle(), PE_init(), qheat_init(), Spec_cont(), and UpdatePot1().

double Elo [static]

Definition at line 27 of file cdspec.cpp.

Referenced by cdSPEC(), fiddle(), PE_init(), Spec_cont(), and UpdatePot1().

long int iphi [static]

Definition at line 24 of file cdspec.cpp.

Referenced by cdSPEC(), cdSPEC2(), GammaPrtShells(), ion_photo(), IonIron(), RT_diffuse(), and Spec_cont().

long int iplo [static]

Definition at line 24 of file cdspec.cpp.

Referenced by cdSPEC(), cdSPEC2(), H2_Solomon_rate(), and Spec_cont().


Generated for cloudy by doxygen 1.5.9