Gyoto
GyotoUniformSphere.h
Go to the documentation of this file.
1
11/*
12 Copyright 2011-2014, 2018-2019 Frederic Vincent, Thibaut Paumard
13
14 This file is part of Gyoto.
15
16 Gyoto is free software: you can redistribute it and/or modify
17 it under the terms of the GNU General Public License as published by
18 the Free Software Foundation, either version 3 of the License, or
19 (at your option) any later version.
20
21 Gyoto is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU General Public License for more details.
25
26 You should have received a copy of the GNU General Public License
27 along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
28 */
29
30
31#ifndef __GyotoUniformSphere_H_
32#define __GyotoUniformSphere_H_
33
34namespace Gyoto{
35 namespace Astrobj { class UniformSphere; }
36}
37
38#include <GyotoMetric.h>
40#include <GyotoSpectrum.h>
41
42#ifdef GYOTO_USE_XERCES
43#include <GyotoRegister.h>
44#endif
45
46#include <string>
47
92
93 // Data :
94 // -----
95 protected:
96 double radius_ ;
98 SmartPointer<Spectrum::Generic> spectrum_;
99 SmartPointer<Spectrum::Generic> opacity_;
100
101 double dltmor_;
102 double dltmod_;
103
104 // Constructors - Destructor
105 // -------------------------
106 public:
108
115 UniformSphere(std::string kind,
116 SmartPointer<Metric::Generic> gg, double radius) ;
118
125 UniformSphere(std::string kind);
126
127 UniformSphere(const UniformSphere& orig);
128
129 virtual ~UniformSphere() ;
130
131 // Accessors
132 // ---------
133 public:
134 virtual std::string className() const ;
135 virtual std::string className_l() const ;
136
137 virtual void spectrum(SmartPointer<Spectrum::Generic>);
139 virtual SmartPointer<Spectrum::Generic> spectrum() const;
141 virtual void opacity(SmartPointer<Spectrum::Generic>);
143 virtual SmartPointer<Spectrum::Generic> opacity() const;
145 double radius() const ;
146 virtual void radius(double);
147 double radius(std::string const &) const ;
148 virtual void radius(double, std::string const &);
149
150 double deltaMaxOverRadius() const ;
151 virtual void deltaMaxOverRadius(double f);
152
153 double deltaMaxOverDistance() const ;
154 virtual void deltaMaxOverDistance(double f);
155
156 bool isotropic() const;
157 void isotropic(bool);
158 double alpha() const ;
159 void alpha(double);
160
161 public:
162
163 virtual double operator()(double const coord[4]) ;
165
167
171 virtual double deltaMax(double*coord);
172
173 protected:
178 virtual void getCartesian(double const * const dates, size_t const n_dates,
179 double * const x, double * const y,
180 double * const z, double * const xprime=NULL,
181 double * const yprime=NULL, double * const zprime=NULL) =0;
183
184 virtual void getVelocity(double const pos[4], double vel[4]) = 0;
186
187 using Standard::emission;
188 virtual double emission(double nu_em, double dsem,
189 state_t const &cp, double const co[8]=NULL) const;
192 virtual double integrateEmission(double nu1, double nu2, double dsem,
193 state_t const &c_ph, double const *c_obj=NULL) const;
194 virtual double transmission(double nuem, double dsem, state_t const &, double const *) const ;
196
197};
198
199
200#endif
Base class for metric description.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Gyoto registers.
Spectrum of a simple object (e.g. Star)
Astronomical objects defined bya a potential/distance.
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ν)
virtual double emission(double nu_em, double dsem, state_t const &coord_ph, double const coord_obj[8]=NULL) const
Specific intensity Iν
Astronomical objects defined bya a potential/distance.
Definition: GyotoStandardAstrobj.h:87
Optically thick or thin, spherical objects.
Definition: GyotoUniformSphere.h:90
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_.
virtual double deltaMax(double *coord)
double radius() const
Get radius_ in geometrical units.
virtual SmartPointer< Spectrum::Generic > opacity() const
Get opacity_.
SmartPointer< Spectrum::Generic > opacity_
if optically thin, opacity law
Definition: GyotoUniformSphere.h:99
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.
virtual SmartPointer< Spectrum::Generic > spectrum() const
Get spectrum_.
double deltaMaxOverRadius() const
Get dltmor_.
virtual void getVelocity(double const pos[4], double vel[4])=0
Yield velocity of the center of the sphere.
virtual std::string className() const
"UniformSphere"
bool isotropic_
if 1, then emission just returns 1
Definition: GyotoUniformSphere.h:97
virtual std::string className_l() const
"uniformsphere"
double dltmod_
see deltaMax(double*)
Definition: GyotoUniformSphere.h:102
virtual double transmission(double nuem, double dsem, state_t const &, double const *) const
Transmission is determined by opacity_.
double dltmor_
see deltaMax(double*)
Definition: GyotoUniformSphere.h:101
double radius_
sphere radius [geometrical units]
Definition: GyotoUniformSphere.h:96
double deltaMaxOverDistance() const
Get dltmod_.
SmartPointer< Spectrum::Generic > spectrum_
sphere emission law
Definition: GyotoUniformSphere.h:98
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43