GyotoFreeStar.h
/*
Copyright 2019 Frederic Vincent, Thibaut Paumard, Nicolas Aimar
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 __GyotoFreeStar_H_
#define __GyotoFreeStar_H_
namespace Gyoto{
namespace Astrobj { class FreeStar; }
}
#include <iostream>
#include <fstream>
#include <iomanip>
#include <GyotoMetric.h>
#include <GyotoUniformSphere.h>
#ifdef GYOTO_USE_XERCES
#include <GyotoRegister.h>
#endif
#include <string>
class Gyoto::Astrobj::FreeStar :
public Gyoto::Astrobj::UniformSphere{
friend class Gyoto::SmartPointer<Gyoto::Astrobj::FreeStar>;
// Data :
// -----
private:
double* posIni_; // 4-position of the star in spherical coordinates
double* fourveldt_; // 4-velocity of the star in spherical coordinates (dxi/dt, not dtau)
bool posSet_;
// Constructors - Destructor
// -------------------------
public:
GYOTO_OBJECT; // This object has a (non-inherited) Property list
FreeStar();
FreeStar(const FreeStar& orig);
virtual FreeStar * clone() const ;
virtual ~FreeStar() ;
public:
virtual std::string className() const ;
virtual std::string className_l() const ;
public:
void initPosition(std::vector<double> const &v);
std::vector<double> initPosition() const;
void initVelocity(std::vector<double> const &v);
std::vector<double> initVelocity() const;
void initCoord(std::vector<double> const &v);
std::vector<double> initCoord() const;
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);
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
GyotoRegister.h
Gyoto registers.
GyotoUniformSphere.h
Optically thick or thin, spherical objects.
Gyoto::Astrobj::FreeStar
UniformShere following a trajectory specified in getVelocity (non-geodesic) with a constant velocity.
Definition GyotoFreeStar.h:52
Gyoto::Astrobj::FreeStar::className_l
virtual std::string className_l() const
"free_star"
Gyoto::Astrobj::FreeStar::clone
virtual FreeStar * clone() const
Cloner.
Gyoto::Astrobj::FreeStar::className
virtual std::string className() const
"FreeStar"
Gyoto::Astrobj::FreeStar::getVelocity
void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
Gyoto::Astrobj::FreeStar::getCartesian
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::FreeStar::FreeStar
FreeStar()
Default constructor.
Gyoto::Astrobj::UniformSphere
Optically thick or thin, spherical objects.
Definition GyotoUniformSphere.h:90
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