Gyoto
GyotoStarTrace.h
Go to the documentation of this file.
1 
12 /*
13  Copyright 2013 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 {
71  friend class Gyoto::SmartPointer<Gyoto::Astrobj::StarTrace>;
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:
92  StarTrace(SmartPointer<Metric::Generic> gg, double radius,
93  double pos[4], double v[3]) ;
94 
101  StarTrace();
102 
103  StarTrace(const StarTrace& orig);
104 
105 
107  StarTrace(const Star& o, double tmin, double tmax);
108 
109  virtual StarTrace * clone() const ;
110 
111  virtual ~StarTrace() ;
112 
113  using Star::xAllocate;
114  void xAllocate(size_t);
115  void xAllocateXYZ();
116  using Star::xExpand;
117  size_t xExpand(int);
118 
119  void computeXYZ(size_t i);
120  void computeXYZ();
121 
122  using Star::setInitCoord;
123  virtual void setInitCoord(const double coord[8], int dir);
124 
125  using Generic::metric;
126  virtual void metric(SmartPointer<Metric::Generic> gg);
127 
128  virtual void xStore(size_t ind, double coord[8]) ;
129 
130  // Accessors
131  // ---------
132  public:
133  virtual std::string className() const ;
134  virtual std::string className_l() const ;
135 
136  double TMin();
137  void TMin(double);
138  double TMax();
139  void TMax(double);
140 
141  virtual void setInitialCondition(double coord[8]);
142 
143  virtual int setParameter(std::string name,
144  std::string content,
145  std::string unit);
146 
147 #ifdef GYOTO_USE_XERCES
148  virtual void fillElement(FactoryMessenger *fmp) const ;
149 #endif
150 
151  virtual double operator()(double const coord[4]) ;
152 
153 };
154 
155 
156 #endif
Mass-less, spherical object following a timelike geodesic.
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
double tmax_
Maximum date to consider on the underlying Star orbit.
Definition: GyotoStarTrace.h:77
virtual void setInitialCondition(double coord[8])
Same as Worldline::setInitialCondition(gg, coord, sys,1)
size_t xExpand(int)
Expand x0, x1 etc... to hold more elements.
double * y_
Cartesian y.
Definition: GyotoStarTrace.h:79
double TMin()
Get tmin_.
double tmin_
Minimum date to consider on the underlying Star orbit.
Definition: GyotoStarTrace.h:76
virtual std::string className_l() const
"startrace"
#define size_t
If not defined in .
Definition: GyotoConfig.h:305
Like a Star that would be on all points of its orbit at all time.
Definition: GyotoStarTrace.h:69
virtual StarTrace * clone() const
Cloner.
virtual std::string className() const
"StarTrace"
void computeXYZ()
Compute (and cache) x_, y_ and z_.
double * x_
Cartesian x.
Definition: GyotoStarTrace.h:78
double TMax()
Get tmax_.
double * z_
Cartesian z.
Definition: GyotoStarTrace.h:80
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:42
virtual void fillElement(FactoryMessenger *fmp) const
called from Factory
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Mass-less, spherical object following a timelike geodesic.
Definition: GyotoStar.h:93
virtual size_t xExpand(int dir)
Expand x0, x1 etc... to hold more elements.
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
virtual void setInitCoord(const double coord[8], int dir)
Set Initial coordinate.
virtual void setInitCoord(const double coord[8], int dir=0)
Set Initial coordinate.
virtual void xStore(size_t ind, double coord[8])
Store coord at index ind.
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
virtual void xAllocate()
Allocate x0, x1 etc. with default size.
void xAllocateXYZ()
Allocate x_, y_, z_.