This file is indexed.

/usr/include/Gyoto/GyotoStandardAstrobj.h is in libgyoto2-dev 0.2.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
/**
 * \file GyotoStandardAstrobj.h
 * \brief Astronomical objects defined bya a potential/distance
 *
 *  Many geometrically thick objects can be defined by the value of a
 *  function of the 4 coordinates, and their emission can often be
 *  defined in terms of an emission law and of a transmission law.
 *
 *  This is a base class for this standard case which simplifies a lot
 *  writting new Astrobjs.
 */

/*
    Copyright 2011 Thibaut Paumard, Frederic Vincent

    This file is part of Gyoto.

    Gyoto is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Gyoto is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Gyoto.  If not, see <http://www.gnu.org/licenses/>.
 */


#ifndef __GyotoStandardAstrobj_H_ 
#define __GyotoStandardAstrobj_H_ 

#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>

#include "GyotoAstrobj.h"
#include "GyotoFunctors.h"

namespace Gyoto{
  namespace Astrobj {
    class Standard;
  }
}

/**
 * \class Gyoto::Astrobj::Standard
 * \brief Astronomical objects defined bya a potential/distance
 *
 *  Many geometrically thick objects can be defined by the value of a
 *  function of the 4 coordinates, and their emission can often be
 *  defined in terms of an emission law and of a transmission law.
 *
 *  This is a base class for this standard case which simplifies a lot
 *  writting new Astrobjs.
 *
 *  It is either to implement a sub-class of Astrobj::Standard than a
 *  sub-class of Astrobj::Generic. In particular, there is no need to
 *  implement the Generic::Impact() function. Instead, one needs to
 *  implement a few much simpler functions and most of the complex
 *  ray-tracing algorithms and heuristics is implemented in
 *  Standard::Impact(). It is recommended to read first the
 *  introduction in the Gyoto::Astrobj namespace documentation.
 *
 *  The geometrical shape of a Gyoto::Astrobj::Standard object is
 *  yielded by a function of the 4 position vector. This function is
 *  implemented as operator()(). The velocity field of the fluid is
 *  implemented in the getVelocity() method. The emission(),
 *  integrateEmission() and transmission() methods implement the
 *  radiative transfer primitives for this object. Finally, you may
 *  choose to reimplement processHitQuantities() and Impact(), but
 *  this should not be necessary (that is the all point of the
 *  Standard class).
 *
 * Like any other Astrobj::Generic sub-classes, an Astrobj::Standard
 * subclass should register an Astrobj::Subcontractor_t function using
 * the Astrobj::Register() function. See also \ref
 * writing_plugins_page .
 */
class Gyoto::Astrobj::Standard :
  public Gyoto::Astrobj::Generic,
  public Gyoto::Functor::Double_constDoubleArray
{
  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Standard>;


  // Data : 
  // -----
 protected:
  double critical_value_; ///< See operator()(double const coord[4])
  double safety_value_; ///< See operator()(double const coord[4])

  // Constructors - Destructor
  // -------------------------
 public:
  /**
   *  kind_ =  "Default", rmax_ = 0., rmax_set_ = 0.
   */
  Standard(); ///< Default constructor.

  /**
   *  kind_ =  "Default", rmax_ = radmax, rmax_set_ = 1.
   */
  Standard(double radmax); ///< Set rmax in constructor.

  /**
   *  kind_ =  kind, rmax_ = 0., rmax_set_ = 0.
   */
  Standard(std::string kind); ///< Set kind in constructor.

  /**
   * Make a deep copy of an Astrobj::Standard instance
   */
  Standard(const Standard& ) ; ///< Copy constructor.

  virtual ~Standard() ; ///< Destructor: does nothing.

  // Accessors
  // ---------
 public:
  virtual void setSafetyValue(double val) ; ///< Set Standard::safety_value_
  virtual double getSafetyValue() const ; ///< Get Standard::safety_value_

  // Outputs
  // -------
 public:
  virtual int Impact(Gyoto::Photon* ph, size_t index,
		     Astrobj::Properties *data=NULL)  ;

  /**
   * \brief Function defining the object interior
   *
   * A potential, distance, or whatever function such that
   * operator()(double const coord[4]) < Standard::critical_value_ if
   * and only if coord is inside the object. This function is used by
   * the default implmenetation of Impact(). If Impact() is
   * overloaded, it is not necessary to overload operator()(double
   * coord[4]). The default implementation throws an error.
   */
  virtual double operator()(double const coord[4]) = 0;
  
  /**
   * \brief Fluid velocity field.
   *
   * Fill vel with the 4-vector velocity of the fluid at 4-position pos.
   *
   * \param[in] pos 4-position at which to compute velocity;
   * \param[out] vel 4-velocity at pos.
   */
  virtual void getVelocity(double const pos[4], double vel[4]) = 0 ;

  /**
   * \brief Maximum &delta; inside object
   *
   * Gives the requested integration step &delta;<SUB>t</SUB> (in
   * coordinate time t) between two neighbooring points along a
   * portion of geodesic inside an astrobj
   *
   * \param coord input coordinate at which &delta;<SUB>t</SUB> is given
   */
  virtual double giveDelta(double coord[8]);

  virtual int setParameter(std::string name,
			   std::string content,
			   std::string unit = "") ;


#ifdef GYOTO_USE_XERCES
  virtual void fillElement(FactoryMessenger *fmp) const ;
#endif

};


#endif