Gyoto
GyotoFixedStar.h
Go to the documentation of this file.
1
8/*
9 Copyright 2011 Frederic Vincent, Thibaut Paumard
10
11 This file is part of Gyoto.
12
13 Gyoto is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 Gyoto is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
25 */
26
27
28#ifndef __GyotoFixedStar_H_
29#define __GyotoFixedStar_H_
30
31#include <iostream>
32#include <fstream>
33#include <iomanip>
34
35namespace Gyoto{
36 namespace Astrobj { class FixedStar; }
37}
38
39#include <GyotoUniformSphere.h>
40#include <GyotoMetric.h>
41
50
51 // Data :
52 // -----
53
54 protected:
55
56 double pos_[3];
57 bool rotating_;
58
59 // Constructors - Destructor
60 // -------------------------
61 public:
63
69
70 FixedStar(const FixedStar& orig);
71 virtual FixedStar* clone() const;
72
73 FixedStar(SmartPointer<Gyoto::Metric::Generic> gg, double StPsn[3], double radius);
75
76 virtual ~FixedStar() ;
77
78 public:
79 // Accessors
80 // ---------
81 public:
82 double const * getPos() const;
83 void getPos(double* dst) const;
84
85 std::vector<double> position() const;
86 void position(std::vector<double> const&);
87
88 double rMax();
89
90 bool rotating() const ;
91 void rotating(bool) ;
92
93 using Generic::metric;
94 virtual void metric(SmartPointer<Metric::Generic> metric) ;
96 virtual void radius(double radius);
97 void setPos(const double[3]);
98 // void setCoordSys(int); ///< set coordinate system
99
100 // Outputs
101 // -------
102 protected:
103 virtual void getCartesian(double const * const dates, size_t const n_dates,
104 double * const x, double * const y,
105 double * const z, double * const xprime=NULL,
106 double * const yprime=NULL, double * const zprime=NULL) ;
107 virtual void getVelocity(double const pos[4], double vel[4]) ;
108
109
110};
111
112
113#endif
Base class for metric description.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Optically thick or thin, spherical objects.
Fixed (i.e. non-moving) star (or spherical blob)
Definition: GyotoFixedStar.h:48
std::vector< double > position() const
Get vector copy of pos_.
virtual void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
double radius() const
Get radius_ in geometrical units.
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
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)
Yield the Cartesian coordinates of the center of the sphere.
double const * getPos() const
Get const pointer to pos_.
double pos_[3]
x, y, z or r, theta, phi
Definition: GyotoFixedStar.h:56
bool rotating_
Whether the blob has a non-zero 3-velocity at Metric::circularVelocity(); note that the star anyway i...
Definition: GyotoFixedStar.h:57
void setPos(const double[3])
Set pos_ array.
virtual FixedStar * clone() const
Cloner.
double rMax()
Get maximal distance from center of coordinate system.
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Optically thick or thin, spherical objects.
Definition: GyotoUniformSphere.h:90
double radius() const
Get radius_ in geometrical units.
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43