GyotoPlasmoid.h
Go to the documentation of this file.
/*
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 __GyotoPlasmoid_H_
#define __GyotoPlasmoid_H_
namespace Gyoto{
namespace Astrobj { class Plasmoid; }
}
#include <iostream>
#include <fstream>
#include <iomanip>
#include <GyotoMetric.h>
#include <GyotoUniformSphere.h>
#include <GyotoFitsRW.h>
#include <GyotoKappaDistributionSynchrotronSpectrum.h>
//#include <GyotoThermalSynchrotronSpectrum.h>
#ifdef GYOTO_USE_CFITSIO
#include <fitsio.h>
#endif
#ifdef GYOTO_USE_XERCES
#include <GyotoRegister.h>
#endif
#include <string>
class Gyoto::Astrobj::Plasmoid :
public FitsRW,
public Gyoto::Astrobj::UniformSphere{
friend class Gyoto::SmartPointer<Gyoto::Astrobj::Plasmoid>;
// Data :
// -----
private:
double* posIni_; // 4-position of the plasmoid in spherical coordinates
double* fourveldt_; // 4-velocity of the plasmoid in spherical coordinates (dxi/dt, not dtau)
std::string flag_; // type of motion "helical" or "equatorial"
bool posSet_;
double t_inj_;
double radiusMax_; // Maximun radius of the Plasmoid in geometrical units
std::string varyRadius_;
// FITS FILE Quantities
std::string filename_;
double* freq_array_;
double* jnu_array_;
double* anu_array_;
// Constructors - Destructor
// -------------------------
public:
GYOTO_OBJECT; // This object has a (non-inherited) Property list
Plasmoid();
Plasmoid(const Plasmoid& orig);
virtual Plasmoid * clone() const ;
virtual ~Plasmoid() ;
public:
virtual std::string className() const ;
virtual std::string className_l() const ;
public:
void motionType(std::string const type);
SmartPointer<Metric::Generic> metric() const;
void metric(SmartPointer<Metric::Generic> gg);
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 radiusMax(double rr);
double radiusMax() const;
void Radius(std::string vary);
virtual void radiativeQ(double Inu[], double Taunu[],
double const nu_em[], size_t nbnu,
double dsem, state_t const &coord_ph,
double const coord_obj[8]=NULL) 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]);
int Impact(Gyoto::Photon* ph, size_t index,
Astrobj::Properties *data=NULL);
void file(std::string const &f);
std::vector<size_t> fitsRead(std::string filename);
};
#endif
GyotoFitsRW.h
Class to read/write jnu and anu in FITS File.
GyotoKappaDistributionSynchrotronSpectrum.h
Powerlaw synchrotron spectrum.
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::Plasmoid
Plasmoid Shere of plasma emitting synchrotron, following a trajectory specified in getVelocity (non-g...
Definition GyotoPlasmoid.h:62
Gyoto::Astrobj::Plasmoid::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::Plasmoid::radiativeQ
virtual void radiativeQ(double Inu[], double Taunu[], double const nu_em[], size_t nbnu, double dsem, state_t const &coord_ph, double const coord_obj[8]=NULL) const
emission and transmission together
Gyoto::Astrobj::Plasmoid::Plasmoid
Plasmoid()
Default constructor.
Gyoto::Astrobj::Plasmoid::className_l
virtual std::string className_l() const
"inflate_star"
Gyoto::Astrobj::Plasmoid::className
virtual std::string className() const
"Plasmoid"
Gyoto::Astrobj::Plasmoid::Impact
int Impact(Gyoto::Photon *ph, size_t index, Astrobj::Properties *data=NULL)
Does a photon at these coordinates impact the object?
Gyoto::Astrobj::Plasmoid::getVelocity
void getVelocity(double const pos[4], double vel[4])
Yield velocity of the center of the sphere.
Gyoto::Astrobj::Plasmoid::metric
SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Gyoto::Astrobj::UniformSphere
Optically thick or thin, spherical objects.
Definition GyotoUniformSphere.h:90
Gyoto::FitsRW::FitsRW
FitsRW()
Constructor.
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