Gyoto
GyotoShift.h
Go to the documentation of this file.
1 
7 /*
8  Copyright 2020 Thibaut Paumard & Frédéric Vincent
9 
10  This file is part of Gyoto.
11 
12  Gyoto is free software: you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation, either version 3 of the License, or
15  (at your option) any later version.
16 
17  Gyoto is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 
27 #ifndef __GyotoShift_H_
28 #define __GyotoShift_H_
29 
30 #include <GyotoMetric.h>
31 
32 namespace Gyoto {
33  namespace Metric { class Shift; }
34 }
35 
45  : public Gyoto::Metric::Generic,
46  public Hook::Listener
47 {
49 
50  protected:
51  Gyoto::SmartPointer<Gyoto::Metric::Generic> submet_;
52  double offset_[4];
53 
54  public:
55  // This is the bare minimum of what a Metric class must implement:
57  Shift();
58  virtual ~Shift();
59  virtual Shift* clone() const ;
60 
61  virtual SmartPointer<Metric::Generic> subMetric() const;
62  virtual void subMetric(SmartPointer<Metric::Generic>) ;
63  virtual std::vector<double> offset() const;
64  virtual void offset(std::vector<double> const&);
65 
66  virtual void mass(const double);
67  using Generic::gmunu;
68  virtual void gmunu(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const ;
69  using Generic::gmunu_up;
70  virtual void gmunu_up(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const ;
71  virtual void jacobian(double ARGOUT_ARRAY3[4][4][4], const double IN_ARRAY1[4]) const;
72  virtual int isStopCondition(double const coord[8]) const;
73 
74 # ifdef GYOTO_USE_XERCES
75  virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const ;
76  virtual void setParameters(FactoryMessenger *fmp) ;
77 # endif
78 
79  virtual void tell(Gyoto::Hook::Teller *msg);
80 
81 };
82 
83 #endif
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
virtual void gmunu_up(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const
Metric contravariant coefficients.
double mass() const
Get mass used in unitLength()
virtual std::vector< double > offset() const
Get vector copy of #pos_.
virtual void jacobian(double ARGOUT_ARRAY3[4][4][4], const double IN_ARRAY1[4]) const
Derivatives of the metric covariant coefficients.
Base class for metrics.
Definition: GyotoMetric.h:158
virtual int isStopCondition(double const coord[8]) const
Check whether integration should stop.
virtual void tell(Gyoto::Hook::Teller *msg)
This is how a Teller tells.
virtual double gmunu_up(double const x[4], int mu, int nu) const
Metric contravariant coefficients.
virtual double gmunu(double const x[4], int mu, int nu) const
Metric coefficients.
Base class for metric description.
virtual void setParameters(FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
Pointers performing reference counting.
Definition: GyotoProperty.h:45
I might listen to a Teller.
Definition: GyotoHooks.h:64
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
The Shift flat-space metric.
Definition: GyotoShift.h:44
virtual Shift * clone() const
Virtual copy constructor.