GyotoHayward.h
Go to the documentation of this file.
/*
Copyright 2018 Frederic Lamy, 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 __GyotoHayward_H_
#define __GyotoHayward_H_
namespace Gyoto {
namespace Metric { class Hayward; }
}
#include <GyotoMetric.h>
#include <GyotoWorldline.h>
#ifdef GYOTO_USE_XERCES
#include <GyotoRegister.h>
#endif
class Gyoto::Metric::Hayward : public Metric::Generic {
friend class Gyoto::SmartPointer<Gyoto::Metric::Hayward>;
// Data :
// -----
protected:
double charge_;
double spin_ ;
double a2_ ;
double a3_ ;
double a4_ ;
double b2_;
// Constructors - Destructor
// -------------------------
public:
GYOTO_OBJECT;
Hayward();
virtual Hayward * clone () const ;
// Accessors
// ---------
void spin(const double spin);
double spin() const ;
void charge(const double charge);
double charge() const ;
// Methods needed for PolishDoughnut
virtual double getSpecificAngularMomentum(double rr) const;
virtual double getPotential(double const pos[4], double l_cst) const;
// Keplerian equatorial orbits angular velocity
virtual void circularVelocity(double const coor[4], double vel[4],
double dir) const;
// Actual space-time API
void gmunu(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const ;
double gmunu(double const x[4], int mu, int nu) const ;
void gmunu_up(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const ;
double gmunu_up(double const x[4], int mu, int nu) const ;
using Generic::christoffel;
int christoffel(double dst[4][4][4], const double pos[4]) const ;
// Optimized
double ScalarProd(const double pos[4],
const double u1[4], const double u2[4]) const ;
};
#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.
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::Hayward
Metric of a regular rotating black hole or naked worm-hole.
Definition GyotoHayward.h:66
Gyoto::Metric::Hayward::a4_
double a4_
a2_*a2_
Definition GyotoHayward.h:76
Gyoto::Metric::Hayward::clone
virtual Hayward * clone() const
Virtual copy constructor.
Gyoto::Metric::Hayward::circularVelocity
virtual void circularVelocity(double const coor[4], double vel[4], double dir) const
Yield circular velocity at a given position.
Gyoto::Metric::Hayward::ScalarProd
double ScalarProd(const double pos[4], const double u1[4], const double u2[4]) const
Scalar product.
Gyoto::Metric::Hayward::gmunu_up
void gmunu_up(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const
Metric contravariant coefficients.
Gyoto::Metric::Hayward::a3_
double a3_
a2_*spin_
Definition GyotoHayward.h:75
Gyoto::Metric::Hayward::a2_
double a2_
spin_*spin_
Definition GyotoHayward.h:74
Gyoto::Metric::Hayward::getSpecificAngularMomentum
virtual double getSpecificAngularMomentum(double rr) const
Gyoto::Metric::Hayward::christoffel
int christoffel(double dst[4][4][4], const double pos[4]) const
Chistoffel symbol.
Gyoto::Metric::Hayward::spin
void spin(const double spin)
Set spin.
Gyoto::Metric::Hayward::b2_
double b2_
charge_*charge_
Definition GyotoHayward.h:77
Gyoto::Metric::Hayward::charge_
double charge_
Magnetic charge parameter.
Definition GyotoHayward.h:72
Gyoto::Metric::Hayward::gmunu
void gmunu(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const
Metric coefficients.
Gyoto::Metric::Hayward::getPotential
virtual double getPotential(double const pos[4], double l_cst) const
Gyoto::Metric::Hayward::Hayward
Hayward()
Default constructor.
Gyoto::Metric::Hayward::spin_
double spin_
Angular momentum parameter.
Definition GyotoHayward.h:73
Gyoto::Metric::Hayward::charge
void charge(const double charge)
Set charge.
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