31#ifndef __GyotoMetric_H_
32#define __GyotoMetric_H_
74 gg -> plugins(plugins);
75#ifdef GYOTO_USE_XERCES
76 if (fmp) gg -> setParameters(fmp);
100 std::vector<std::string> &plugin,
210 const std::string
kind() const;
215 Generic(const int coordkind, const std::string &name);
224 void
mass(const double, const std::string &unit);
231 double
mass(const std::string &unit) const;
294 virtual double
deltaMax(double const pos[8], double delta_max_external) const;
339 double dir=1.) const ;
414 const double u1[4], const double u2[4]) const;
423 double
norm(const double pos[4],
424 const double u1[4]) const;
442 void
dualOneForm(double const IN_ARRAY1_1[4], double const IN_ARRAY1_2[4], double ARGOUT_ARRAY1[4]) const ;
455 double const pos[4], double fourvel[4],
456 double screen1[4], double screen2[4],
457 double screen3[4]) const ;
469 double screen1[4], double screen2[4],
470 double screen3[4]) const ;
485 double u1[4], double u2[4], double u3[4]) const;
498 virtual double
gmunu(double const x[4], int mu, int nu) const;
509 virtual void
gmunu(double g[4][4], double const pos[4]) const;
521 const int alpha, const int mu, const int nu) const;
532 virtual int
christoffel(double dst[4][4][4], const double coord[4]) const ;
539 virtual int
myrk4(Worldline * line, state_t const &coord, double h, state_t &res) const;
541 virtual int
myrk4(Worldline * line, const double coord[8], double h, double res[8]) const = delete;
547 double lastnorm, double normref,
548 state_t &coordnew, double h0, double& h1,
549 double deltamax=GYOTO_DEFAULT_DELTA_MAX) const;
552 double lastnorm, double normref,
553 double coordnew[8], double h0, double& h1,
554 double deltamax=GYOTO_DEFAULT_DELTA_MAX) const = delete;
572 virtual int
diff(state_t const &x, state_t &dxdt) const ;
574 virtual int
diff(const double y[8], double res[8]) const = delete ;
580 double const coord[8]) const;
Astronomical objects (light emitters)
Gyoto ubiquitous macros and typedefs.
Tellers tell Listeners when they mutate.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Reference-counting pointers.
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
Listen to me and I'll warn you when I change.
Definition: GyotoHooks.h:82
Base class for metrics.
Definition: GyotoMetric.h:162
virtual double SysPrimeToTdot(const double coord[4], const double v[3]) const
Compute tdot as a function of dr/dt, dtheta/dt and dphi/dt. Everything is in geometrical units.
virtual void observerTetrad(obskind_t obskind, double const pos[4], double fourvel[4], double screen1[4], double screen2[4], double screen3[4]) const
Computes the orthonormal local tetrad of the observer.
virtual void zamoVelocity(double const pos[4], double vel[4]) const
Yield ZAMO velocity at a given position.
void dualOneForm(double const IN_ARRAY1_1[4], double const IN_ARRAY1_2[4], double ARGOUT_ARRAY1[4]) const
Computes dual 1-form Compute the dual 1-form of 4-vector.
bool keplerian_
1 if circularVelocity should return the Newtonian Keplerian velocity, in r^-3/2
Definition: GyotoMetric.h:187
bool keplerian() const
Get keplerian_.
double norm(const double pos[4], const double u1[4]) const
Scalar product.
virtual double getRms() const
double delta_max_
Maximum integration step for the adaptive integrator.
Definition: GyotoMetric.h:171
double delta_min_
Minimum integration step for the adaptive integrator.
Definition: GyotoMetric.h:170
virtual double christoffel(const double coord[4], const int alpha, const int mu, const int nu) const
Chistoffel symbol.
void addFourVect(double u1[4], double const u2[4]) const
add second vector to first one
virtual int isStopCondition(double const coord[8]) const
Check whether integration should stop.
int coordkind_
Kind of coordinates (cartesian-like, spherical-like, unspecified)
Definition: GyotoMetric.h:167
virtual void setParticleProperties(Gyoto::Worldline *line, double const coord[8]) const
Set Metric-specific constants of motion. Used e.g. in KerrBL.
void multiplyFourVect(double vect[4], double a) const
multiply vector by scalar
virtual double getSpecificAngularMomentum(double rr) const
virtual double gmunu(double const x[4], int mu, int nu) const
Metric coefficients.
void projectFourVect(double const pos[4], double u1[4], double const u2[4]) const
project u1 orthogonally to u2 at pos
double delta_max_over_r_
Numerical tuning parameter.
Definition: GyotoMetric.h:185
double mass() const
Get mass used in unitLength()
virtual double getRmb() const
virtual Generic * clone() const
Virtual copy constructor.
virtual void normalizeFourVel(double coord[8]) const
Normalize fourvelvel to -1.
virtual int myrk4(Worldline *line, state_t const &coord, double h, state_t &res) const
RK4 integrator.
virtual double getPotential(double const pos[4], double l_cst) const
virtual void cartesianVelocity(double const coord[8], double vel[3])
Compute xprime, yprime and zprime from 8-coordinates.
double unitLength() const
M * G / c^2, M is in kg, unitLength in meters.
double deltaMaxOverR() const
Get delta_max_over_r_.
virtual int myrk4_adaptive(Gyoto::Worldline *line, state_t const &coord, double lastnorm, double normref, state_t &coordnew, double h0, double &h1, double deltamax=GYOTO_DEFAULT_DELTA_MAX) const
RK4 integrator with adaptive step.
virtual double ScalarProd(const double pos[4], const double u1[4], const double u2[4]) const
Scalar product.
virtual int diff(state_t const &x, state_t &dxdt) const
F function such as dx/dt=F(x,cst)
void GramSchmidt(double const pos[4], double u0[4], double u1[4], double u2[4], double u3[4]) const
Apply Gram-Schmidt orthonormalization to a basis.
virtual void nullifyCoord(double coord[8]) const
Set tdot (coord[4]) such that coord is light-like. Everything is in geometrical units.
double mass_
Mass yielding geometrical unit (in kg).
Definition: GyotoMetric.h:166
int coordKind() const
Get coordinate kind.
virtual void circularVelocity(double const pos[4], double vel[4], double dir=1.) const
Yield circular velocity at a given position.
const std::string kind() const
Get kind_.
Object with properties.
Definition: GyotoObject.h:152
Entry in a register (or a full register)
Definition: GyotoRegister.h:117
Can be pointed to by a SmartPointer.
Definition: GyotoSmartPointer.h:81
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:135
Timelike or null geodesics.
Definition: GyotoWorldline.h:228
Gyoto::Metric::Subcontractor_t * getSubcontractor(std::string name, std::vector< std::string > &plugin, int errmode=0)
Query the Metric register.
void Register(std::string kind, Gyoto::Metric::Subcontractor_t *scp)
Make a Metric kind known to the Factory.
Register::Entry * Register_
The Metric register.
SmartPointer< Metric::Generic > Subcontractor_t(FactoryMessenger *, std::vector< std::string > const &)
A function to build instances of a specific Metric::Generic sub-class.
Definition: GyotoMetric.h:60
void initRegister()
Empty the Metric register.
SmartPointer< Metric::Generic > Subcontractor(FactoryMessenger *fmp, std::vector< std::string > const &plugins)
Subcontractor template.
Definition: GyotoMetric.h:72
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43