Gyoto
GyotoStar.h
Go to the documentation of this file.
1
10/*
11 Copyright 2011, 2013 Frederic Vincent, Thibaut Paumard
12
13 This file is part of Gyoto.
14
15 Gyoto is free software: you can redistribute it and/or modify
16 it under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
19
20 Gyoto is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
27 */
28
29
30#ifndef __GyotoStar_H_
31#define __GyotoStar_H_
32
33namespace Gyoto{
34 namespace Astrobj { class Star; }
35}
36
37#include <GyotoMetric.h>
38#include <GyotoUniformSphere.h>
39#include <GyotoSpectrum.h>
40#include <GyotoWorldline.h>
42
43#ifdef GYOTO_USE_XERCES
44#include <GyotoRegister.h>
45#endif
46
47#include <string>
48
96 public Gyoto::Worldline {
98
99 // Data :
100 // -----
101 private:
102 SmartPointer<Spectrum::ThermalSynchrotron> spectrumThermalSynch_; // Thermal distribution synchrotron spectrum
103
104 // Constructors - Destructor
105 // -------------------------
106 public:
108
116 Star(SmartPointer<Metric::Generic> gg, double radius,
117 double const pos[4], double const v[3]) ;
118
126
127 Star(const Star& orig);
128 virtual Star * clone() const ;
129
130 virtual ~Star() ;
131
132 // Accessors
133 // ---------
134 public:
135 virtual std::string className() const ;
136 virtual std::string className_l() const ;
137
138 virtual void metric(SmartPointer<Metric::Generic>);
139 virtual SmartPointer<Metric::Generic> metric() const;
140
146 virtual double getMass() const ;
147
148 public:
150 virtual double rMax() ;
151 // void setCoordSys(int); ///< Get coordinate system for integration
152 // int getCoordSys(); ///< Set coordinate system for integration
153 virtual void setInitialCondition(double const coord[8]);
154
155 public:
156 // Object / Property overloading for special needs:
157 // Overload to interpret InitialCoordinate alias, and to interpret
158 // Position/Velocity
159 virtual int setParameter(std::string name,
160 std::string content,
161 std::string unit) ;
162#ifdef GYOTO_USE_XERCES
163 // Overload to 1- get metric first and 2- interpret Position/Velocity
164 virtual void setParameters(FactoryMessenger *fmp) ;
165 // Overload to dispatch InitCoord into Position and Velocity
166 // for massive particle
167 virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const ;
168#endif
169 // Declare the wrappers around the Worldline accessors
171 // Both base classes have deltaMax methods: we need to explicitly
172 // use both
175
176 public:
177
179
185 virtual void getCartesian(double const * const dates, size_t const n_dates,
186 double * const x, double * const y,
187 double * const z, double * const xprime=NULL,
188 double * const yprime=NULL, double * const zprime=NULL) ;
189 virtual void getVelocity(double const pos[4], double vel[4]) ;
190
191 virtual void radiativeQ(double *Inu, double *Qnu, double *Unu, double *Vnu,
192 Eigen::Matrix4d *Onu,
193 double const *nuem , size_t nbnu, double dsem,
194 state_t const &cph, double const *co) const;
195
196};
197
198
199#endif
Base class for metric description.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition GyotoObject.h:84
Gyoto registers.
Spectrum of a simple object (e.g. Star)
Thermal synchrotron spectrum.
Optically thick or thin, spherical objects.
Timelike or null geodesics.
#define GYOTO_WORLDLINE
Declare the Worldline interface wrappers.
Definition GyotoWorldline.h:164
virtual double rMax()
Get maximal distance from center of coordinate system.
Mass-less, spherical object following a timelike geodesic.
Definition GyotoStar.h:96
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
virtual void radiativeQ(double *Inu, double *Qnu, double *Unu, double *Vnu, Eigen::Matrix4d *Onu, double const *nuem, size_t nbnu, double dsem, state_t const &cph, double const *co) const
Compute the increment of Stokes parameters and transmission matrix. Polarised version of RadiaveQ.
virtual 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)
Get the 6 Cartesian coordinates for specific dates.
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
virtual double rMax()
Get maximal distance from center of coordinate system.
virtual std::string className_l() const
"star"
virtual void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
virtual void setInitialCondition(double const coord[8])
Same as Worldline::setInitialCondition(gg, coord, sys,1)
virtual void setParameters(FactoryMessenger *fmp)
Main loop in Subcontractor_t function.
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
virtual double getMass() const
Return 1.
virtual Star * clone() const
Cloner.
virtual std::string className() const
"Star"
Optically thick or thin, spherical objects.
Definition GyotoUniformSphere.h:90
virtual double deltaMax(double *coord)
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Timelike or null geodesics.
Definition GyotoWorldline.h:240
double deltaMax() const
Get delta_max_.
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44