Gyoto
GyotoStar.h
Go to the documentation of this file.
1 
10 /*
11  Copyright 2011 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 
41 #ifdef GYOTO_USE_XERCES
42 #include <GyotoRegister.h>
43 #endif
44 
45 #include <string>
46 
91  public Gyoto::Worldline {
92  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Star>;
93 
94  // Data :
95  // -----
96  private:
97  int wait_pos_;
98  double * init_vel_;
99 
100  // Constructors - Destructor
101  // -------------------------
102  public:
110  Star(SmartPointer<Metric::Generic> gg, double radius,
111  double pos[4], double v[3]) ;
112 
119  Star();
120 
121  Star(const Star& orig);
122  virtual Star * clone() const ;
123 
124  virtual ~Star() ;
125 
126  // Accessors
127  // ---------
128  public:
129  virtual std::string className() const ;
130  virtual std::string className_l() const ;
131 
132  virtual void setMetric(SmartPointer<Metric::Generic>);
133  virtual SmartPointer<Metric::Generic> getMetric() const;
134 
140  virtual double getMass() const ;
141 
142  public:
143  virtual double getRmax();
144  virtual void unsetRmax();
145  // void setCoordSys(int); ///< Get coordinate system for integration
146  // int getCoordSys(); ///< Set coordinate system for integration
147  void setInitialCondition(double coord[8]);
148 
150  virtual void setInitCoord(double pos[4], double vel[3], int dir=1);
151  virtual void setPosition(double pos[4]);
152  virtual void setVelocity(double vel[3]);
153 
154  virtual int setParameter(std::string name, std::string content);
155 
156  public:
157 #ifdef GYOTO_USE_XERCES
158 
163  virtual void setParameters(FactoryMessenger *fmp) ;
164  virtual void fillElement(FactoryMessenger *fmp) const ;
165 #endif
166 
167  public:
168  virtual void getCartesian(double const * const dates, size_t const n_dates,
169  double * const x, double * const y,
170  double * const z, double * const xprime=NULL,
171  double * const yprime=NULL, double * const zprime=NULL) ;
172  virtual void getVelocity(double const pos[4], double vel[4]) ;
173 
174 };
175 
176 
177 #endif