Gyoto
GyotoBlob.h
Go to the documentation of this file.
1 
23 /*
24  Copyright 2019 Frederic Vincent, Thibaut Paumard
25 
26  This file is part of Gyoto.
27 
28  Gyoto is free software: you can redistribute it and/or modify
29  it under the terms of the GNU General Public License as published by
30  the Free Software Foundation, either version 3 of the License, or
31  (at your option) any later version.
32 
33  Gyoto is distributed in the hope that it will be useful,
34  but WITHOUT ANY WARRANTY; without even the implied warranty of
35  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36  GNU General Public License for more details.
37 
38  You should have received a copy of the GNU General Public License
39  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
40  */
41 
42 
43 #ifndef __GyotoBlob_H_
44 #define __GyotoBlob_H_
45 
46 namespace Gyoto{
47  namespace Astrobj { class Blob; }
48 }
49 
50 #include <GyotoMetric.h>
51 #include <GyotoUniformSphere.h>
55 
56 #ifdef GYOTO_USE_XERCES
57 #include <GyotoRegister.h>
58 #endif
59 
60 #include <string>
61 
71 
72  // Data :
73  // -----
74  private:
77  double* init4Coord_;
78  double* init3Velo_;
79  std::string blobMotionType_;
81  double temperature_;
82  double timeRef_M_;
83  double timeSigma_M_;
85  double kappaIndex_;
86  SmartPointer<Spectrum::KappaDistributionSynchrotron> spectrumKappaSynch_; // kappa-distribution synchrotron spectrum
87  SmartPointer<Spectrum::PowerLawSynchrotron> spectrumPLSynch_; // PL-distribution synchrotron spectrum
88  SmartPointer<Spectrum::ThermalSynchrotron> spectrumThermalSynch_; // Thermal distribution synchrotron spectrum
89  std::string electronDistrib_; // Electron distribution (thermal, kappa)
90 
91  // Constructors - Destructor
92  // -------------------------
93  public:
94  GYOTO_OBJECT; // This object has a (non-inherited) Property list
95 
102  Blob();
103 
104  Blob(const Blob& orig);
105  virtual Blob * clone() const ;
106 
107  virtual ~Blob() ;
108 
109  public:
110  void electronDistribution(const std::string &kind);
111  std::string electronDistribution() const;
112 
113  void blobMotionType(const std::string &kind) ;
114  std::string blobMotionType() const ;
115 
116  virtual std::string className() const ;
117  virtual std::string className_l() const ;
118 
119  public:
120 
121  bool timeGaussianModulated() const;
122  void timeGaussianModulated(bool timemod) ;
123  bool spaceGaussianModulated() const;
124  void spaceGaussianModulated(bool spacemod) ;
125  void init4Coord(std::vector<double> const &v) ;
126  std::vector<double> init4Coord() const ;
127  void init3Velo(std::vector<double> const &v);
128  std::vector<double> init3Velo() const ;
129  double numberDensity() const;
130  double numberDensity(std::string const &unit) const;
131  void numberDensity(double ne);
132  void numberDensity(double dens, std::string const &unit);
133  double temperature() const;
134  void temperature(double tt);
135  double timeRef() const;
136  double timeRef(std::string const &unit) const;
137  void timeRef(double tt);
138  void timeRef(double tt, std::string const &unit);
139  double timeSigma() const;
140  double timeSigma(std::string const &unit) const;
141  void timeSigma(double tt);
142  void timeSigma(double tt, std::string const &unit);
143  void magnetizationParameter(double rr);
144  double magnetizationParameter() const;
145  double kappaIndex() const;
146  void kappaIndex(double);
147 
148  virtual void radiativeQ(double Inu[], double Taunu[],
149  double const nu_em[], size_t nbnu,
150  double dsem, state_t const &coord_ph,
151  double const coord_obj[8]=NULL) const ;
152 
153  virtual void radiativeQ(double Inu[], double Qnu[], double Unu[],
154  double Vnu[], Eigen::Matrix4d Onu[],
155  double const nu_ems[], size_t nbnu, double dsem,
156  state_t const &coord_ph, double const coord_obj[8]) const;
157 
158  void getVelocity(double const pos[4], double vel[4]);
159 
160  void getCartesian(double const * const dates, size_t const n_dates,
161  double * const x, double * const y, double * const z,
162  double * const xprime=NULL, double * const yprime=NULL, double * const zprime=NULL);
163 
164 
165 };
166 
167 
168 #endif
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Optically thick or thin, spherical objects.
Definition: GyotoUniformSphere.h:89
double magnetizationParameter_
magnetization parameter
Definition: GyotoBlob.h:84
Gyoto registers.
Thermal synchrotron spectrum.
double temperature_
temperature of hotspot
Definition: GyotoBlob.h:81
double * init4Coord_
Initial 4-coordinate of the Blob, eg (t,r,theta,phi)
Definition: GyotoBlob.h:77
void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
double timeRef_M_
M-unit reference time for Gaussian hotspot evolution.
Definition: GyotoBlob.h:82
Base class for metric description.
virtual std::string className_l() const
"inflate_star"
bool space_gauss_modulated_
True if blob emitting volume is a Gaussian with 3-sigma extension coinciding with the blob&#39;s radius_...
Definition: GyotoBlob.h:76
Optically thick or thin, spherical objects.
virtual Blob * clone() const
Cloner.
double kappaIndex_
hotspot synchrotron kappa-distribution index
Definition: GyotoBlob.h:85
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:46
std::string blobMotionType_
Type of motion of the Blob, "Equatorial" is circular constant Omega in equatorial plane; "Helical" if...
Definition: GyotoBlob.h:79
double timeSigma_M_
M-unit temporal sigma for Gaussian hotspot evolution.
Definition: GyotoBlob.h:83
virtual std::string className() const
"Blob"
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Blob of plasma following a given orbit, emitting synchrotron, with Gaussian density and temperature...
Definition: GyotoBlob.h:68
bool time_gauss_modulated_
True if blob emission time-modulated by a Gaussian with parameters timeRef_M_ and timeSigma_M_...
Definition: GyotoBlob.h:75
double numberDensity_cgs_
cgs-unit number density of hotspot
Definition: GyotoBlob.h:80
Powerlaw synchrotron spectrum.
Powerlaw synchrotron spectrum.
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)
Yield the Cartesian coordinates of the center of the sphere.
double * init3Velo_
Initial 3-velocity of the Blob, eg (dr/dt, dtheta/dt, dphi/dt)
Definition: GyotoBlob.h:78
virtual void radiativeQ(double Inu[], double Taunu[], double const nu_em[], size_t nbnu, double dsem, state_t const &coord_ph, double const coord_obj[8]=NULL) const
emission and transmission together