GyotoShift.h
Go to the documentation of this file.
/*
Copyright 2020 Thibaut Paumard & Frédéric Vincent
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 __GyotoShift_H_
#define __GyotoShift_H_
#include <GyotoMetric.h>
namespace Gyoto {
namespace Metric { class Shift; }
}
class Gyoto::Metric::Shift
: public Gyoto::Metric::Generic,
public Hook::Listener
{
friend class Gyoto::SmartPointer<Gyoto::Metric::Shift>;
protected:
Gyoto::SmartPointer<Gyoto::Metric::Generic> submet_;
double offset_[4];
public:
// This is the bare minimum of what a Metric class must implement:
GYOTO_OBJECT;
Shift();
virtual ~Shift();
virtual Shift* clone() const ;
virtual SmartPointer<Metric::Generic> subMetric() const;
virtual void subMetric(SmartPointer<Metric::Generic>) ;
virtual std::vector<double> offset() const;
virtual void offset(std::vector<double> const&);
virtual void mass(const double);
using Generic::gmunu;
virtual void gmunu(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const ;
using Generic::gmunu_up;
virtual void gmunu_up(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const ;
virtual void jacobian(double ARGOUT_ARRAY3[4][4][4], const double IN_ARRAY1[4]) const;
virtual int isStopCondition(double const coord[8]) const;
# ifdef GYOTO_USE_XERCES
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const ;
virtual void setParameters(FactoryMessenger *fmp) ;
# endif
virtual void tell(Gyoto::Hook::Teller *msg);
};
#endif
GyotoMetric.h
Base class for metric description.
GYOTO_OBJECT
#define GYOTO_OBJECT
Declare class::properties and class::getProperties().
Definition GyotoObject.h:84
Gyoto::Hook::Listener
I might listen to a Teller.
Definition GyotoHooks.h:64
Gyoto::Metric::Generic
Base class for metrics.
Definition GyotoMetric.h:162
Gyoto::Metric::Generic::gmunu
virtual double gmunu(double const x[4], int mu, int nu) const
Metric coefficients.
Gyoto::Metric::Generic::gmunu_up
virtual double gmunu_up(double const x[4], int mu, int nu) const
Metric contravariant coefficients.
Gyoto::Metric::Shift
The Shift flat-space metric.
Definition GyotoShift.h:47
Gyoto::Metric::Shift::clone
virtual Shift * clone() const
Virtual copy constructor.
Gyoto::Metric::Shift::tell
virtual void tell(Gyoto::Hook::Teller *msg)
This is how a Teller tells.
Gyoto::Metric::Shift::fillProperty
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
Gyoto::Metric::Shift::offset
virtual std::vector< double > offset() const
Get vector copy of pos_.
Gyoto::Metric::Shift::gmunu_up
virtual void gmunu_up(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const
Metric contravariant coefficients.
Gyoto::Metric::Shift::setParameters
virtual void setParameters(FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
Gyoto::Metric::Shift::mass
virtual void mass(const double)
Set mass used in unitLength().
Gyoto::Metric::Shift::jacobian
virtual void jacobian(double ARGOUT_ARRAY3[4][4][4], const double IN_ARRAY1[4]) const
Derivatives of the metric covariant coefficients.
Gyoto::Metric::Shift::isStopCondition
virtual int isStopCondition(double const coord[8]) const
Check whether integration should stop.
Gyoto::Metric::Shift::gmunu
virtual void gmunu(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const
Metric coefficients.
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Metric
Access to metrics.
Definition GyotoAstrobj.h:47
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44