GyotoStar.h
Go to the documentation of this file.
/*
Copyright 2011, 2013 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 __GyotoStar_H_
#define __GyotoStar_H_
namespace Gyoto{
namespace Astrobj { class Star; }
}
#include <GyotoMetric.h>
#include <GyotoUniformSphere.h>
#include <GyotoSpectrum.h>
#include <GyotoWorldline.h>
#include <GyotoThermalSynchrotronSpectrum.h>
#ifdef GYOTO_USE_XERCES
#include <GyotoRegister.h>
#endif
#include <string>
class Gyoto::Astrobj::Star :
public Gyoto::Astrobj::UniformSphere,
public Gyoto::Worldline {
friend class Gyoto::SmartPointer<Gyoto::Astrobj::Star>;
// Data :
// -----
private:
SmartPointer<Spectrum::ThermalSynchrotron> spectrumThermalSynch_; // Thermal distribution synchrotron spectrum
// Constructors - Destructor
// -------------------------
public:
GYOTO_OBJECT;
Star(SmartPointer<Metric::Generic> gg, double radius,
double const pos[4], double const v[3]) ;
Star();
Star(const Star& orig);
virtual Star * clone() const ;
virtual ~Star() ;
// Accessors
// ---------
public:
virtual std::string className() const ;
virtual std::string className_l() const ;
virtual void metric(SmartPointer<Metric::Generic>);
virtual SmartPointer<Metric::Generic> metric() const;
virtual double getMass() const ;
public:
using UniformSphere::rMax;
virtual double rMax() ;
// void setCoordSys(int); ///< Get coordinate system for integration
// int getCoordSys(); ///< Set coordinate system for integration
virtual void setInitialCondition(double const coord[8]);
public:
// Object / Property overloading for special needs:
// Overload to interpret InitialCoordinate alias, and to interpret
// Position/Velocity
virtual int setParameter(std::string name,
std::string content,
std::string unit) ;
#ifdef GYOTO_USE_XERCES
// Overload to 1- get metric first and 2- interpret Position/Velocity
virtual void setParameters(FactoryMessenger *fmp) ;
// Overload to dispatch InitCoord into Position and Velocity
// for massive particle
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const ;
#endif
// Declare the wrappers around the Worldline accessors
GYOTO_WORLDLINE;
// Both base classes have deltaMax methods: we need to explicitly
// use both
using Gyoto::Worldline::deltaMax;
using Gyoto::Astrobj::UniformSphere::deltaMax;
public:
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]) ;
virtual void radiativeQ(double *Inu, double *Qnu, double *Unu, double *Vnu,
Eigen::Matrix4d *Onu,
double const *nuem , size_t nbnu, double dsem,
state_t const &cph, double const *co) const;
};
#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.
GyotoSpectrum.h
Spectrum of a simple object (e.g. Star).
GyotoThermalSynchrotronSpectrum.h
Thermal synchrotron spectrum.
GyotoUniformSphere.h
Optically thick or thin, spherical objects.
GyotoWorldline.h
Timelike or null geodesics.
Gyoto::Astrobj::Generic::rMax
virtual double rMax()
Get maximal distance from center of coordinate system.
Gyoto::Astrobj::Star
Mass-less, spherical object following a timelike geodesic.
Definition GyotoStar.h:96
Gyoto::Astrobj::Star::metric
virtual void metric(SmartPointer< Metric::Generic >)
Set the Metric gg_.
Gyoto::Astrobj::Star::fillProperty
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
Gyoto::Astrobj::Star::radiativeQ
virtual void radiativeQ(double *Inu, double *Qnu, double *Unu, double *Vnu, Eigen::Matrix4d *Onu, double const *nuem, size_t nbnu, double dsem, state_t const &cph, double const *co) const
Compute the increment of Stokes parameters and transmission matrix. Polarised version of RadiaveQ.
Gyoto::Astrobj::Star::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)
Get the 6 Cartesian coordinates for specific dates.
Gyoto::Astrobj::Star::setParameter
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
Gyoto::Astrobj::Star::Star
Star(SmartPointer< Metric::Generic > gg, double radius, double const pos[4], double const v[3])
Create Star object and set initial condition.
Gyoto::Astrobj::Star::rMax
virtual double rMax()
Get maximal distance from center of coordinate system.
Gyoto::Astrobj::Star::className_l
virtual std::string className_l() const
"star"
Gyoto::Astrobj::Star::getVelocity
virtual void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
Gyoto::Astrobj::Star::setInitialCondition
virtual void setInitialCondition(double const coord[8])
Same as Worldline::setInitialCondition(gg, coord, sys,1).
Gyoto::Astrobj::Star::setParameters
virtual void setParameters(FactoryMessenger *fmp)
Main loop in Subcontractor_t function.
Gyoto::Astrobj::Star::getMass
virtual double getMass() const
Return 1.
Gyoto::Astrobj::Star::clone
virtual Star * clone() const
Cloner.
Gyoto::Astrobj::Star::className
virtual std::string className() const
"Star"
Gyoto::Astrobj::UniformSphere
Optically thick or thin, spherical objects.
Definition GyotoUniformSphere.h:90
Gyoto::Astrobj::UniformSphere::deltaMax
virtual double deltaMax(double *coord)
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Worldline
Timelike or null geodesics.
Definition GyotoWorldline.h:240
Gyoto::Worldline::deltaMax
double deltaMax() const
Get delta_max_.
Gyoto::Astrobj
Access to astronomical objects.
Definition GyotoAstrobj.h:49
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44