GyotoRotStar3_1.h
Go to the documentation of this file.
/*
Copyright 2011-2014, 2016, 2018, 2020 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 __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 : public Gyoto::Metric::Generic {
friend class Gyoto::SmartPointer<Gyoto::Metric::RotStar3_1>;
private:
char* filename_;
Lorene::Star_rot * star_;
int integ_kind_;
public:
GYOTO_OBJECT;
GYOTO_OBJECT_THREAD_SAFETY;
RotStar3_1();
RotStar3_1(const RotStar3_1& ) ;
virtual ~RotStar3_1() ;
virtual RotStar3_1* clone() const ;
void fileName(char const *);
char const * fileName() const;
void file(std::string const &);
std::string file() const;
void integKind(int);
int integKind() const ;
void genericIntegrator(bool);
bool genericIntegrator() const ;
using Metric::Generic::myrk4;
int myrk4(const double coord[6], double h, double res[6]) const;
int myrk4_adaptive(Gyoto::Worldline* line, state_t const &coord, double lastnorm, double normref, state_t &coordnew, double h0, double& h1, double h1max) const;
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;
int diff(state_t const &coord, state_t &res, double mass) const ;
int diff(const double y[6], double res[6], int) const ;
void Normalize4v(const double coordin[6], double coordout[6], const double cst[2], double& tdot_used) const;
using Generic::gmunu;
double gmunu(double const x[4], int mu, int nu) const ;
using Generic::christoffel;
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
GyotoMetric.h
Base class for metric description.
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoRegister.h
Gyoto registers.
GyotoSmartPointer.h
Reference-counting pointers.
GyotoWorldline.h
Timelike or null geodesics.
Gyoto::Metric::Generic
Base class for metrics.
Definition GyotoMetric.h:162
Gyoto::Metric::Generic::christoffel
virtual double christoffel(const double coord[4], const int alpha, const int mu, const int nu) const
Chistoffel symbol.
Gyoto::Metric::Generic::gmunu
virtual double gmunu(double const x[4], int mu, int nu) const
Metric coefficients.
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
Numerical metric around a rotating star in 3+1 formalism.
Definition GyotoRotStar3_1.h:54
Gyoto::Metric::RotStar3_1::diff
int diff(state_t const &coord, state_t &res, double mass) const
F function such as dy/dtau=F(y,cst).
Gyoto::Metric::RotStar3_1::gmunu
double gmunu(double const x[4], int mu, int nu) const
Metric coefficients.
Gyoto::Metric::RotStar3_1::RotStar3_1
RotStar3_1()
Constructor.
Gyoto::Metric::RotStar3_1::myrk4
int myrk4(const double coord[6], double h, double res[6]) const
RK4 integrator.
Gyoto::Metric::RotStar3_1::file
void file(std::string const &)
Set filename_.
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.
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::genericIntegrator
void genericIntegrator(bool)
Set !integ_kind_.
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::clone
virtual RotStar3_1 * clone() const
Cloner (uses RotStar3_1(file, integ_kind)).
Gyoto::Metric::RotStar3_1::integKind
void integKind(int)
Set integ_kind_.
Gyoto::Metric::RotStar3_1::setParameter
virtual int setParameter(std::string, std::string, std::string)
Set parameter by name.
Gyoto::Metric::RotStar3_1::star_
Lorene::Star_rot * star_
Pointer to underlying Lorene Star_rot instance.
Definition GyotoRotStar3_1.h:59
Gyoto::Metric::RotStar3_1::filename_
char * filename_
Lorene output file name.
Definition GyotoRotStar3_1.h:58
Gyoto::Metric::RotStar3_1::fileName
void fileName(char const *)
Set filename_.
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Metric
Access to metrics.
Definition GyotoAstrobj.h:47
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44