GyotoThinDiskGridIntensity.h
Go to the documentation of this file.
/*
Copyright 2019-2021 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 __GyotoThinDiskGridIntensity_H_
#define __GyotoThinDiskGridIntensity_H_
#include <iostream>
#include <fstream>
#include <iomanip>
namespace Gyoto{
namespace Astrobj { class ThinDiskGridIntensity; }
class GridData2D;
}
#include <GyotoThinDisk.h>
#include <GyotoGridData2D.h>
class Gyoto::Astrobj::ThinDiskGridIntensity
: public Astrobj::ThinDisk,
public GridData2D,
public Hook::Listener
{
friend class Gyoto::SmartPointer<Gyoto::Astrobj::ThinDiskGridIntensity>;
private:
std::string filename_;
double * intensity_;
double * time_array_;
double deltat_;
public:
GYOTO_OBJECT;
GYOTO_OBJECT_THREAD_SAFETY;
// Constructors - Destructor
// -------------------------
ThinDiskGridIntensity();
ThinDiskGridIntensity(const ThinDiskGridIntensity& ) ;
virtual ThinDiskGridIntensity* clone () const;
virtual ~ThinDiskGridIntensity() ;
// Accessors
// ---------
public:
void file(std::string const &f) ;
std::string file() const;
/*
timeTranslation shifts the value of GridData2D::tmin_ and tmax_,
allowing to scan the full simulation without having to change
the value of the Screen observation time (which is typically
not provided in M unit in the XML).
Choosing a negative timeTranslation, i.e. performing tmin_,tmax_-=dt,
amounts to increasing the Screen observation time by the same value,
tobs+=dt.
*/
void timeTranslation_inMunit(double const dt) ;
double timeTranslation_inMunit() const ;
//void dt(double dd);
void copyIntensity(double const *const intensity,
size_t const naxes[3]);
double const * getIntensity() const;
void copyTimeArray(double const *const time_array, size_t const ntimes);
double const * getTimeArray() const;
public:
using Generic::metric;
std::vector<size_t> fitsRead(std::string filename) ;
virtual double emission(double nu_em, double dsem,
state_t const &c_ph,double const c_obj[8]=NULL) const;
virtual void getVelocity(double const pos[4], double vel[4]) ;
};
#endif
GyotoGridData2D.h
Base class for reading 2D gridded data.
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoThinDisk.h
Geometrically thin disks and rings.
Gyoto::Astrobj::Generic::metric
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Gyoto::Astrobj::ThinDiskGridIntensity
Definition GyotoThinDiskGridIntensity.h:49
Gyoto::Astrobj::ThinDiskGridIntensity::intensity_
double * intensity_
Intensity (ν, r, φ).
Definition GyotoThinDiskGridIntensity.h:58
Gyoto::Astrobj::ThinDiskGridIntensity::filename_
std::string filename_
Optional FITS file name containing the arrays.
Definition GyotoThinDiskGridIntensity.h:52
Gyoto::Astrobj::ThinDiskGridIntensity::clone
virtual ThinDiskGridIntensity * clone() const
Cloner.
Gyoto::Astrobj::ThinDiskGridIntensity::ThinDiskGridIntensity
ThinDiskGridIntensity()
Standard constructor.
Gyoto::Astrobj::ThinDiskGridIntensity::emission
virtual double emission(double nu_em, double dsem, state_t const &c_ph, double const c_obj[8]=NULL) const
Specific intensity Iν.
Gyoto::Astrobj::ThinDiskGridIntensity::deltat_
double deltat_
1D Vector containing the times values of each time steps (dt not constant)
Definition GyotoThinDiskGridIntensity.h:60
Gyoto::Astrobj::ThinDiskGridIntensity::getVelocity
virtual void getVelocity(double const pos[4], double vel[4])
Get fluid 4-velocity at point.
Gyoto::Astrobj::ThinDisk
Geometrically thin disks and rings.
Definition GyotoThinDisk.h:71
Gyoto::GridData2D
Class for reading data stored in a 2D grid.
Definition GyotoGridData2D.h:52
Gyoto::GridData2D::GridData2D
GridData2D()
Constructor.
Gyoto::Hook::Listener
I might listen to a Teller.
Definition GyotoHooks.h:64
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