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 
56  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Disk3D>;
57  private:
58  std::string filename_;
65  double * emissquant_;
66 
72  double * velocity_;
73 
74  double dnu_;
75  double nu0_;
76  size_t nnu_;
77 
78  double dphi_;
79  double phimin_;
80  size_t nphi_;
81  double phimax_;
82 
87  size_t repeat_phi_;
88  //double phi0_==0, phi max is always 2*M_PI
89 
90  double dz_;
91  double zmin_;
92  size_t nz_;
93  double zmax_;
94 
95  double dr_;
96  double rin_;
97  size_t nr_;
98  double rout_;
99 
100 
101 
102  // Constructors - Destructor
103  // -------------------------
104  public:
105  Disk3D();
106 
107  Disk3D(const Disk3D& ) ;
108  virtual Disk3D* clone () const;
109 
110  virtual ~Disk3D() ;
111 
112  // Accessors
113  // ---------
114  public:
115  // virtual void setInnerRadius(double); ///< Set rin_
116  // virtual void setOuterRadius(double); ///< Set rout_
117 
118  virtual void fitsRead(std::string filename_);
119  virtual void fitsWrite(std::string filename_);
121 
122  void setEmissquant(double * pattern);
123  void setVelocity(double * pattern);
128  virtual void copyEmissquant(double const * const pattern = NULL,
129  size_t const naxes[4] = NULL);
131  virtual double const * const getEmissquant() const;
132  virtual void getEmissquantNaxes( size_t naxes[4] ) const ;
133 
134  virtual void copyVelocity(double const * const pattern = NULL,
135  size_t const naxes[3] = NULL);
136  virtual double const * const getVelocity() const;
137 
138  virtual void repeatPhi(size_t n);
139  virtual size_t repeatPhi() const;
140 
141  virtual void nu0(double freq);
142  virtual double nu0() const;
143 
144  virtual void dnu(double dfreq);
145  virtual double dnu() const;
146 
147  void rin(double rrin);
148  double rin() const;
149 
150  void rout(double rout);
151  double rout() const;
152 
153  void zmin(double zmin);
154  double zmin() const;
155 
156  void zmax(double zmax);
157  double zmax() const;
158 
159  void phimin(double phimin);
160  double phimin() const;
161 
162  void phimax(double phimax);
163  double phimax() const;
164 
165  virtual int setParameter(std::string name, std::string content);
166 
167  protected:
168  void getIndices(size_t i[4], double const co[4], double nu=0.) const ;
170 
171  public:
172  int Impact(Photon *ph, size_t index, Astrobj::Properties *data);
173  virtual void getVelocity(double const pos[4], double vel[4]) ;
174 
175  public:
176 #ifdef GYOTO_USE_XERCES
177  virtual void fillElement(FactoryMessenger *fmp) const ;
178  virtual void setParameters(FactoryMessenger *fmp);
179 #endif
180 
181 };
182 
183 #endif