Gyoto
GyotoInflateStar.h
Go to the documentation of this file.
1 
10 /*
11  Copyright 2011, 2013, 2018 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 __GyotoInflateStar_H_
31 #define __GyotoInflateStar_H_
32 
33 namespace Gyoto{
34  namespace Astrobj { class InflateStar; }
35 }
36 
37 #include <GyotoMetric.h>
38 #include <GyotoStar.h>
39 
40 #ifdef GYOTO_USE_XERCES
41 #include <GyotoRegister.h>
42 #endif
43 
44 #include <string>
45 
52  public Gyoto::Astrobj::Star {
54 
55  // Data :
56  // -----
57  private:
60  double radiusstop_;
61  // Constructors - Destructor
62  // -------------------------
63  public:
64  GYOTO_OBJECT; // This object has a (non-inherited) Property list
65 
72  InflateStar();
73 
74  InflateStar(const InflateStar& orig);
75  virtual InflateStar * clone() const ;
76 
77  virtual ~InflateStar() ;
78 
79  GYOTO_OBJECT_ACCESSORS_UNIT(timeInflateInit);
80  GYOTO_OBJECT_ACCESSORS_UNIT(timeInflateStop);
81  GYOTO_OBJECT_ACCESSORS_UNIT(radiusStop);
82 
83  using Star::radius;
84  virtual double radiusAt(double t) const;
85  virtual double radiusAt(double t,
86  const std::string &t_unit) const;
87  virtual double radiusAt(double t,
88  const std::string &t_unit,
89  const std::string &r_unit) const;
90 
91  // Accessors
92  // ---------
93  public:
94  virtual std::string className() const ;
95  virtual std::string className_l() const ;
96 
97  public:
98 
99  virtual int Impact(Gyoto::Photon* ph, size_t index,
100  Astrobj::Properties *data=NULL);
101  virtual double emission(double nu_em, double dsem,
102  state_t const &cp, double const co[8]=NULL) const;
103 };
104 
105 
106 #endif
virtual std::string className() const
"InflateStar"
Mass-less, spherical object following a timelike geodesic.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
double radiusstop_
maximum radius of star
Definition: GyotoInflateStar.h:60
Gyoto registers.
An Astrobj::Star with growing size.
Definition: GyotoInflateStar.h:51
double timeinflatestop_
coordinate time of stopping inflation
Definition: GyotoInflateStar.h:59
virtual double emission(double nu_em, double dsem, state_t const &cp, double const co[8]=NULL) const
Emission is determined by spectrum_ and opacity_.
virtual std::string className_l() const
"inflate_star"
Base class for metric description.
virtual double radiusAt(double t) const
Radius at a given time.
double radius() const
Get radius_ in geometrical units.
virtual InflateStar * clone() const
Cloner.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
double timeinflateinit_
coordinate time of starting inflation
Definition: GyotoInflateStar.h:58
Mass-less, spherical object following a timelike geodesic.
Definition: GyotoStar.h:93
Pointers performing reference counting.
Definition: GyotoProperty.h:45
virtual int Impact(Gyoto::Photon *ph, size_t index, Astrobj::Properties *data=NULL)
Does a photon at these coordinates impact the object?
#define GYOTO_OBJECT_ACCESSORS_UNIT(method)
Declare a quadruplet of accessors to double member that supports unit.
Definition: GyotoObject.h:70