Gyoto
GyotoStarTrace.h
Go to the documentation of this file.
1 
12 /*
13  Copyright 2013-2015 Thibaut Paumard
14 
15  This file is part of Gyoto.
16 
17  Gyoto is free software: you can redistribute it and/or modify
18  it under the terms of the GNU General Public License as published by
19  the Free Software Foundation, either version 3 of the License, or
20  (at your option) any later version.
21 
22  Gyoto is distributed in the hope that it will be useful,
23  but WITHOUT ANY WARRANTY; without even the implied warranty of
24  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  GNU General Public License for more details.
26 
27  You should have received a copy of the GNU General Public License
28  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
29  */
30 
31 
32 #ifndef __GyotoStarTrace_H_
33 #define __GyotoStarTrace_H_
34 
35 namespace Gyoto{
36  namespace Astrobj { class StarTrace; }
37 }
38 
39 #include <GyotoStar.h>
40 
70  public Gyoto::Astrobj::Star {
72 
73  // Data :
74  // -----
75  protected:
76  double tmin_;
77  double tmax_;
78  double * x_;
79  double * y_;
80  double * z_;
81 
82  // Constructors - Destructor
83  // -------------------------
84  public:
86 
95  StarTrace(SmartPointer<Metric::Generic> gg, double radius,
96  double const pos[4], double const v[3]) ;
97 
104  StarTrace();
105 
106  StarTrace(const StarTrace& orig);
107 
108 
110  StarTrace(const Star& o, double tmin, double tmax);
111 
112  virtual StarTrace * clone() const ;
113 
114  virtual ~StarTrace() ;
115 
116  using Star::xAllocate;
117  void xAllocate(size_t);
118  void xAllocateXYZ();
119  using Star::xExpand;
120  size_t xExpand(int);
121 
122  void computeXYZ(size_t i);
123  void computeXYZ();
124 
125  using Star::setInitCoord;
126  virtual void setInitCoord(const double coord[8], int dir = 0);
127 
128  using Generic::metric;
129  virtual void metric(SmartPointer<Metric::Generic> gg);
130 
131  virtual void xStore(size_t ind, state_t const &coord, double tau) ;
132 
133  // Accessors
134  // ---------
135  public:
136  virtual std::string className() const ;
137  virtual std::string className_l() const ;
138 
139  double TMin()const;
140  void TMin(double);
141  double TMax()const;
142  void TMax(double);
143 
145  virtual void setInitialCondition(double const coord[8]);
146 
147  virtual double operator()(double const coord[4]) ;
148 
149 };
150 
151 
152 #endif
Mass-less, spherical object following a timelike geodesic.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
double tmax_
Maximum date to consider on the underlying Star orbit.
Definition: GyotoStarTrace.h:77
size_t xExpand(int)
Expand x0, x1 etc... to hold more elements.
virtual void setInitialCondition(double const coord[8])
Same as Worldline::setInitialCondition(gg, coord, sys,1)
double * y_
Cartesian y.
Definition: GyotoStarTrace.h:79
double tmin_
Minimum date to consider on the underlying Star orbit.
Definition: GyotoStarTrace.h:76
double TMin() const
Get tmin_.
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:387
Like a Star that would be on all points of its orbit at all time.
Definition: GyotoStarTrace.h:69
void computeXYZ()
Compute (and cache) x_, y_ and z_.
virtual std::string className_l() const
"startrace"
virtual void setInitialCondition(double const coord[8])
Same as Worldline::setInitialCondition(gg, coord, sys,1)
double * x_
Cartesian x.
Definition: GyotoStarTrace.h:78
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
virtual void setInitCoord(const double coord[8], int dir=0)
Set Initial coordinate.
double * z_
Cartesian z.
Definition: GyotoStarTrace.h:80
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
virtual void xStore(size_t ind, state_t const &coord, double tau)
Store coord at index ind.
Mass-less, spherical object following a timelike geodesic.
Definition: GyotoStar.h:93
Pointers performing reference counting.
Definition: GyotoProperty.h:45
double TMax() const
Get tmax_.
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
virtual size_t xExpand(int dir)
Expand x0, x1 etc... to hold more elements.
virtual std::string className() const
"StarTrace"
virtual void setInitCoord(const double coord[8], int dir, double const Ephi[4], double const Etheta[4])
Set Initial coordinate.
virtual void xAllocate()
Allocate x0, x1 etc. with default size.
void xAllocateXYZ()
Allocate x_, y_, z_.
virtual StarTrace * clone() const
Cloner.