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
33namespace Gyoto{
34 namespace Astrobj { class FlaredDiskSynchrotron; }
35 class GridData2D;
36}
37
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_;
63 double * density_;
69 double * velocity_;
70 // Constructors - Destructor
71 // -------------------------
73
74 public:
77
79
80 FlaredDiskSynchrotron(const FlaredDiskSynchrotron& ) ;
81 virtual FlaredDiskSynchrotron* clone () const;
82
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
Base class for reading 2D gridded data.
Powerlaw synchrotron spectrum.
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Astronomical objects defined bya a potential/distance.
Definition: GyotoFlaredDiskSynchrotron.h:50
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
double * density_
Surface density (ν, r, φ)
Definition: GyotoFlaredDiskSynchrotron.h:63
std::string filename_
Optional FITS file name containing the arrays.
Definition: GyotoFlaredDiskSynchrotron.h:54
double magnetizationParameter_
(B2/(4 pi)) / (ne mp c2)
Definition: GyotoFlaredDiskSynchrotron.h:72
virtual FlaredDiskSynchrotron * clone() const
Cloner.
double temperatureMax_
Maximum temperature in K.
Definition: GyotoFlaredDiskSynchrotron.h:57
double numberDensityMax_cgs_
Maximum cgs value of number density.
Definition: GyotoFlaredDiskSynchrotron.h:56
double * velocity_
velocity(r, φ)
Definition: GyotoFlaredDiskSynchrotron.h:69
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
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Astronomical objects defined bya a potential/distance.
Definition: GyotoStandardAstrobj.h:87
Class for reading data stored in a 2D grid.
Definition: GyotoGridData2D.h:52
I might listen to a Teller.
Definition: GyotoHooks.h:64
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43