Gyoto
GyotoRotStar3_1.h
Go to the documentation of this file.
1 
8 /*
9  Copyright 2011-2014, 2016, 2018 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 
28 #ifndef __GyotoRotStar3_1_H_
29 #define __GyotoRotStar3_1_H_
30 
31 #include <iostream>
32 #include <fstream>
33 
34 namespace Lorene{
35  class Star_rot;
36 }
37 
38 namespace Gyoto {
39  namespace Metric { class RotStar3_1; }
40 }
41 
42 #include <GyotoMetric.h>
43 #include <GyotoWorldline.h>
44 #include <GyotoSmartPointer.h>
45 
46 #ifdef GYOTO_USE_XERCES
47 #include <GyotoRegister.h>
48 #endif
49 
56 
57  private:
58  char* filename_;
59  Lorene::Star_rot * star_;
61 
62  public:
66  RotStar3_1(const RotStar3_1& ) ;
67  virtual ~RotStar3_1() ;
68  virtual RotStar3_1* clone() const ;
70 
71  void fileName(char const *);
72  char const * fileName() const;
73 
74  void file(std::string const &);
75  std::string file() const;
76 
77  void integKind(int);
78  int integKind() const ;
79  void genericIntegrator(bool);
80  bool genericIntegrator() const ;
81 
83 
90  int myrk4(const double coord[6], double h, double res[6]) const;
91 
92 
98  int myrk4_adaptive(Gyoto::Worldline* line, state_t const &coord, double lastnorm, double normref, state_t &coordnew, double h0, double& h1, double h1max) const;
99 
105  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;
106 
110  int diff(state_t const &coord, state_t &res) const ;
111 
119  int diff(const double y[6], double res[6], int) const ;
120 
121 
125  void Normalize4v(const double coordin[6], double coordout[6], const double cst[2], double& tdot_used) const;
126 
127  double gmunu(const double * x, int mu, int nu) const ;
128 
129  double christoffel(const double coord[8], const int alpha, const int mu,
130  const int nu) const ;
131 
132  double ScalarProd(const double pos[4],
133  const double u1[4], const double u2[4]) const ;
134 
135  virtual int setParameter(std::string, std::string, std::string);
136 
137 };
138 
139 #endif
Gyoto::Metric::RotStar3_1::ScalarProd
double ScalarProd(const double pos[4], const double u1[4], const double u2[4]) const
Scalar product.
Gyoto::Metric::RotStar3_1::clone
virtual RotStar3_1 * clone() const
Cloner (uses RotStar3_1(file, integ_kind))
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Gyoto::Metric::RotStar3_1::setParameter
virtual int setParameter(std::string, std::string, std::string)
Set parameter by name.
GyotoSmartPointer.h
Reference-counting pointers.
GYOTO_OBJECT_THREAD_SAFETY
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
GyotoRegister.h
Gyoto registers.
Gyoto::Metric::RotStar3_1::myrk4_adaptive
int myrk4_adaptive(Gyoto::Worldline *line, state_t const &coord, double lastnorm, double normref, state_t &coordnew, double h0, double &h1, double h1max) const
Adaptive RK4 integrator.
Gyoto::Metric::RotStar3_1
Numerical metric around a rotating star in 3+1 formalism.
Definition: GyotoRotStar3_1.h:54
Gyoto::Metric::RotStar3_1::fileName
char const * fileName() const
Get filename_.
Gyoto::Metric::Generic
Base class for metrics.
Definition: GyotoMetric.h:162
Gyoto
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
Gyoto::Metric::RotStar3_1::integ_kind_
int integ_kind_
1 if RotStar3_1::myrk4(), 0 if Metric::myrk4()
Definition: GyotoRotStar3_1.h:60
Gyoto::Metric::RotStar3_1::Normalize4v
void Normalize4v(const double coordin[6], double coordout[6], const double cst[2], double &tdot_used) const
Tweak coordinates to insure conservation of cst.
GyotoMetric.h
Base class for metric description.
Gyoto::Metric::RotStar3_1::star_
Lorene::Star_rot * star_
Pointer to underlying Lorene Star_rot instance.
Definition: GyotoRotStar3_1.h:59
Gyoto::SmartPointer
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Gyoto::Metric::Generic::myrk4
virtual int myrk4(Worldline *line, state_t const &coord, double h, state_t &res) const
RK4 integrator.
Gyoto::Metric::RotStar3_1::filename_
char * filename_
Lorene output file name.
Definition: GyotoRotStar3_1.h:58
Gyoto::Metric::RotStar3_1::genericIntegrator
bool genericIntegrator() const
Get !integ_kind_.
Gyoto::Metric::RotStar3_1::file
std::string file() const
Get filename_.
Gyoto::Metric::RotStar3_1::myrk4
int myrk4(const double coord[6], double h, double res[6]) const
RK4 integrator.
GyotoWorldline.h
Timelike or null geodesics.
Gyoto::Metric::RotStar3_1::diff
int diff(state_t const &coord, state_t &res) const
F function such as dy/dtau=F(y,cst)
Gyoto::Metric::RotStar3_1::integKind
int integKind() const
Get integ_kind_.