Gyoto
GyotoTorus.h
Go to the documentation of this file.
1 
7 /*
8  Copyright 2011 Thibaut Paumard
9 
10  This file is part of Gyoto.
11 
12  Gyoto is free software: you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation, either version 3 of the License, or
15  (at your option) any later version.
16 
17  Gyoto is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #ifndef __GyotoTorus_H_
27 #define __GyotoTorus_H_
28 
29 #include <iostream>
30 #include <fstream>
31 #include <iomanip>
32 #include <string>
33 
34 namespace Gyoto{
35  namespace Astrobj { class Torus; }
36 }
37 
38 #include <GyotoStandardAstrobj.h>
39 #include <GyotoSpectrum.h>
40 #include <GyotoUtils.h>
41 
50  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Torus>;
51 
52 
53  // Data :
54  // -----
55  protected:
61  double c_;
62 
63  SmartPointer<Spectrum::Generic> spectrum_;
64  SmartPointer<Spectrum::Generic> opacity_;
65 
66  // Constructors - Destructor
67  // -------------------------
68  public:
72  Torus();
73 
74  Torus(const Torus& ) ;
75  virtual Torus* clone() const;
76 
77  virtual ~Torus() ;
78 
79  // Accessors
80  // ---------
81  public:
85  double getLargeRadius() const;
86 
90  double getLargeRadius(std::string unit) const;
91 
95  double getSmallRadius() const;
96 
100  double getSmallRadius(std::string unit) const;
101 
105  void setLargeRadius(double c);
106 
110  void setSmallRadius(double a);
111 
115  void setLargeRadius(double c, std::string unit);
116 
120  void setSmallRadius(double a, std::string unit);
121 
125  virtual void setSpectrum(SmartPointer<Spectrum::Generic>);
126 
130  virtual SmartPointer<Spectrum::Generic> getSpectrum() const;
131 
135  virtual void setOpacity(SmartPointer<Spectrum::Generic>);
136 
140  virtual SmartPointer<Spectrum::Generic> getOpacity() const;
141 
142  using Standard::getRmax;
143  virtual double getRmax();
144 
145  //XML I/O
146  public:
147  virtual int setParameter(std::string name,
148  std::string content,
149  std::string unit) ;
150 
151 #ifdef GYOTO_USE_XERCES
152  virtual void fillElement(FactoryMessenger *fmp) const ;
153  virtual void setParameters(FactoryMessenger *fmp) ;
154 #endif
155 
156  // Outputs
157  // -------
158  public:
159  virtual double operator()(double const coord[4]) ;
160 
161  protected:
162  virtual void getVelocity(double const pos[4], double vel[4]) ;
163 
164  using Standard::emission;
165  virtual double emission(double nu_em, double dsem, double coord_ph[8],
166  double coord_obj[8]=NULL) const ;
168  virtual double integrateEmission(double nu1, double nu2, double dsem,
169  double c_ph[8], double c_obj[8]=NULL) const;
170 
171  virtual double transmission(double nuem, double dsem, double coord[8]) const ;
172 
173 };
174 
175 #endif
virtual void setParameters(FactoryMessenger *fmp)
Main loop in Subcontractor_t function.
virtual double integrateEmission(double nu1, double nu2, double dsem, double c_ph[8], double c_obj[8]=NULL) const
∫ν1ν2 Iν dν (or jν)
double c_
Large Radius.
Definition: GyotoTorus.h:61
virtual Torus * clone() const
&quot;Virtual&quot; copy constructor
virtual double integrateEmission(double nu1, double nu2, double dsem, double c_ph[8], double c_obj[8]=NULL) const
∫ν1ν2 Iν dν (or jν)
SmartPointer< Spectrum::Generic > opacity_
Absorption law.
Definition: GyotoTorus.h:64
virtual double emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const
Specific intensity Iν
virtual SmartPointer< Spectrum::Generic > getOpacity() const
Get Torus::opacity_.
Optically thin or thick torus in circular rotation.
Definition: GyotoTorus.h:49
Astronomical objects defined bya a potential/distance.
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
virtual void getVelocity(double const pos[4], double vel[4])
Fluid velocity field.
Spectrum of a simple object (e.g. Star)
double getLargeRadius() const
virtual void setOpacity(SmartPointer< Spectrum::Generic >)
Set Torus::opacity_.
virtual void setSpectrum(SmartPointer< Spectrum::Generic >)
Set Torus::spectrum_.
void setSmallRadius(double a)
Set small radius.
virtual SmartPointer< Spectrum::Generic > getSpectrum() const
Get Torus::spectrum_.
virtual void fillElement(FactoryMessenger *fmp) const
Fill XML section.
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
virtual double getRmax()
Get maximal distance from center of coordinate system.
GYOTO utilities.
void setLargeRadius(double c)
Set large radius Torus::c_.
virtual double transmission(double nuem, double dsem, double coord[8]) const
Transmission: exp( αν * dsem )
virtual double getRmax()
Get maximal distance from center of coordinate system.
SmartPointer< Spectrum::Generic > spectrum_
Emission law.
Definition: GyotoTorus.h:63
virtual double emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const
Specific intensity Iν
double getSmallRadius() const
Astronomical objects defined bya a potential/distance.
Definition: GyotoStandardAstrobj.h:84