Gyoto
Public Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
Gyoto::Worldline::IntegState::Legacy Class Reference

Home-brewed integrator. More...

#include <GyotoWorldline.h>

Inheritance diagram for Gyoto::Worldline::IntegState::Legacy:
Gyoto::Worldline::IntegState::Generic Gyoto::SmartPointee

Public Member Functions

 Legacy (Worldline *parent)
 Constructor.
 
Legacyclone (Worldline *newparent) const
 Deep copy. More...
 
void init (Worldline *line, const double *coord, const double delta)
 
virtual std::string kind ()
 Return the integrator kind.
 
virtual int nextStep (double *coord, double h1max=1e6)
 Make one step. More...
 
virtual void init ()
 Cache whatever needs to be cached. More...
 
virtual void checkNorm (double coord[8])
 Check norm. More...
 

Protected Attributes

Worldlineline_
 Worldline that we are integrating. More...
 
double delta_
 Integration step (current in case of adaptive_).
 
bool adaptive_
 Whether to use an adaptive step.
 
double norm_
 Current norm of the 4-velocity.
 
double normref_
 
Gyoto::SmartPointer
< Gyoto::Metric::Generic
gg_
 The Metric in this end of the Universe. More...
 

Private Attributes

double coord_ [8]
 Previously determined coordinate.
 

Friends

class Gyoto::SmartPointer< Gyoto::Worldline::IntegState::Legacy >
 

Detailed Description

Home-brewed integrator.

The integrator used by this IntegState::Generic implementation is actually implemented in Metric::Generic::myrk4_adaptive(). It does not use most of the tuning parameters Worldline, it uses the homonym parameters in Metric::Generic instead. to use this integrator, pass "Legacy" to Worldline::integrator(std::string type).

Member Function Documentation

virtual void Gyoto::Worldline::IntegState::Generic::checkNorm ( double  coord[8])
virtualinherited

Check norm.

Issue a warning using GYOTO_SEVERE if norm is drifting. nextStep() implementations should call it.

Legacy* Gyoto::Worldline::IntegState::Legacy::clone ( Worldline newparent) const
virtual

Deep copy.

Derived classes must implement it

Implements Gyoto::Worldline::IntegState::Generic.

virtual void Gyoto::Worldline::IntegState::Generic::init ( )
virtualinherited

Cache whatever needs to be cached.

This is called by all the methods in Worldline each time an member that could be cached in Worldline::state_ changes. Therefore, user code should normally not have to call it.

Reimplemented in Gyoto::Worldline::IntegState::Boost.

void Gyoto::Worldline::IntegState::Legacy::init ( Worldline line,
const double *  coord,
const double  delta 
)
virtual
Parameters
lineThe Worldline that we are integrating. Sets: Worldline::line_, Worldline::gg_, Worldline::adaptive_.
coordInitial coordinate.
deltaIntegration step. Sign determines direction.

Reimplemented from Gyoto::Worldline::IntegState::Generic.

virtual int Gyoto::Worldline::IntegState::Legacy::nextStep ( double *  coord,
double  h1max = 1e6 
)
virtual

Make one step.

Parameters
[out]coordNext position-velocity;
[in]h1maxmaximum step in case of adaptive integration

Implements Gyoto::Worldline::IntegState::Generic.

Member Data Documentation

Gyoto::SmartPointer<Gyoto::Metric::Generic> Gyoto::Worldline::IntegState::Generic::gg_
protectedinherited

The Metric in this end of the Universe.

Taken from Worldline::line_, never updated.

Worldline* Gyoto::Worldline::IntegState::Generic::line_
protectedinherited

Worldline that we are integrating.

Beware this is not a SmartPointer. Make sure line_ still exists when calling nestStep().

double Gyoto::Worldline::IntegState::Generic::normref_
protectedinherited

Initial norm of the 4-velocity.


The documentation for this class was generated from the following file: