Gyoto
GyotoFlaredDiskSynchrotron.h
Go to the documentation of this file.
1 
7 /*
8  Copyright 2019 Frederic Vincent, 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 __GyotoFlaredDiskSynchrotron_H_
27 #define __GyotoFlaredDiskSynchrotron_H_
28 
29 #include <iostream>
30 #include <fstream>
31 #include <iomanip>
32 
33 namespace Gyoto{
34  namespace Astrobj { class FlaredDiskSynchrotron; }
35  class GridData2D;
36 }
37 
38 #include <GyotoStandardAstrobj.h>
39 #include <GyotoGridData2D.h>
41 
47 : public Astrobj::Standard,
48  public GridData2D,
49  public Hook::Listener
50 {
52  private:
53  SmartPointer<Spectrum::KappaDistributionSynchrotron> spectrumKappaSynch_;
54  std::string filename_;
55  double hoverR_;
57  double temperatureMax_;
58 
63  double * density_;
64 
69  double * velocity_;
70  // Constructors - Destructor
71  // -------------------------
73 
74  public:
77 
79 
80  FlaredDiskSynchrotron(const FlaredDiskSynchrotron& ) ;
81  virtual FlaredDiskSynchrotron* clone () const;
82 
83  virtual ~FlaredDiskSynchrotron() ;
84 
85  // Accessors
86  // ---------
87  public:
88  void file(std::string const &f) ;
89  std::string file() const;
90  void hoverR(double const hor) ;
91  double hoverR() const;
92  /*
93  timeTranslation shifts the value of GridData2D::tmin_ and tmax_,
94  allowing to scan the full simulation without having to change
95  the value of the Screen observation time (which is typically
96  not provided in M unit in the XML).
97  Choosing a negative timeTranslation, i.e. performing tmin_,tmax_-=dt,
98  amounts to increasing the Screen observation time by the same value,
99  tobs+=dt.
100 
101  */
102  void timeTranslation_inMunit(double const dt) ;
103  void magnetizationParameter(double rr);
104  double magnetizationParameter() const;
105  void kappaIndex(double index);
106  double kappaIndex()const;
107  double numberDensityMax() const;
108  double numberDensityMax(std::string const &unit) const;
109  void numberDensityMax(double dens) ;
110  void numberDensityMax(double dens, std::string const &unit);
111  void temperatureMax(double tt);
112  double temperatureMax() const;
113  void copyDensity(double const *const density,
114  size_t const naxes[3]);
115  double const * getDensity() const;
116  void copyVelocity(double const *const velocity,
117  size_t const naxes[3]);
118  double const * getVelocity() const;
119  public:
120  using Generic::metric;
121  std::vector<size_t> fitsRead(std::string filename) ;
122  virtual double operator()(double const coord[4]) ;
123  virtual void radiativeQ(double Inu[],
124  double Taunu[],
125  double const nu_ems[], size_t nbnu,
126  double dsem,
127  state_t const &coord_ph,
128  double const coord_obj[8]) const;
129  virtual void getVelocity(double const pos[4], double vel[4]) ;
130 
131 
132 
133 };
134 
135 #endif
GyotoKappaDistributionSynchrotronSpectrum.h
Powerlaw synchrotron spectrum.
Gyoto::Astrobj::FlaredDiskSynchrotron::numberDensityMax_cgs_
double numberDensityMax_cgs_
Maximum cgs value of number density.
Definition: GyotoFlaredDiskSynchrotron.h:56
Gyoto::Hook::Listener
I might listen to a Teller.
Definition: GyotoHooks.h:64
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Gyoto::Astrobj::FlaredDiskSynchrotron::hoverR_
double hoverR_
Value of aspect ratio H/R of flared disk, where R is the radius projected in the equatorial plane and...
Definition: GyotoFlaredDiskSynchrotron.h:55
GYOTO_OBJECT_THREAD_SAFETY
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
Gyoto::Astrobj::FlaredDiskSynchrotron::clone
virtual FlaredDiskSynchrotron * clone() const
Cloner.
GyotoStandardAstrobj.h
Astronomical objects defined bya a potential/distance.
Gyoto
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
GyotoGridData2D.h
Base class for reading 2D gridded data.
Gyoto::Astrobj::FlaredDiskSynchrotron::velocity_
double * velocity_
velocity(r, φ)
Definition: GyotoFlaredDiskSynchrotron.h:69
Gyoto::Astrobj::FlaredDiskSynchrotron::radiativeQ
virtual void radiativeQ(double Inu[], double Taunu[], double const nu_ems[], size_t nbnu, double dsem, state_t const &coord_ph, double const coord_obj[8]) const
emission and transmission together
Gyoto::SmartPointer
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Gyoto::Astrobj::FlaredDiskSynchrotron
Definition: GyotoFlaredDiskSynchrotron.h:46
Gyoto::Astrobj::FlaredDiskSynchrotron::temperatureMax_
double temperatureMax_
Maximum temperature in K.
Definition: GyotoFlaredDiskSynchrotron.h:57
Gyoto::GridData2D
Class for reading data stored in a 2D grid.
Definition: GyotoGridData2D.h:51
Gyoto::Astrobj::FlaredDiskSynchrotron::magnetizationParameter_
double magnetizationParameter_
(B2/(4 pi)) / (ne mp c2)
Definition: GyotoFlaredDiskSynchrotron.h:72
Gyoto::Astrobj::Standard
Astronomical objects defined bya a potential/distance.
Definition: GyotoStandardAstrobj.h:84
Gyoto::Astrobj::FlaredDiskSynchrotron::density_
double * density_
Surface density (ν, r, φ)
Definition: GyotoFlaredDiskSynchrotron.h:63
Gyoto::Astrobj::FlaredDiskSynchrotron::filename_
std::string filename_
Optional FITS file name containing the arrays.
Definition: GyotoFlaredDiskSynchrotron.h:54
Gyoto::Astrobj::Generic::metric
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.