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 
33 namespace Gyoto{
34  namespace Astrobj { class Star; }
35 }
36 
37 #include <GyotoMetric.h>
38 #include <GyotoUniformSphere.h>
39 #include <GyotoSpectrum.h>
40 #include <GyotoWorldline.h>
41 
42 #ifdef GYOTO_USE_XERCES
43 #include <GyotoRegister.h>
44 #endif
45 
46 #include <string>
47 
95  public Gyoto::Worldline {
96  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Star>;
97 
98  // Data :
99  // -----
100 
101  // Constructors - Destructor
102  // -------------------------
103  public:
111  Star(SmartPointer<Metric::Generic> gg, double radius,
112  double pos[4], double v[3]) ;
113 
120  Star();
121 
122  Star(const Star& orig);
123  virtual Star * clone() const ;
124 
125  virtual ~Star() ;
126 
127  // Accessors
128  // ---------
129  public:
130  virtual std::string className() const ;
131  virtual std::string className_l() const ;
132 
133  virtual void setMetric(SmartPointer<Metric::Generic>);
134  virtual SmartPointer<Metric::Generic> getMetric() const;
135 
141  virtual double getMass() const ;
142 
143  public:
145  virtual double getRmax();
146  virtual void unsetRmax();
147  // void setCoordSys(int); ///< Get coordinate system for integration
148  // int getCoordSys(); ///< Set coordinate system for integration
149  void setInitialCondition(double coord[8]);
150 
151  virtual int setParameter(std::string name,
152  std::string content,
153  std::string unit);
154 
155  public:
156 #ifdef GYOTO_USE_XERCES
157 
162  virtual void setParameters(FactoryMessenger *fmp) ;
163  virtual void fillElement(FactoryMessenger *fmp) const ;
164 #endif
165 
166  public:
167 
169 
175  virtual void getCartesian(double const * const dates, size_t const n_dates,
176  double * const x, double * const y,
177  double * const z, double * const xprime=NULL,
178  double * const yprime=NULL, double * const zprime=NULL) ;
179  virtual void getVelocity(double const pos[4], double vel[4]) ;
180 
181 };
182 
183 
184 #endif
virtual double getRmax()
Get maximal distance from center of coordinate system.
virtual void unsetRmax()
Set rmax_set_ to 0.
Optically thick or thin, spherical objects.
Definition: GyotoUniformSphere.h:83
Timelike or null geodesics.
Definition: GyotoWorldline.h:60
Gyoto registers.
virtual void fillElement(FactoryMessenger *fmp) const
called from Factory
virtual void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
virtual std::string className() const
&quot;Star&quot;
virtual SmartPointer< Metric::Generic > getMetric() const
Get the Metric Generic::gg_.
Timelike or null geodesics.
Base class for metric description.
Optically thick or thin, spherical objects.
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.
void setInitialCondition(double coord[8])
Same as Worldline::setInitialCondition(gg, coord, sys,1)
Spectrum of a simple object (e.g. Star)
virtual void setParameters(FactoryMessenger *fmp)
virtual std::string className_l() const
&quot;star&quot;
Mass-less, spherical object following a timelike geodesic.
Definition: GyotoStar.h:93
virtual Star * clone() const
Cloner.
virtual void setMetric(SmartPointer< Metric::Generic >)
Set the Metric Generic::gg_.
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
virtual double getRmax()
Get maximal distance from center of coordinate system.
virtual double getMass() const
Return 1.