Gyoto
GyotoStandardAstrobj.h
Go to the documentation of this file.
1 
13 /*
14  Copyright 2011 Thibaut Paumard, Frederic Vincent
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 
33 #ifndef __GyotoStandardAstrobj_H_
34 #define __GyotoStandardAstrobj_H_
35 
36 #include <iostream>
37 #include <fstream>
38 #include <iomanip>
39 #include <string>
40 
41 #include "GyotoAstrobj.h"
42 #include "GyotoFunctors.h"
43 
44 namespace Gyoto{
45  namespace Astrobj {
46  class Standard;
47  }
48 }
49 
87 {
88  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Standard>;
89 
90 
91  // Data :
92  // -----
93  protected:
94  double critical_value_;
95  double safety_value_;
96 
97  // Constructors - Destructor
98  // -------------------------
99  public:
103  Standard();
104 
108  Standard(double radmax);
109 
113  Standard(std::string kind);
114 
118  Standard(const Standard& ) ;
119 
120  virtual ~Standard() ;
121 
122  // Accessors
123  // ---------
124  public:
125  virtual void setSafetyValue(double val) ;
126  virtual double getSafetyValue() const ;
127 
128  // Outputs
129  // -------
130  public:
131  virtual int Impact(Gyoto::Photon* ph, size_t index,
132  Astrobj::Properties *data=NULL) ;
133 
144  virtual double operator()(double const coord[4]) = 0;
145 
154  virtual void getVelocity(double const pos[4], double vel[4]) = 0 ;
155 
165  virtual double giveDelta(double coord[8]);
166 
167  virtual int setParameter(std::string name,
168  std::string content,
169  std::string unit = "") ;
170 
171 
172 #ifdef GYOTO_USE_XERCES
173  virtual void fillElement(FactoryMessenger *fmp) const ;
174 #endif
175 
176 };
177 
178 
179 #endif
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
A functor like double (func) (double const data[])
Definition: GyotoFunctors.h:43
Astronomical objects (light emitters)
Classes with an operator() method.
virtual double getSafetyValue() const
Get Standard::safety_value_.
double critical_value_
See operator()(double const coord[4])
Definition: GyotoStandardAstrobj.h:94
virtual void fillElement(FactoryMessenger *fmp) const
Fill XML section.
virtual void setSafetyValue(double val)
Set Standard::safety_value_.
virtual int setParameter(std::string name, std::string content, std::string unit="")
Set parameter by name.
virtual void getVelocity(double const pos[4], double vel[4])=0
Fluid velocity field.
virtual double giveDelta(double coord[8])
Maximum δ inside object.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:42
virtual int Impact(Gyoto::Photon *ph, size_t index, Astrobj::Properties *data=NULL)
Does a photon at these coordinates impact the object?
Base class for astronomical object.
Definition: GyotoAstrobj.h:187
Astronomical objects defined bya a potential/distance.
Definition: GyotoStandardAstrobj.h:84
double safety_value_
See operator()(double const coord[4])
Definition: GyotoStandardAstrobj.h:95