Gyoto
GyotoPatternDisk.h
Go to the documentation of this file.
1 
8 /*
9  Copyright 2011 Frederic Vincent, Thibaut Paumard
10 
11  This file is part of Gyoto.
12 
13  Gyoto is free software: you can redistribute it and/or modify
14  it under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  Gyoto is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
25  */
26 
27 #ifndef __GyotoPatternDisk_H_
28 #define __GyotoPatternDisk_H_
29 
30 #include <iostream>
31 #include <fstream>
32 #include <iomanip>
33 
34 namespace Gyoto{
35  namespace Astrobj { class PatternDisk; }
36 }
37 
38 //#include <GyotoMetric.h>
39 #include <GyotoThinDisk.h>
40 
52  friend class Gyoto::SmartPointer<Gyoto::Astrobj::PatternDisk>;
53  private:
54  std::string filename_;
55 
60  double * emission_;
61 
62  double * opacity_;
63 
69  double * velocity_;
70 
74  double * radius_;
75 
80  double Omega_;
81 
86  double t0_;
87 
88  double dnu_;
89  double nu0_;
91 
92  double dphi_;
93  double phimin_;
95  double phimax_;
96 
102 
103  double dr_;
105 
106 
107  // Constructors - Destructor
108  // -------------------------
109  public:
110  PatternDisk();
111 
112  PatternDisk(const PatternDisk& ) ;
113  virtual PatternDisk* clone () const;
114 
115  virtual ~PatternDisk() ;
116 
117  // Accessors
118  // ---------
119  public:
121  virtual void setInnerRadius(double);
123  virtual void setOuterRadius(double);
124 
128  virtual void setPatternVelocity(double);
129  virtual double getPatternVelocity();
130 
132  virtual void fitsRead(std::string filename_);
133 
135  virtual void fitsWrite(std::string filename_);
136 
137 
139 
146  void setEmission(double * pattern);
147 
149 
156  void setVelocity(double * pattern);
157 
159 
166  void setRadius(double * pattern);
167 
169 
185  virtual void copyIntensity(double const * const pattern = NULL,
186  size_t const naxes[3] = NULL);
187 
188  virtual double const * getIntensity() const;
189  virtual void getIntensityNaxes( size_t naxes[3] ) const ;
190 
205  virtual void copyOpacity(double const * const pattern = NULL,
206  size_t const naxes[3] = NULL);
207  virtual double const * getOpacity() const;
208 
210 
222  virtual void copyVelocity(double const * const pattern = NULL,
223  size_t const naxes[2] = NULL);
224  virtual double const * getVelocity() const;
225 
227 
239  virtual void copyGridRadius(double const * const pattern = NULL,
240  size_t nr = 0 );
241  virtual double const * getGridRadius() const;
242 
243  virtual void repeatPhi(size_t n);
244  virtual size_t repeatPhi() const;
245 
246  virtual void nu0(double freq);
247  virtual double nu0() const;
248 
249  virtual void dnu(double dfreq);
250  virtual double dnu() const;
251 
252  void phimin(double phimin);
253  double phimin() const;
254 
255  void phimax(double phimax);
256  double phimax() const;
257 
258  virtual int setParameter(std::string name,
259  std::string content,
260  std::string unit);
261 
262  protected:
263  void getIndices(size_t i[3], double const co[4], double nu=0.) const ;
265 
266  public:
267  using ThinDisk::emission;
268  virtual double emission(double nu_em, double dsem,
269  double c_ph[8], double c_obj[8]) const;
270  virtual double transmission(double nu_em, double dsem, double coord[8]) const;
271 
272  virtual void getVelocity(double const pos[4], double vel[4]) ;
273 
274  public:
275 #ifdef GYOTO_USE_XERCES
276  virtual void fillElement(FactoryMessenger *fmp) const ;
277  virtual void setParameters(FactoryMessenger *fmp);
278 #endif
279 
280 };
281 
282 #endif