/usr/include/Gyoto/GyotoRotStar3_1.h is in libgyoto4-dev 1.0.2-2ubuntu1.
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 | /**
* \file GyotoRotStar3_1.h
* \brief Numerical metric around a rotating star in 3+1 formalism
*
*
*/
/*
Copyright 2011 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 __GyotoRotStar3_1_H_
#define __GyotoRotStar3_1_H_
#include <iostream>
#include <fstream>
namespace Lorene{
class Star_rot;
}
namespace Gyoto {
namespace Metric { class RotStar3_1; }
}
#include <GyotoMetric.h>
#include <GyotoWorldline.h>
#include <GyotoSmartPointer.h>
#ifdef GYOTO_USE_XERCES
#include <GyotoRegister.h>
#endif
/**
* \class Gyoto::Metric::RotStar3_1
* \brief Numerical metric around a rotating star in 3+1 formalism
*/
class Gyoto::Metric::RotStar3_1 : public Gyoto::Metric::Generic {
friend class Gyoto::SmartPointer<Gyoto::Metric::RotStar3_1>;
private:
char* filename_; ///< Lorene output file name
Lorene::Star_rot * star_; ///< Pointer to underlying Lorene Star_rot instance
int integ_kind_;///< 1 if RotStar3_1::myrk4(), 0 if Metric::myrk4()
public:
GYOTO_OBJECT;
RotStar3_1(); ///< Constructor
RotStar3_1(const RotStar3_1& ) ; ///< Copy constructor
virtual ~RotStar3_1() ; ///< Destructor
virtual RotStar3_1* clone() const ;
///< Cloner (uses RotStar3_1(file, integ_kind))
void fileName(char const *); ///< Set filename_
char const * fileName() const; ///< Get filename_
void file(std::string const &); ///< Set filename_
std::string file() const; ///< Get filename_
void integKind(int); ///< Set integ_kind_
int integKind() const ; ///< Get integ_kind_
void genericIntegrator(bool); ///< Set !integ_kind_
bool genericIntegrator() const ;///< Get !integ_kind_
using Metric::Generic::myrk4;
/**
* \brief RK4 integrator
*
* NB: we use the 6-coordinates, here, unlike the inherited function.
*/
int myrk4(const double coord[6], double h, double res[6]) const;
/**
* \brief Adaptive RK4 integrator
*
* Dispatches between Generic::myrk4_adaptive() and myrk4_adaptive(const double coor[6], double lastnorm, double normref, double coornew[6], double cst[2], double& tdot_used, double h0, double& h1, double& hused) const depending on RotStar3_1::integ_kind_
*/
int myrk4_adaptive(Gyoto::Worldline* line, const double coord[8], double lastnorm, double normref, double coordnew[8], double h0, double& h1, double h1max) const;
/**
* \brief RK4 integrator (3+1)
*
* NB: we use the 6-coordinates, here, unlike the inherited function.
*/
int myrk4_adaptive(const double coor[6], double lastnorm, double normref, double coornew[6], double cst[2], double& tdot_used, double h0, double& h1, double h1max, double& hused) const;
/**
* \brief F function such as dy/dtau=F(y,cst)
*/
int diff(const double coord[8], double res[8]) const ;
/**
* \brief Alternate version of diff(const double coord[8], double res[8]) const
*
* Using only 6 parameters. Last int is not used: it is only here to
* distinguish the signature of the two methods. Could have been
* done choosing another name, too, but hey...
*/
int diff(const double y[6], double res[6], int) const ;
/**
* \brief Tweak coordinates to insure conservation of cst
*/
void Normalize4v(const double coordin[6], double coordout[6], const double cst[2], double& tdot_used) const;
double gmunu(const double * x, int mu, int nu) const ;
double christoffel(const double coord[8], const int alpha, const int mu,
const int nu) const ;
double ScalarProd(const double pos[4],
const double u1[4], const double u2[4]) const ;
virtual int setParameter(std::string, std::string, std::string);
};
#endif
|