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_;
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_;
90  size_t nnu_;
91 
92  double dphi_;
93  double phimin_;
94  size_t nphi_;
95  double phimax_;
96 
101  size_t repeat_phi_;
102  //double phi0_==0, phi max is always 2*M_PI
103 
104  double dr_;
105  size_t nr_;
106  // double r0_; // this is rin_
107 
108 
109 
110  // Constructors - Destructor
111  // -------------------------
112  public:
113  PatternDisk();
114 
115  PatternDisk(const PatternDisk& ) ;
116  virtual PatternDisk* clone () const;
117 
118  virtual ~PatternDisk() ;
119 
120  // Accessors
121  // ---------
122  public:
123  virtual void setInnerRadius(double);
124  virtual void setOuterRadius(double);
125 
129  virtual void setPatternVelocity(double);
130  virtual double getPatternVelocity();
131  virtual void fitsRead(std::string filename_);
132  virtual void fitsWrite(std::string filename_);
134 
135  void setEmission(double * pattern);
136  void setVelocity(double * pattern);
137  void setRadius(double * pattern);
142  virtual void copyIntensity(double const * const pattern = NULL,
143  size_t const naxes[3] = NULL);
145  virtual double const * const getIntensity() const;
146  virtual void getIntensityNaxes( size_t naxes[3] ) const ;
147 
148  virtual void copyOpacity(double const * const pattern = NULL,
149  size_t const naxes[3] = NULL);
150  virtual double const * const getOpacity() const;
151 
152  virtual void copyVelocity(double const * const pattern = NULL,
153  size_t const naxes[2] = NULL);
154  virtual double const * const getVelocity() const;
155 
156  virtual void copyGridRadius(double const * const pattern = NULL,
157  size_t nr = 0 );
158  virtual double const * const getGridRadius() const;
159 
160  virtual void repeatPhi(size_t n);
161  virtual size_t repeatPhi() const;
162 
163  virtual void nu0(double freq);
164  virtual double nu0() const;
165 
166  virtual void dnu(double dfreq);
167  virtual double dnu() const;
168 
169  void phimin(double phimin);
170  double phimin() const;
171 
172  void phimax(double phimax);
173  double phimax() const;
174 
175  virtual int setParameter(std::string name, std::string content);
176 
177  protected:
178  void getIndices(size_t i[3], double const co[4], double nu=0.) const ;
180 
181  public:
182  virtual double emission(double nu_em, double dsem,
183  double c_ph[8], double c_obj[8]) const;
184  virtual double transmission(double nu_em, double dsem, double coord[8]) const;
185 
186  virtual void getVelocity(double const pos[4], double vel[4]) ;
187 
188  public:
189 #ifdef GYOTO_USE_XERCES
190  virtual void fillElement(FactoryMessenger *fmp) const ;
191  virtual void setParameters(FactoryMessenger *fmp);
192 #endif
193 
194 };
195 
196 #endif