Gyoto
GyotoDisk3D.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 __GyotoDisk3D_H_
28 #define __GyotoDisk3D_H_
29 
30 #include <iostream>
31 #include <fstream>
32 #include <iomanip>
33 
34 namespace Gyoto{
35  namespace Astrobj { class Disk3D; }
36 }
37 
57  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Disk3D>;
58  private:
59  std::string filename_;
60 
66  double * emissquant_;
67 
73  double * velocity_;
74 
75  double dnu_;
76  double nu0_;
78 
79  double dphi_;
80  double phimin_;
82  double phimax_;
83 
89  //double phi0_==0, phi max is always 2*M_PI
90 
91  double dz_;
92  double zmin_;
94  double zmax_;
95 
96  double dr_;
97  double rin_;
99  double rout_;
100 
101 
102 
103  // Constructors - Destructor
104  // -------------------------
105  public:
106  Disk3D();
107 
108  Disk3D(const Disk3D& ) ;
109  virtual Disk3D* clone () const;
110 
111  virtual ~Disk3D() ;
112 
113  // Accessors
114  // ---------
115  public:
116 
118  virtual void fitsRead(std::string filename_);
119 
121  virtual void fitsWrite(std::string filename_);
122 
124 
131  void setEmissquant(double * pattern);
132 
134 
141  void setVelocity(double * pattern);
142 
144 
159  virtual void copyEmissquant(double const * const pattern = NULL,
160  size_t const naxes[4] = NULL);
161 
163  virtual double const * getEmissquant() const;
164 
166  virtual void getEmissquantNaxes( size_t naxes[4] ) const ;
167 
169 
181  virtual void copyVelocity(double const * const pattern = NULL,
182  size_t const naxes[3] = NULL);
184  virtual double const * getVelocity() const;
185 
187  virtual void repeatPhi(size_t n);
189  virtual size_t repeatPhi() const;
190 
192  virtual void nu0(double freq);
194  virtual double nu0() const;
195 
197  virtual void dnu(double dfreq);
199  virtual double dnu() const;
200 
202  void rin(double rrin);
204  double rin() const;
205 
207  void rout(double rout);
209  double rout() const;
210 
212  void zmin(double zmin);
214  double zmin() const;
215 
217  void zmax(double zmax);
219  double zmax() const;
220 
222  void phimin(double phimin);
224  double phimin() const;
225 
227  void phimax(double phimax);
229  double phimax() const;
230 
231  virtual int setParameter(std::string name,
232  std::string content,
233  std::string unit);
234 
235  protected:
236  void getIndices(size_t i[4], double const co[4], double nu=0.) const ;
238 
239  public:
240  int Impact(Photon *ph, size_t index, Astrobj::Properties *data);
241 
243 
250  virtual void getVelocity(double const pos[4], double vel[4]) ;
251 
252  public:
253 #ifdef GYOTO_USE_XERCES
254  virtual void fillElement(FactoryMessenger *fmp) const ;
255  virtual void setParameters(FactoryMessenger *fmp);
256 #endif
257 
258 };
259 
260 #endif