Spectrum emitted by an Astrobj.
More...
#include <GyotoSpectrum.h>
|
| Generic (const std::string kind) |
| Set kind in constructor.
|
|
virtual Generic * | clone () const |
| Cloner.
|
|
virtual | ~Generic () |
| Destructor: does nothing.
|
|
const std::string | kind () const |
| Get spectrum kind.
|
|
virtual double | operator() (double nu) const =0 |
| I_nu = mySpectrum(nu), nu in Hz. Assumes optically thick regime.
|
|
virtual double | operator() (double nu, double opacity, double ds) const |
| I_nu in optically thin regime. More...
|
|
virtual double | integrate (double nu1, double nu2) |
| Integrate optically thick I_nu. More...
|
|
virtual double | integrate (double nu1, double nu2, const Spectrum::Generic *opacity, double ds) |
| Integrate optically thin I_nu. More...
|
|
virtual void | setParameter (std::string name, std::string content, std::string unit) |
| Set any parameter by its name.
|
|
virtual void | fillElement (FactoryMessenger *fmp) const |
| called from Factory More...
|
|
virtual void | setParameters (FactoryMessenger *fmp) |
| Main loop in Subcontractor_t function. More...
|
|
|
void | incRefCount () |
| Increment the reference counter. Warning: Don't mess with the counter.
|
|
int | decRefCount () |
| Decrement the reference counter and return current value. Warning: Don't mess with the counter.
|
|
int | getRefCount () |
| Get the current number of references.
|
|
|
std::string | kind_ |
| e.g. constants, blackbody...
|
|
|
class | Gyoto::SmartPointer< Gyoto::Spectrum::Generic > |
|
Spectrum emitted by an Astrobj.
Light emitted by e.g. a Star
virtual void Gyoto::Spectrum::Generic::fillElement |
( |
FactoryMessenger * |
fmp | ) |
const |
|
virtual |
virtual double Gyoto::Spectrum::Generic::integrate |
( |
double |
nu1, |
|
|
double |
nu2 |
|
) |
| |
|
virtual |
Integrate optically thick I_nu.
See operator()(double nu) const
- Parameters
-
nu1,nu2 | boundaries for the integration |
- Returns
- I, the integral of I_nu between nu1 and nu2
virtual double Gyoto::Spectrum::Generic::integrate |
( |
double |
nu1, |
|
|
double |
nu2, |
|
|
const Spectrum::Generic * |
opacity, |
|
|
double |
ds |
|
) |
| |
|
virtual |
virtual double Gyoto::Spectrum::Generic::operator() |
( |
double |
nu, |
|
|
double |
opacity, |
|
|
double |
ds |
|
) |
| const |
|
virtual |
I_nu in optically thin regime.
Generic implementation assumes emissivity = opacity.
- Parameters
-
nu | frequency in Hz |
opacity | such that opacity*ds=optical thickness. |
ds | in geometrical units |
virtual void Gyoto::Spectrum::Generic::setParameters |
( |
FactoryMessenger * |
fmp | ) |
|
|
virtual |
Main loop in Subcontractor_t function.
The Subcontractor_t function for each Spectrum kind should look somewhat like this:
SmartPointer<Spectrum::Generic>
SmartPointer<MyKind> sp = new MyKind();
return sp;
}
Each spectrum kind should implement setParameter(string name, string content) to interpret the individual XML elements. setParameters() can be overloaded in case the specific Spectrum class needs low level access to the FactoryMessenger (see Astrobj::UniformSphere::setParameters()).
The documentation for this class was generated from the following file: