GyotoUniformSphere.h
Go to the documentation of this file.
/*
Copyright 2011-2014, 2018-2019 Frederic Vincent, Thibaut Paumard
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoUniformSphere_H_
#define __GyotoUniformSphere_H_
namespace Gyoto{
namespace Astrobj { class UniformSphere; }
}
#include <GyotoMetric.h>
#include <GyotoStandardAstrobj.h>
#include <GyotoSpectrum.h>
#ifdef GYOTO_USE_XERCES
#include <GyotoRegister.h>
#endif
#include <string>
class Gyoto::Astrobj::UniformSphere :
public Gyoto::Astrobj::Standard {
friend class Gyoto::SmartPointer<Gyoto::Astrobj::UniformSphere>;
// Data :
// -----
protected:
double radius_ ;
bool isotropic_;
SmartPointer<Spectrum::Generic> spectrum_;
SmartPointer<Spectrum::Generic> opacity_;
double dltmor_;
double dltmod_;
// Constructors - Destructor
// -------------------------
public:
GYOTO_OBJECT;
UniformSphere(std::string kind,
SmartPointer<Metric::Generic> gg, double radius) ;
UniformSphere(std::string kind);
UniformSphere(const UniformSphere& orig);
virtual ~UniformSphere() ;
// Accessors
// ---------
public:
virtual std::string className() const ;
virtual std::string className_l() const ;
virtual void spectrum(SmartPointer<Spectrum::Generic>);
virtual SmartPointer<Spectrum::Generic> spectrum() const;
virtual void opacity(SmartPointer<Spectrum::Generic>);
virtual SmartPointer<Spectrum::Generic> opacity() const;
double radius() const ;
virtual void radius(double);
double radius(std::string const &) const ;
virtual void radius(double, std::string const &);
double deltaMaxOverRadius() const ;
virtual void deltaMaxOverRadius(double f);
double deltaMaxOverDistance() const ;
virtual void deltaMaxOverDistance(double f);
bool isotropic() const;
void isotropic(bool);
double alpha() const ;
void alpha(double);
public:
virtual double operator()(double const coord[4]) ;
virtual double deltaMax(double*coord);
protected:
virtual void getCartesian(double const * const dates, size_t const n_dates,
double * const x, double * const y,
double * const z, double * const xprime=NULL,
double * const yprime=NULL, double * const zprime=NULL) =0;
virtual void getVelocity(double const pos[4], double vel[4]) = 0;
using Standard::emission;
virtual double emission(double nu_em, double dsem,
state_t const &cp, double const co[8]=NULL) const;
using Standard::integrateEmission;
virtual double integrateEmission(double nu1, double nu2, double dsem,
state_t const &c_ph, double const *c_obj=NULL) const;
virtual double transmission(double nuem, double dsem, state_t const &, double const *) const ;
};
#endif
GyotoMetric.h
Base class for metric description.
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoRegister.h
Gyoto registers.
GyotoSpectrum.h
Spectrum of a simple object (e.g. Star).
GyotoStandardAstrobj.h
Astronomical objects defined bya a potential/distance.
Gyoto::Astrobj::Generic::integrateEmission
virtual double integrateEmission(double nu1, double nu2, double dsem, state_t const &c_ph, double const c_obj[8]=NULL) const
∫ν1ν2 Iν dν (or jν)
Gyoto::Astrobj::Generic::emission
virtual double emission(double nu_em, double dsem, state_t const &coord_ph, double const coord_obj[8]=NULL) const
Specific intensity Iν.
Gyoto::Astrobj::Standard
Astronomical objects defined bya a potential/distance.
Definition GyotoStandardAstrobj.h:87
Gyoto::Astrobj::UniformSphere
Optically thick or thin, spherical objects.
Definition GyotoUniformSphere.h:90
Gyoto::Astrobj::UniformSphere::emission
virtual double emission(double nu_em, double dsem, state_t const &cp, double const co[8]=NULL) const
Emission is determined by spectrum_ and opacity_.
Gyoto::Astrobj::UniformSphere::deltaMax
virtual double deltaMax(double *coord)
Gyoto::Astrobj::UniformSphere::radius
double radius() const
Get radius_ in geometrical units.
Gyoto::Astrobj::UniformSphere::UniformSphere
UniformSphere(std::string kind, SmartPointer< Metric::Generic > gg, double radius)
Standard constructor.
Gyoto::Astrobj::UniformSphere::opacity_
SmartPointer< Spectrum::Generic > opacity_
if optically thin, opacity law
Definition GyotoUniformSphere.h:99
Gyoto::Astrobj::UniformSphere::getCartesian
virtual void getCartesian(double const *const dates, size_t const n_dates, double *const x, double *const y, double *const z, double *const xprime=NULL, double *const yprime=NULL, double *const zprime=NULL)=0
Yield the Cartesian coordinates of the center of the sphere.
Gyoto::Astrobj::UniformSphere::deltaMaxOverRadius
double deltaMaxOverRadius() const
Get dltmor_.
Gyoto::Astrobj::UniformSphere::spectrum
virtual void spectrum(SmartPointer< Spectrum::Generic >)
Set spectrum_.
Gyoto::Astrobj::UniformSphere::getVelocity
virtual void getVelocity(double const pos[4], double vel[4])=0
Yield velocity of the center of the sphere.
Gyoto::Astrobj::UniformSphere::opacity
virtual void opacity(SmartPointer< Spectrum::Generic >)
Set opacity_.
Gyoto::Astrobj::UniformSphere::className
virtual std::string className() const
"UniformSphere"
Gyoto::Astrobj::UniformSphere::isotropic_
bool isotropic_
if 1, then emission just returns 1
Definition GyotoUniformSphere.h:97
Gyoto::Astrobj::UniformSphere::className_l
virtual std::string className_l() const
"uniformsphere"
Gyoto::Astrobj::UniformSphere::dltmod_
double dltmod_
see deltaMax(double*)
Definition GyotoUniformSphere.h:102
Gyoto::Astrobj::UniformSphere::transmission
virtual double transmission(double nuem, double dsem, state_t const &, double const *) const
Transmission is determined by opacity_.
Gyoto::Astrobj::UniformSphere::dltmor_
double dltmor_
see deltaMax(double*)
Definition GyotoUniformSphere.h:101
Gyoto::Astrobj::UniformSphere::radius_
double radius_
sphere radius [geometrical units]
Definition GyotoUniformSphere.h:96
Gyoto::Astrobj::UniformSphere::deltaMaxOverDistance
double deltaMaxOverDistance() const
Get dltmod_.
Gyoto::Astrobj::UniformSphere::spectrum_
SmartPointer< Spectrum::Generic > spectrum_
sphere emission law
Definition GyotoUniformSphere.h:98
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Astrobj
Access to astronomical objects.
Definition GyotoAstrobj.h:49
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44