Gyoto
GyotoComplexMetric.h
1 
7 /*
8  Copyright 2020 Thibaut Paumard
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 __GyotoComplexMetric_H_
28 #define __GyotoComplexMetric_H_
29 
30 #include <GyotoMetric.h>
31 #include <GyotoWIP.h>
32 
33 namespace Gyoto {
34  namespace Metric { class Complex; }
35 }
36 
48 {
50 
51  // Data :
52  // -----
53  protected:
54 
59 
63  Gyoto::SmartPointer<Gyoto::Metric::Generic> * elements_;
64 
65  public:
66  public:
69  Complex();
70  Complex(const Complex& ) ;
71  virtual Complex* clone() const;
72 
75  virtual ~Complex() ;
76 
78  int coordKind() const;
79 
80  void append(Gyoto::SmartPointer<Gyoto::Metric::Generic> element);
82  void remove(size_t i);
84  size_t getCardinal() const;
86 #ifdef GYOTO_USE_XERCES
87  virtual void fillElement(FactoryMessenger *fmp) const ;
88  virtual void setParameters(FactoryMessenger *fmp);
89 #endif
90 
100  Gyoto::SmartPointer<Gyoto::Metric::Generic>& operator[](size_t i) ;
102  Gyoto::SmartPointer<Gyoto::Metric::Generic> const&operator[](size_t i) const;
104 
105  public:
106  using Generic::gmunu;
107  void gmunu(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const ;
108  void jacobian(double ARGOUT_ARRAY3[4][4][4], const double IN_ARRAY1[4]) const;
109  int isStopCondition(double const coord[8]) const;
110 
111 };
112 
113 #endif
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Base class for work in progress.
Definition: GyotoWIP.h:46
Base class for metrics.
Definition: GyotoMetric.h:163
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:424
Work in progress class.
void jacobian(double ARGOUT_ARRAY3[4][4][4], const double IN_ARRAY1[4]) const
Derivatives of the metric covariant coefficients.
virtual double gmunu(double const x[4], int mu, int nu) const
Metric coefficients.
virtual int coordKind() const
Get coordinate kind.
Base class for metric description.
Gyoto::SmartPointer< Gyoto::Metric::Generic > * elements_
Array of Astrobj::Generic.
Definition: GyotoComplexMetric.h:63
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:46
virtual void setParameters(FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
virtual Complex * clone() const
"Virtual" copy constructor
size_t getCardinal() const
Get the number of elements in the array.
Pointers performing reference counting.
Definition: GyotoProperty.h:45
Combine several metrics.
Definition: GyotoComplexMetric.h:46
int coordKind() const
Get coordinate kind.
size_t cardinal_
Number of objects.
Definition: GyotoComplexMetric.h:58
void append(Gyoto::SmartPointer< Gyoto::Metric::Generic > element)
Add element at the end of the array.
void remove(size_t i)
Remove i-th element from the array.
virtual void fillElement(FactoryMessenger *fmp) const
Fill the XML element for this Object.
int isStopCondition(double const coord[8]) const
Check whether integration should stop.