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
33namespace 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 {
97
98 // Data :
99 // -----
100
101 // Constructors - Destructor
102 // -------------------------
103 public:
105
113 Star(SmartPointer<Metric::Generic> gg, double radius,
114 double const pos[4], double const v[3]) ;
115
123
124 Star(const Star& orig);
125 virtual Star * clone() const ;
126
127 virtual ~Star() ;
128
129 // Accessors
130 // ---------
131 public:
132 virtual std::string className() const ;
133 virtual std::string className_l() const ;
134
135 virtual void metric(SmartPointer<Metric::Generic>);
136 virtual SmartPointer<Metric::Generic> metric() const;
137
143 virtual double getMass() const ;
144
145 public:
147 virtual double rMax() ;
148 // void setCoordSys(int); ///< Get coordinate system for integration
149 // int getCoordSys(); ///< Set coordinate system for integration
150 virtual void setInitialCondition(double const coord[8]);
151
152 public:
153 // Object / Property overloading for special needs:
154 // Overload to interpret InitialCoordinate alias, and to interpret
155 // Position/Velocity
156 virtual int setParameter(std::string name,
157 std::string content,
158 std::string unit) ;
159#ifdef GYOTO_USE_XERCES
160 // Overload to 1- get metric first and 2- interpret Position/Velocity
161 virtual void setParameters(FactoryMessenger *fmp) ;
162 // Overload to dispatch InitCoord into Position and Velocity
163 // for massive particle
164 virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const ;
165#endif
166 // Declare the wrappers around the Worldline accessors
168 // Both base classes have deltaMax methods: we need to explicitly
169 // use both
172
173 public:
174
176
182 virtual void getCartesian(double const * const dates, size_t const n_dates,
183 double * const x, double * const y,
184 double * const z, double * const xprime=NULL,
185 double * const yprime=NULL, double * const zprime=NULL) ;
186 virtual void getVelocity(double const pos[4], double vel[4]) ;
187
188};
189
190
191#endif
Base class for metric description.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Gyoto registers.
Spectrum of a simple object (e.g. Star)
Optically thick or thin, spherical objects.
Timelike or null geodesics.
#define GYOTO_WORLDLINE
Declare the Worldline interface wrappers.
Definition: GyotoWorldline.h:156
virtual double rMax()
Get maximal distance from center of coordinate system.
Mass-less, spherical object following a timelike geodesic.
Definition: GyotoStar.h:95
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
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.
virtual double rMax()
Get maximal distance from center of coordinate system.
virtual std::string className_l() const
"star"
virtual void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
virtual void setInitialCondition(double const coord[8])
Same as Worldline::setInitialCondition(gg, coord, sys,1)
virtual void setParameters(FactoryMessenger *fmp)
Main loop in Subcontractor_t function.
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
virtual double getMass() const
Return 1.
virtual Star * clone() const
Cloner.
virtual std::string className() const
"Star"
Optically thick or thin, spherical objects.
Definition: GyotoUniformSphere.h:90
virtual double deltaMax(double *coord)
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
Timelike or null geodesics.
Definition: GyotoWorldline.h:228
double deltaMax() const
Get delta_max_.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43