Gyoto
GyotoFreeStar.h
1 
6 /*
7  Copyright 2019 Frederic Vincent, Thibaut Paumard, Nicolas Aimar
8 
9  This file is part of Gyoto.
10 
11  Gyoto is free software: you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  Gyoto is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
23  */
24 
25 
26 #ifndef __GyotoFreeStar_H_
27 #define __GyotoFreeStar_H_
28 
29 namespace Gyoto{
30  namespace Astrobj { class FreeStar; }
31 }
32 
33 #include <iostream>
34 #include <fstream>
35 #include <iomanip>
36 #include <GyotoMetric.h>
37 #include <GyotoUniformSphere.h>
38 
39 #ifdef GYOTO_USE_XERCES
40 #include <GyotoRegister.h>
41 #endif
42 
43 #include <string>
44 
54 
55  // Data :
56  // -----
57  private:
58  double* posIni_; // 4-position of the star in spherical coordinates
59  double* fourveldt_; // 4-velocity of the star in spherical coordinates (dxi/dt, not dtau)
60  bool posSet_;
61 
62  // Constructors - Destructor
63  // -------------------------
64  public:
65  GYOTO_OBJECT; // This object has a (non-inherited) Property list
66 
74 
75  FreeStar(const FreeStar& orig);
76  virtual FreeStar * clone() const ;
77 
78  virtual ~FreeStar() ;
79 
80  public:
81  virtual std::string className() const ;
82  virtual std::string className_l() const ;
83 
84  public:
85  void initPosition(std::vector<double> const &v);
86  std::vector<double> initPosition() const;
87  void initVelocity(std::vector<double> const &v);
88  std::vector<double> initVelocity() const;
89  void initCoord(std::vector<double> const &v);
90  std::vector<double> initCoord() const;
91 
92  void getCartesian(double const * const dates, size_t const n_dates,
93  double * const x, double * const y,
94  double * const z, double * const xprime=NULL,
95  double * const yprime=NULL,
96  double * const zprime=NULL);
97 
98  void getVelocity(double const pos[4], double vel[4]);
99 
100 };
101 
102 
103 #endif
Base class for metric description.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Gyoto registers.
Optically thick or thin, spherical objects.
UniformShere following a trajectory specified in getVelocity (non-geodesic) with a constant velocity.
Definition: GyotoFreeStar.h:52
virtual std::string className_l() const
"free_star"
virtual std::string className() const
"FreeStar"
void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
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.
virtual FreeStar * clone() const
Cloner.
Optically thick or thin, spherical objects.
Definition: GyotoUniformSphere.h:90
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:44