This file is indexed.

/usr/include/Gyoto/GyotoDirectionalDisk.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
/**
 * \file GyotoDirectionalDisk.h
 * \brief Geometrically thin disk read from FITS file
 * 
 *   This class describes a disk contained in the z=0 (equatorial)
 *   plane.  The flux emitted
 *   at radius r, making an angle i with respect to the local normal,
 *   at frequency nu is given in a FITS file.
 *
 *  The target of ray-traced Gyoto::Photon
 */

/*
    Copyright 2014 Frederic Vincent, Thibaut Paumard

    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 __GyotoDirectionalDisk_H_ 
#define __GyotoDirectionalDisk_H_ 

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

namespace Gyoto{
  namespace Astrobj { class DirectionalDisk; }
}

//#include <GyotoMetric.h>
#include <GyotoThinDisk.h>

/**
 * \class Gyoto::Astrobj::DirectionalDisk
 * \brief Geometrically thin disk read from FITS file
 * 
 *   This class describes a disk contained in the z=0 (equatorial)
 *   plane.  The flux emitted
 *   at radius r, making an angle i with respect to the local normal,
 *   at frequency nu is given in a FITS file.
 *
 */
class Gyoto::Astrobj::DirectionalDisk : public Astrobj::ThinDisk {
  friend class Gyoto::SmartPointer<Gyoto::Astrobj::DirectionalDisk>;
 private:
  std::string filename_; ///< Optional FITS file name containing the arrays
  /**
   * An array of dimensionality double[nr_][ni_][nnu_]. In FITS
   * format, the first dimension is nu, the second cosi (direction cosine), 
   * and the third r. There is no phi dependence.
   */
  double * emission_; ///< I<SUB>&nu;</SUB>(&nu;, r, cosi;)

  double * radius_; ///< Radius vector
  double * cosi_; ///< Direction cosine vector
  double * freq_; ///< Frequencies vector

  size_t nnu_; ///< Number of frequencies provided in DirectionalDisk::emission_
  size_t ni_; ///< Number of direction cosine
  size_t nr_; ///< Number of radius values


  // Constructors - Destructor
  // -------------------------
 public:
  DirectionalDisk(); ///< Standard constructor
  
  DirectionalDisk(const DirectionalDisk& ) ;///< Copy constructor
  virtual DirectionalDisk* clone () const; ///< Cloner
  
  virtual ~DirectionalDisk() ;                        ///< Destructor
  
  // Accessors
  // ---------
 public:

#ifdef GYOTO_USE_CFITSIO
  /// Read parameters and arrays from FITS file
  virtual void fitsRead(std::string filename_);

  /// Write parameters and arrays to FITS file
  virtual void fitsWrite(std::string filename_);
#endif

  /// Set DirectionalDisk::emission_
  /**
   * The pointer is copied directly, not the array content.
   *
   * This is a low-level function. Beware that:
   *  - previously allocated array will not be freed automatically;
   *  - array attached when the destructor is called will be freed.
   */
  void setEmission(double * pattern);

  void radius(double * pattern);

  /**
   * DirectionalDisk::emission_ is freed if not NULL, reallocated, and
   * pattern is copied into emission_.
   *
   * Finally, DirectionalDisk::nnu_, DirectionalDisk::ni_, and
   * DirectionalDisk::nr_ are set according to naxes.
   *
   * \param pattern Array to copy as emission_. May be NULL in which
   * case emission_ is simply deallocated and set to NULL.
   *
   * \param naxes { nnu_, ni_, nr_ }.
   */
  virtual void copyIntensity(double const * const pattern = NULL,
			      size_t const naxes[3] = NULL);

  virtual double const * getIntensity() const;///< Get DirectionalDisk::emission_
  virtual void getIntensityNaxes( size_t naxes[3] ) const ; ///< Get DirectionalDisk::nnu_, DirectionalDisk::ni_, and DirectionalDisk::nr_


  virtual void copyGridRadius(double const * const pattern = NULL,
			      size_t nr = 0 );
  virtual double const * getGridRadius() const; ///< Get DirectionalDisk::radius_
  virtual void copyGridCosi(double const * const pattern = NULL,
			      size_t ni = 0 );
  virtual double const * getGridCosi() const; ///< Get DirectionalDisk::cosi_
  virtual void copyGridFreq(double const * const pattern = NULL,
			      size_t ni = 0 );
  virtual double const * getGridFreq() const; ///< Get DirectionalDisk::freq_

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

 protected:
  void getIndices(size_t i[3], double const co[4], double cosi, double nu=0.) const ;
  ///< Get emission_ cell corresponding to position co[4]

 public:
  using ThinDisk::emission;
  virtual double emission(double nu_em, double dsem,
			  double c_ph[8], double c_obj[8]) const;

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

};

#endif