Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Spectrum Class Reference

#include <rfield.h>

Public Member Functions

 Spectrum ()
 
void resize (long int nbins)
 
void accumulate_flux (const double this_cumulfac, double timestep, double total_time)
 
double get_flux (long int accType, long int ip) const
 
double get_time_avg_flux () const
 
vector< realnum > & operator[] (int accType)
 

Private Attributes

vector< realnumflux [2]
 
double norm
 
double time_avg_flux
 
long int nflux
 

Constructor & Destructor Documentation

Spectrum::Spectrum ( )
inline

References norm, and time_avg_flux.

Member Function Documentation

void Spectrum::accumulate_flux ( const double  this_cumulfac,
double  timestep,
double  total_time 
)
inline

References DEBUG_ENTRY, flux, fp_equal(), mean, nflux, norm, and time_avg_flux.

Referenced by IterEnd().

Here is the call graph for this function:

double Spectrum::get_flux ( long int  accType,
long int  ip 
) const
inline
double Spectrum::get_time_avg_flux ( ) const
inline

References time_avg_flux.

vector<realnum>& Spectrum::operator[] ( int  accType)
inline
void Spectrum::resize ( long int  nbins)

References ASSERT, flux, nflux, and vzero().

Referenced by rfield_opac_alloc().

Here is the call graph for this function:

Member Data Documentation

vector<realnum> Spectrum::flux[2]
private

flux[0] holds the steady-state continuum flux emitted by a cloud; in a dynamical run, this should be understood as the instantaneous continuum of the cloud flux[1] holds the total flux accumulated over a dynamical run; the cumulative continuum may easily overflow single-precision storage; for this reason, the total flux is scaled by the normalization factor below; in a steady-state run it is all zero

Referenced by accumulate_flux(), get_flux(), operator[](), and resize().

long int Spectrum::nflux
private

vector lengths

Referenced by accumulate_flux(), get_flux(), and resize().

double Spectrum::norm
private

cumulative spectrum normalization factor

Referenced by accumulate_flux(), get_flux(), and Spectrum().

double Spectrum::time_avg_flux
private

time-averaged flux

Referenced by accumulate_flux(), get_time_avg_flux(), and Spectrum().


The documentation for this class was generated from the following files: