GyotoStarTrace.h
Go to the documentation of this file.
/*
Copyright 2013-2015 Thibaut Paumard
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoStarTrace_H_
#define __GyotoStarTrace_H_
namespace Gyoto{
namespace Astrobj { class StarTrace; }
}
#include <GyotoStar.h>
class Gyoto::Astrobj::StarTrace :
public Gyoto::Astrobj::Star {
friend class Gyoto::SmartPointer<Gyoto::Astrobj::StarTrace>;
// Data :
// -----
protected:
double tmin_;
double tmax_;
double * x_;
double * y_;
double * z_;
// Constructors - Destructor
// -------------------------
public:
GYOTO_OBJECT;
StarTrace(SmartPointer<Metric::Generic> gg, double radius,
double const pos[4], double const v[3]) ;
StarTrace();
StarTrace(const StarTrace& orig);
StarTrace(const Star& o, double tmin, double tmax);
virtual StarTrace * clone() const ;
virtual ~StarTrace() ;
using Star::xAllocate;
void xAllocate(size_t);
void xAllocateXYZ();
using Star::xExpand;
size_t xExpand(int);
void computeXYZ(size_t i);
void computeXYZ();
using Star::setInitCoord;
virtual void setInitCoord(const double coord[8], int dir = 0);
using Generic::metric;
virtual void metric(SmartPointer<Metric::Generic> gg);
virtual void xStore(size_t ind, state_t const &coord, double tau) ;
// Accessors
// ---------
public:
virtual std::string className() const ;
virtual std::string className_l() const ;
double TMin()const;
void TMin(double);
double TMax()const;
void TMax(double);
using Star::setInitialCondition;
virtual void setInitialCondition(double const coord[8]);
virtual double operator()(double const coord[4]) ;
};
#endif
size_t
#define size_t
If not defined in <sys/types.h>.
Definition GyotoConfig.h:390
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
GyotoStar.h
Mass-less, spherical object following a timelike geodesic.
Gyoto::Astrobj::Generic::metric
virtual SmartPointer< Metric::Generic > metric() const
Get the Metric gg_.
Gyoto::Astrobj::Star
Mass-less, spherical object following a timelike geodesic.
Definition GyotoStar.h:96
Gyoto::Astrobj::Star::setInitialCondition
virtual void setInitialCondition(double const coord[8])
Same as Worldline::setInitialCondition(gg, coord, sys,1).
Gyoto::Astrobj::StarTrace
Like a Star that would be on all points of its orbit at all time.
Definition GyotoStarTrace.h:70
Gyoto::Astrobj::StarTrace::metric
virtual void metric(SmartPointer< Metric::Generic > gg)
Set the Metric gg_.
Gyoto::Astrobj::StarTrace::xExpand
size_t xExpand(int)
Expand x0, x1 etc... to hold more elements.
Gyoto::Astrobj::StarTrace::StarTrace
StarTrace(SmartPointer< Metric::Generic > gg, double radius, double const pos[4], double const v[3])
Create Star object and set initial condition.
Gyoto::Astrobj::StarTrace::setInitialCondition
virtual void setInitialCondition(double const coord[8])
Same as Worldline::setInitialCondition(gg, coord, sys,1).
Gyoto::Astrobj::StarTrace::tmin_
double tmin_
Minimum date to consider on the underlying Star orbit.
Definition GyotoStarTrace.h:76
Gyoto::Astrobj::StarTrace::setInitCoord
virtual void setInitCoord(const double coord[8], int dir=0)
Set Initial coordinate.
Gyoto::Astrobj::StarTrace::className
virtual std::string className() const
"StarTrace"
Gyoto::Astrobj::StarTrace::TMin
double TMin() const
Get tmin_.
Gyoto::Astrobj::StarTrace::TMax
double TMax() const
Get tmax_.
Gyoto::Astrobj::StarTrace::tmax_
double tmax_
Maximum date to consider on the underlying Star orbit.
Definition GyotoStarTrace.h:77
Gyoto::Astrobj::StarTrace::x_
double * x_
Cartesian x.
Definition GyotoStarTrace.h:78
Gyoto::Astrobj::StarTrace::xAllocate
void xAllocate(size_t)
Allocate x0, x1 etc. with a specified size.
Gyoto::Astrobj::StarTrace::clone
virtual StarTrace * clone() const
Cloner.
Gyoto::Astrobj::StarTrace::z_
double * z_
Cartesian z.
Definition GyotoStarTrace.h:80
Gyoto::Astrobj::StarTrace::className_l
virtual std::string className_l() const
"startrace"
Gyoto::Astrobj::StarTrace::y_
double * y_
Cartesian y.
Definition GyotoStarTrace.h:79
Gyoto::Astrobj::StarTrace::xAllocateXYZ
void xAllocateXYZ()
Allocate x_, y_, z_.
Gyoto::Astrobj::StarTrace::computeXYZ
void computeXYZ(size_t i)
Compute (and cache) x_, y_ and z_ for one date.
Gyoto::Astrobj::StarTrace::xStore
virtual void xStore(size_t ind, state_t const &coord, double tau)
Store coord at index ind.
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Worldline::xAllocate
virtual void xAllocate()
Allocate x0, x1 etc. with default size.
Gyoto::Worldline::xExpand
virtual size_t xExpand(int dir)
Expand x0, x1 etc... to hold more elements.
Gyoto::Worldline::setInitCoord
virtual void setInitCoord(const double coord[8], int dir, double const Ephi[4], double const Etheta[4])
Set Initial coordinate.
Gyoto::Astrobj
Access to astronomical objects.
Definition GyotoAstrobj.h:49
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44