GyotoFixedStar.h
Go to the documentation of this file.
/*
Copyright 2011 Frederic Vincent, Thibaut Paumard
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoFixedStar_H_
#define __GyotoFixedStar_H_
#include <iostream>
#include <fstream>
#include <iomanip>
namespace Gyoto{
namespace Astrobj { class FixedStar; }
}
#include <GyotoUniformSphere.h>
#include <GyotoMetric.h>
class Gyoto::Astrobj::FixedStar : public Astrobj::UniformSphere {
friend class Gyoto::SmartPointer<Gyoto::Astrobj::FixedStar>;
// Data :
// -----
protected:
double pos_[3];
bool rotating_;
// Constructors - Destructor
// -------------------------
public:
GYOTO_OBJECT;
FixedStar();
FixedStar(const FixedStar& orig);
virtual FixedStar* clone() const;
FixedStar(SmartPointer<Gyoto::Metric::Generic> gg, double StPsn[3], double radius);
virtual ~FixedStar() ;
public:
// Accessors
// ---------
public:
double const * getPos() const;
void getPos(double* dst) const;
std::vector<double> position() const;
void position(std::vector<double> const&);
double rMax();
bool rotating() const ;
void rotating(bool) ;
using Generic::metric;
virtual void metric(SmartPointer<Metric::Generic> metric) ;
using UniformSphere::radius;
virtual void radius(double radius);
void setPos(const double[3]);
// void setCoordSys(int); ///< set coordinate system
// Outputs
// -------
protected:
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) ;
virtual void getVelocity(double const pos[4], double vel[4]) ;
};
#endif
GyotoMetric.h
Base class for metric description.
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoUniformSphere.h
Optically thick or thin, spherical objects.
Gyoto::Astrobj::FixedStar
Fixed (i.e. non-moving) star (or spherical blob).
Definition GyotoFixedStar.h:48
Gyoto::Astrobj::FixedStar::position
std::vector< double > position() const
Get vector copy of pos_.
Gyoto::Astrobj::FixedStar::getVelocity
virtual void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
Gyoto::Astrobj::FixedStar::metric
virtual void metric(SmartPointer< Metric::Generic > metric)
Set the Metric gg_.
Gyoto::Astrobj::FixedStar::getCartesian
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.
Gyoto::Astrobj::FixedStar::radius
virtual void radius(double radius)
Set radius.
Gyoto::Astrobj::FixedStar::getPos
double const * getPos() const
Get const pointer to pos_.
Gyoto::Astrobj::FixedStar::pos_
double pos_[3]
x, y, z or r, theta, phi
Definition GyotoFixedStar.h:56
Gyoto::Astrobj::FixedStar::rotating_
bool rotating_
Whether the blob has a non-zero 3-velocity at Metric::circularVelocity(); note that the star anyway i...
Definition GyotoFixedStar.h:57
Gyoto::Astrobj::FixedStar::FixedStar
FixedStar()
Default constructor.
Gyoto::Astrobj::FixedStar::setPos
void setPos(const double[3])
Set pos_ array.
Gyoto::Astrobj::FixedStar::clone
virtual FixedStar * clone() const
Cloner.
Gyoto::Astrobj::FixedStar::rMax
double rMax()
Get maximal distance from center of coordinate system.
Gyoto::Astrobj::Generic::metric
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Gyoto::Astrobj::UniformSphere
Optically thick or thin, spherical objects.
Definition GyotoUniformSphere.h:90
Gyoto::Astrobj::UniformSphere::radius
double radius() const
Get radius_ in geometrical units.
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Astrobj
Access to astronomical objects.
Definition GyotoAstrobj.h:49
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44