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:
67  Complex();
68  Complex(const Complex& ) ;
69  virtual Complex* clone() const;
70 
73  virtual ~Complex() ;
74  void append(Gyoto::SmartPointer<Gyoto::Metric::Generic> element);
76  void remove(size_t i);
78  size_t getCardinal() const;
80 #ifdef GYOTO_USE_XERCES
81  virtual void fillElement(FactoryMessenger *fmp) const ;
82  virtual void setParameters(FactoryMessenger *fmp);
83 #endif
84 
94  Gyoto::SmartPointer<Gyoto::Metric::Generic>& operator[](size_t i) ;
96  Gyoto::SmartPointer<Gyoto::Metric::Generic> const&operator[](size_t i) const;
98 
99  public:
100  using Generic::gmunu;
101  void gmunu(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const ;
102  void jacobian(double ARGOUT_ARRAY3[4][4][4], const double IN_ARRAY1[4]) const;
103  int isStopCondition(double const coord[8]) const;
104 
105 };
106 
107 #endif
Base class for work in progress.
Definition: GyotoWIP.h:46
Base class for metrics.
Definition: GyotoMetric.h:158
#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:387
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.
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:43
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
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.