Gyoto
Classes | Namespaces | Macros
GyotoWorldline.h File Reference

Timelike or null geodesics. More...

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <GyotoDefs.h>
#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
 Obsolete: Home-brewed integrator. More...
 

Namespaces

namespace  Gyoto
 Namespace for the Gyoto library.
 

Macros

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

Detailed Description

Timelike or null geodesics.

Macro Definition Documentation

◆ GYOTO_WORLDLINE

#define GYOTO_WORLDLINE

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).

◆ GYOTO_WORLDLINE_ACCESSORS

#define GYOTO_WORLDLINE_ACCESSORS (   c)

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.

◆ GYOTO_WORLDLINE_PROPERTIES

#define GYOTO_WORLDLINE_PROPERTIES (   c)
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_BOOL(c, ParallelTransport, NoParallelTransport, _parallelTransport, \
"Whether to perform parallel transport of a local triad (used for polarization).") \
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.")
Property that can be set and got using standard methods.
Definition: GyotoProperty.h:608

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.

◆ GYOTO_WORLDLINE_PROPERTY_END

#define GYOTO_WORLDLINE_PROPERTY_END (   c,
 
)
Value:
GYOTO_PROPERTY_END(c, a) \
GYOTO_WORLDLINE_ACCESSORS(c)
#define GYOTO_WORLDLINE_PROPERTIES(c)
Define the bunch of Properties that make up the Worldline interface.
Definition: GyotoWorldline.h:58

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).