GyotoWorldline.h File Reference

Timelike or null geodesics. More...

#include <iostream>
#include <fstream>
#include <string>
#include <GyotoDefs.h>
#include <functional>
#include <array>
#include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
#include <GyotoSmartPointer.h>
#include <GyotoMetric.h>
#include <GyotoScreen.h>
#include <GyotoHooks.h>

Go to the source code of this file.

Classes

class  Gyoto::Worldline
 Timelike or null geodesics. More...
class  Gyoto::Worldline::IntegState
class  Gyoto::Worldline::IntegState::Generic
 Current state of a geodesic integration. More...
class  Gyoto::Worldline::IntegState::Legacy
 Home-brewed integrator. More...
class  Gyoto::Worldline::IntegState::Boost
 Boost integrator. More...

Namespaces

namespace  Gyoto
 

Namespace for the Gyoto library.


Defines

#define GYOTO_WORLDLINE_PROPERTIES(c)
 Define the bunch of Properties that make up the Worldline interface.
#define GYOTO_WORLDLINE_ACCESSORS(c)
 Define the wrapper accessors used in GYOTO_WORLDLINE_PROPERTIES(class).
#define GYOTO_WORLDLINE_PROPERTY_END(c, a)
 Drop-in replacement for GYOTO_PROPERTY_END(), which adds the Worldline interface.
#define GYOTO_WORLDLINE
 Declare the Worldline interface wrappers.

Detailed Description

Timelike or null geodesics.


Define Documentation

#define GYOTO_WORLDLINE
Value:
void _delta(const double delta);                        \
  void _delta(double, const std::string &unit);         \
  double _delta() const ;                               \
  double _delta(const std::string &unit) const ;        \
  void _tMin(const double tmin);                        \
  void _tMin(double, const std::string &unit);          \
  double _tMin() const ;                                \
  double _tMin(const std::string &unit) const ;         \
  void _adaptive (bool mode) ;                          \
  bool _adaptive () const ;                             \
  void _secondary (bool sec) ;                          \
  bool _secondary () const ;                            \
  void _maxiter (size_t miter) ;                        \
  size_t _maxiter () const ;                            \
  void _integrator(std::string const & type);           \
  std::string _integrator() const ;                     \
  double _deltaMin() const;                             \
  void _deltaMin(double h1);                            \
  void _absTol(double);                                 \
  double _absTol()const;                                \
  void _relTol(double);                                 \
  double _relTol()const;                                \
  void _deltaMax(double h1);                            \
  double _deltaMax()const;                              \
  double _deltaMaxOverR() const;                        \
  void _deltaMaxOverR(double t);                        \
  std::vector<double> _initCoord()const;                \
  void _initCoord(std::vector<double> const&f);         \
  void _metric(SmartPointer<Metric::Generic>);          \
  SmartPointer<Metric::Generic> _metric() const;

Declare the Worldline interface wrappers.

This macro must be called in the class declaration (.h file), in a public section. Its sibling GYOTO_WORLDLINE_ACCESSORS(c) must be called with the class method definition (.C file). Note that GYOTO_WORLDLINE_PROPERTY_END(c, a) calls GYOTO_WORLDLINE_ACCESSORS(c).

#define GYOTO_WORLDLINE_ACCESSORS (  ) 
Value:
void c::_secondary(bool s) {secondary(s);}                              \
  bool c::_secondary() const {return secondary();}                      \
  void c::_adaptive(bool s) {adaptive(s);}                              \
  bool c::_adaptive() const {return adaptive();}                        \
  void c::_relTol(double f){relTol(f);}                                 \
  double c::_relTol()const{return relTol();}                            \
  void c::_absTol(double f){absTol(f);}                                 \
  double c::_absTol()const{return absTol();}                            \
  void c::_deltaMin(double f){deltaMin(f);}                             \
  double c::_deltaMin()const{return deltaMin();}                        \
  void c::_deltaMax(double f){deltaMax(f);}                             \
  double c::_deltaMax()const{return deltaMax();}                        \
  void c::_deltaMaxOverR(double f){deltaMaxOverR(f);}                   \
  double c::_deltaMaxOverR()const{return deltaMaxOverR();}              \
  void c::_delta(double f){delta(f);}                                   \
  double c::_delta()const{return delta();}                              \
  void c::_delta(double f, std::string const &u){delta(f, u);}          \
  double c::_delta(std::string const &u)const{return delta(u);}         \
  void c::_tMin(double f){tMin(f);}                                     \
  double c::_tMin()const{return tMin();}                                \
  void c::_tMin(double f, std::string const &u){tMin(f, u);}            \
  double c::_tMin(std::string const &u)const{return tMin(u);}           \
  void c::_maxiter(size_t f){maxiter(f);}                               \
  size_t c::_maxiter()const{return maxiter();}                          \
  void c::_integrator(std::string const &f){integrator(f);}             \
  std::string c::_integrator() const {return integrator();}             \
  std::vector<double> c::_initCoord()const{return initCoord();}         \
  void c::_initCoord(std::vector<double> const &f){initCoord(f);}       \
  void c::_metric(SmartPointer<Metric::Generic>f){metric(f);}           \
  SmartPointer<Metric::Generic> c::_metric() const{return metric();}

Define the wrapper accessors used in GYOTO_WORLDLINE_PROPERTIES(class).

This macro, which is called automatically by GYOTO_WORLDLINE_PROPERTY_END(c, a), must be called once with the definition of the methods (.C file) of any class that derives from Worldline. The corresponding macro GYOTO_WORLDLINE must be called in the corresponding class declaration (.h file).

This is made necessary by how multiple inheritence works: directly using the accessors in the Worldline API leads to segfault at runtime (unless too much extra care is taken) and may go unnoticed.

These accessors must be declared in the class declaration using the GYOTO_WORLDLINE macro.

#define GYOTO_WORLDLINE_PROPERTIES (  ) 
Value:
Gyoto::Property("Gyoto::Worldline", "Time-like or null geodesic."),     \
    GYOTO_PROPERTY_BOOL(c, HighOrderImages, PrimaryOnly, _secondary,    \
                        "Whether to stop Photon integration at 180° deflection.") \
    GYOTO_PROPERTY_DOUBLE(c, RelTol, _relTol,                           \
                          "Relative tolerance for the adaptive step integrators.") \
    GYOTO_PROPERTY_DOUBLE(c, AbsTol, _absTol,                           \
                          "Absolute tolerance for the adaptive step integrators.") \
    GYOTO_PROPERTY_DOUBLE(c, DeltaMaxOverR, _deltaMaxOverR,             \
                          "Maximum value of step/distance from center of mass.") \
    GYOTO_PROPERTY_DOUBLE(c, DeltaMax, _deltaMax, "Maximum step (geometrical units).")  \
    GYOTO_PROPERTY_DOUBLE(c, DeltaMin, _deltaMin, "Minimum step (geometrical units).")  \
    GYOTO_PROPERTY_STRING(c, Integrator, _integrator,                   \
                          "Name of integrator (\"runge_kutta_fehlberg78\").")                   \
    GYOTO_PROPERTY_SIZE_T(c, MaxIter, _maxiter,                         \
                          "Maximum number of integration steps.")       \
    GYOTO_PROPERTY_BOOL(c, Adaptive, NonAdaptive, _adaptive,            \
                        "Whether to use an adaptive step.")             \
    GYOTO_PROPERTY_DOUBLE_UNIT(c, MinimumTime, _tMin,                   \
                               "Do not integrate earlier than this date (geometrical_time).") \
    GYOTO_PROPERTY_DOUBLE_UNIT(c, Delta, _delta,                        \
                               "Initial integration step (geometrical units).")         \
    GYOTO_PROPERTY_VECTOR_DOUBLE(c, InitCoord, _initCoord,              \
                                 "Initial 8-coordinate.")               \
    GYOTO_PROPERTY_METRIC(c, Metric, _metric,                           \
                          "The geometry of space-time at this end of the Universe.")

Define the bunch of Properties that make up the Worldline interface.

This macro, which is called automatically by GYOTO_WORLDLINE_PROPERTY_END(c, a), must be inserted in the definition of the Property list for any class derived from Worldline.

#define GYOTO_WORLDLINE_PROPERTY_END ( c,
 ) 
Value:

Drop-in replacement for GYOTO_PROPERTY_END(), which adds the Worldline interface.

This macro replaces GYOTO_PROPERTY_END(c, a) for classes that derive from Worldline. It calls GYOTO_WORLDLINE_PROPERTIES(a) and GYOTO_WORLDLINE_ACCESSORS(c). If this macro is used, GYOTO_WORLDLINE must be called in the class declaration (.h file).


Generated on 6 May 2017 for Gyoto by  doxygen 1.6.1