Gyoto::Worldline::IntegState::Legacy Class Reference

Obsolete: Home-brewed integrator. More...

#include <GyotoWorldline.h>

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

List of all members.

Public Types

typedef Gyoto::SmartPointer
< Gyoto::SmartPointee
Subcontractor_t (Gyoto::FactoryMessenger *, std::vector< std::string > const &)
 A subcontractor builds an object upon order from the Factory.

Public Member Functions

 Legacy (Worldline *parent)
Legacyclone (Worldline *newparent) const
 Deep copy.
void init (Worldline *line, const state_t &coord, const double delta)
virtual std::string kind ()
 Return the integrator kind.
virtual int nextStep (state_t &coord, double &tau, double h1max=1e6)
 Make one step.
virtual void doStep (state_t const &coordin, double step, state_t &coordout)
 Make one step of exactly this size.
virtual void init (Worldline *line, const double *coord, const double delta)
 Obsolete, update your code.
virtual void init ()
 Cache whatever needs to be cached.
virtual void checkNorm (double coord[8])
 Check norm.
virtual int nextStep (double *coord, double h1max=GYOTO_DEFAULT_DELTA_MAX)
 Obsolete, update your code.
virtual void doStep (double const coordin[8], double step, double coordout[8])
 Obsolete, update your code.
void incRefCount ()
 Increment the reference counter. Warning: Don't mess with the counter.
int decRefCount ()
 Decrement the reference counter and return current value. Warning: Don't mess with the counter.
int getRefCount ()
 Get the current number of references.

Protected Attributes

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

Private Attributes

state_t coord_
 Previously determined coordinate.


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

Detailed Description

Obsolete: Home-brewed integrator.

Will be removed soon.

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 Typedef Documentation

typedef Gyoto::SmartPointer<Gyoto::SmartPointee> Gyoto::SmartPointee::Subcontractor_t(Gyoto::FactoryMessenger *, std::vector< std::string > const &) [inherited]

A subcontractor builds an object upon order from the Factory.

Various classes need to provide a subcontractor to be able to instantiate themselves upon order from the Factory. A subcontractor is a function (often a static member function) which accepts a pointer to a FactoryMessenger as unique parameter, communicates with the Factory using this messenger to read an XML description of the object to build, and returns this objet. SmartPointee::Subcontractor_t* is just generic enough a typedef to cast to and from other subcontractor types: Astrobj::Subcontractor_t, Metric::Subcontractor_t, Spectrum::Subcontractor_t. A subcontractor needs to be registered using the relevant Register() function: Astrobj::Register(), Metric::Register(), Spectrum::Register().

Member Function Documentation

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

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::Legacy::doStep ( state_t const &  coordin,
double  step,
state_t &  coordout 
) [virtual]

Make one step of exactly this size.

doStep() is meant to refine a computation made using nextStep(). In particular, there is no checking for norm conservation.

[in] coordin current position-velocity;
[in] step exact step to use.
[out] coordout next position-velocity;

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

virtual void Gyoto::Worldline::IntegState::Generic::init (  )  [virtual, inherited]

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 state_t &  coord,
const double  delta 
) [virtual]
line The Worldline that we are integrating. Sets: Worldline::line_, Worldline::gg_, Worldline::adaptive_.
coord Initial coordinate.
delta Integration step. Sign determines direction.

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

virtual int Gyoto::Worldline::IntegState::Legacy::nextStep ( state_t &  coord,
double &  tau,
double  h1max = 1e6 
) [virtual]

Make one step.

[out] coord Next position-velocity;
[out] tau Next proper time or affine parameter
[in] h1max maximum step in case of adaptive integration

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

Member Data Documentation

The Metric in this end of the Universe.

Taken from Worldline::line_, never updated.

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_ [protected, inherited]

Initial norm of the 4-velocity.

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

Generated on 23 Oct 2019 for Gyoto by  doxygen 1.6.1