Gyoto
GyotoDynamicalDisk3D.h
Go to the documentation of this file.
1 
9 /*
10  Copyright 2011-2015 Frederic Vincent, Thibaut Paumard
11 
12  This file is part of Gyoto.
13 
14  Gyoto is free software: you can redistribute it and/or modify
15  it under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  Gyoto is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
26  */
27 
28 #ifndef __GyotoDynamicalDisk3D_H_
29 #define __GyotoDynamicalDisk3D_H_
30 
31 #include <iostream>
32 #include <fstream>
33 #include <iomanip>
34 #include <cstring>
35 
36 namespace Gyoto{
37  namespace Astrobj { class DynamicalDisk3D; }
38 }
39 
40 #include <GyotoDisk3D.h>
41 #include <GyotoBlackBodySpectrum.h>
42 
59  friend class Gyoto::SmartPointer<Gyoto::Astrobj::DynamicalDisk3D>;
60  protected:
61  SmartPointer<Spectrum::BlackBody> spectrumBB_;
62  private:
64  bool temperature_;
65  char* dirname_;
66  double tinit_;
67  double dt_;
68  int nb_times_;
69  double PLindex_;
70  bool novel_;
72 
78  double ** emission_array_;
79 
85  double ** absorption_array_;
86 
93  double ** velocity_array_;
94 
95  // Constructors - Destructor
96  // -------------------------
97  public:
99 
100  DynamicalDisk3D();
101 
102  DynamicalDisk3D(const DynamicalDisk3D& ) ;
103  virtual DynamicalDisk3D* clone () const;
104 
105  virtual ~DynamicalDisk3D() ;
106 
107  // Accessors
108  // ---------
109  public:
110  using Generic::metric;
111  void metric(SmartPointer<Metric::Generic> gg);
112  void file(std::string const &f);
113  std::string file() const;
114  void tinit(double t);
115  double tinit()const;
116  void dt(double t);
117  double dt()const;
118  void PLindex(double t);
119  double PLindex()const;
120  void floorTemperature(double t);
121  double floorTemperature()const;
122  void temperature(bool t);
123  bool temperature() const;
124  void withVelocity(bool t);
125  bool withVelocity() const;
126 
127  // Stuff
128  // -----
130  double emission1date(double nu_em, double dsem,
131  double c_ph[8], double c_obj[8]) const;
132 
133  using Disk3D::emission;
135  virtual double emission(double nu_em, double dsem,
136  double c_ph[8], double c_obj[8]=NULL) const;
137 
139  double transmission1date(double nu_em, double dsem,
140  double c_ph[8], double c_obj[8]) const;
141 
143  double transmission(double nu_em, double dsem,
144  double c_obj[8]) const;
145 
146  void getVelocity(double const pos[4], double vel[4]);
147  double const * getVelocity() const;
148 
149  protected:
150 
152 
155  void copyQuantities(int iq) ;
156 
157 };
158 
159 #endif
Geometrically thick disk read from FITS file.
Definition: GyotoDisk3D.h:56
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:83
char * dirname_
FITS files directory.
Definition: GyotoDynamicalDisk3D.h:65
double dt_
Time increment between two FITS (assumed constant)
Definition: GyotoDynamicalDisk3D.h:67
int nb_times_
Number of times.
Definition: GyotoDynamicalDisk3D.h:68
virtual double emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const
Specific intensity Iν
virtual double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]=NULL) const
Interpolate emission between grid dates.
double ** velocity_array_
velocity(r, z, phi)
Definition: GyotoDynamicalDisk3D.h:93
bool novel_
put to true if velocity of emitting particle is not provided
Definition: GyotoDynamicalDisk3D.h:70
double PLindex_
power law index such that density_elec(E) ∝ E-p
Definition: GyotoDynamicalDisk3D.h:69
A geometrically thick, optically thin disk.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
double floortemperature_
if non-zero, emission and absorption are 0 for temperatures below this floor, emission=blackbody and ...
Definition: GyotoDynamicalDisk3D.h:71
double transmission(double nu_em, double dsem, double c_obj[8]) const
Interpolate transmission between grid dates.
virtual DynamicalDisk3D * clone() const
Cloner.
Pointers performing reference counting.
Definition: GyotoProperty.h:41
double emission1date(double nu_em, double dsem, double c_ph[8], double c_obj[8]) const
Compute emission at one grid date.
bool temperature_
1 if temperature is given in fits data file, 0 if emission coef is directly given ...
Definition: GyotoDynamicalDisk3D.h:64
Geometrically thick optically thin disk read from a set of FITS files.
Definition: GyotoDynamicalDisk3D.h:58
double transmission1date(double nu_em, double dsem, double c_ph[8], double c_obj[8]) const
Compute transmission at one grid date.
SmartPointer< Spectrum::BlackBody > spectrumBB_
emission law
Definition: GyotoDynamicalDisk3D.h:61
double const * getVelocity() const
Get Disk3D::velocity_.
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
I_nu(nu, T) = cst_*2*h*nu^3/c^2/(exp(h*nu/k*T)-1.);.
double ** absorption_array_
Definition: GyotoDynamicalDisk3D.h:85
double ** emission_array_
Definition: GyotoDynamicalDisk3D.h:78
double tinit_
Time of the first FITS file.
Definition: GyotoDynamicalDisk3D.h:66
void copyQuantities(int iq)
Set underlying Disk3D pointers to a specific date slice.