Gyoto
GyotoDirectionalDisk.h
Go to the documentation of this file.
1 
13 /*
14  Copyright 2014 Frederic Vincent, Thibaut Paumard
15 
16  This file is part of Gyoto.
17 
18  Gyoto is free software: you can redistribute it and/or modify
19  it under the terms of the GNU General Public License as published by
20  the Free Software Foundation, either version 3 of the License, or
21  (at your option) any later version.
22 
23  Gyoto is distributed in the hope that it will be useful,
24  but WITHOUT ANY WARRANTY; without even the implied warranty of
25  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26  GNU General Public License for more details.
27 
28  You should have received a copy of the GNU General Public License
29  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
30  */
31 
32 #ifndef __GyotoDirectionalDisk_H_
33 #define __GyotoDirectionalDisk_H_
34 
35 #include <iostream>
36 #include <fstream>
37 #include <iomanip>
38 
39 namespace Gyoto{
40  namespace Astrobj { class DirectionalDisk; }
41 }
42 
43 //#include <GyotoMetric.h>
44 #include <GyotoThinDisk.h>
45 
57  friend class Gyoto::SmartPointer<Gyoto::Astrobj::DirectionalDisk>;
58  private:
59  std::string filename_;
60 
65  double * emission_;
66 
67  double * radius_;
68  double * cosi_;
69  double * freq_;
70 
74 
75 
76  // Constructors - Destructor
77  // -------------------------
78  public:
79  DirectionalDisk();
80 
81  DirectionalDisk(const DirectionalDisk& ) ;
82  virtual DirectionalDisk* clone () const;
83 
84  virtual ~DirectionalDisk() ;
85 
86  // Accessors
87  // ---------
88  public:
89 
90 #ifdef GYOTO_USE_CFITSIO
91  virtual void fitsRead(std::string filename_);
93 
95  virtual void fitsWrite(std::string filename_);
96 #endif
97 
99 
106  void setEmission(double * pattern);
107 
108  void radius(double * pattern);
109 
122  virtual void copyIntensity(double const * const pattern = NULL,
123  size_t const naxes[3] = NULL);
124 
125  virtual double const * getIntensity() const;
126  virtual void getIntensityNaxes( size_t naxes[3] ) const ;
127 
128 
129  virtual void copyGridRadius(double const * const pattern = NULL,
130  size_t nr = 0 );
131  virtual double const * getGridRadius() const;
132  virtual void copyGridCosi(double const * const pattern = NULL,
133  size_t ni = 0 );
134  virtual double const * getGridCosi() const;
135  virtual void copyGridFreq(double const * const pattern = NULL,
136  size_t ni = 0 );
137  virtual double const * getGridFreq() const;
138 
139  virtual int setParameter(std::string name,
140  std::string content,
141  std::string unit);
142 
143  protected:
144  void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const ;
146 
147  public:
148  using ThinDisk::emission;
149  virtual double emission(double nu_em, double dsem,
150  double c_ph[8], double c_obj[8]) const;
151 
152  public:
153 #ifdef GYOTO_USE_XERCES
154  virtual void fillElement(FactoryMessenger *fmp) const ;
155  virtual void setParameters(FactoryMessenger *fmp);
156 #endif
157 
158 };
159 
160 #endif
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
virtual double const * getGridCosi() const
Get DirectionalDisk::cosi_.
size_t nnu_
Number of frequencies provided in DirectionalDisk::emission_.
Definition: GyotoDirectionalDisk.h:71
virtual double const * getGridFreq() const
Get DirectionalDisk::freq_.
virtual void copyIntensity(double const *const pattern=NULL, size_t const naxes[3]=NULL)
void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const
Get emission_ cell corresponding to position co[4].
std::string filename_
Optional FITS file name containing the arrays.
Definition: GyotoDirectionalDisk.h:59
virtual double emission(double nu_em, double dsem, double coord_ph[8], double coord_obj[8]=NULL) const
Specific intensity Iν
#define size_t
If not defined in .
Definition: GyotoConfig.h:305
size_t ni_
Number of direction cosine.
Definition: GyotoDirectionalDisk.h:72
virtual DirectionalDisk * clone() const
Cloner.
virtual void getIntensityNaxes(size_t naxes[3]) const
Get DirectionalDisk::nnu_, DirectionalDisk::ni_, and DirectionalDisk::nr_.
double * cosi_
Direction cosine vector.
Definition: GyotoDirectionalDisk.h:68
Geometrically thin disk read from FITS file.
Definition: GyotoDirectionalDisk.h:56
virtual double const * getIntensity() const
Get DirectionalDisk::emission_.
Geometrically thin disks and rings.
Definition: GyotoThinDisk.h:68
Geometrically thin disks and rings.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:42
virtual void setParameters(FactoryMessenger *fmp)
Main loop in Subcontractor_t function.
virtual void fillElement(FactoryMessenger *fmp) const
Fill the generic XML bits.
double * emission_
Iν(ν, r, cosi;)
Definition: GyotoDirectionalDisk.h:65
virtual double emission(double nu_em, double dsem, double c_ph[8], double c_obj[8]) const
Specific intensity Iν
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
void setEmission(double *pattern)
Set DirectionalDisk::emission_.
double * freq_
Frequencies vector.
Definition: GyotoDirectionalDisk.h:69
size_t nr_
Number of radius values.
Definition: GyotoDirectionalDisk.h:73
double * radius_
Radius vector.
Definition: GyotoDirectionalDisk.h:67
virtual double const * getGridRadius() const
Get DirectionalDisk::radius_.