GyotoComplexMetric.h
/*
Copyright 2020 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 __GyotoComplexMetric_H_
#define __GyotoComplexMetric_H_
#include <GyotoMetric.h>
#include <GyotoWIP.h>
namespace Gyoto {
namespace Metric { class Complex; }
}
class Gyoto::Metric::Complex
: public Gyoto::Metric::Generic, Gyoto::WIP
{
friend class Gyoto::SmartPointer<Gyoto::Metric::Complex>;
// Data :
// -----
protected:
size_t cardinal_;
Gyoto::SmartPointer<Gyoto::Metric::Generic> * elements_;
public:
GYOTO_OBJECT_THREAD_SAFETY;
Complex();
Complex(const Complex& ) ;
virtual Complex* clone() const;
virtual ~Complex() ;
void append(Gyoto::SmartPointer<Gyoto::Metric::Generic> element);
void remove(size_t i);
size_t getCardinal() const;
#ifdef GYOTO_USE_XERCES
virtual void fillElement(FactoryMessenger *fmp) const ;
virtual void setParameters(FactoryMessenger *fmp);
#endif
Gyoto::SmartPointer<Gyoto::Metric::Generic>& operator[](size_t i) ;
Gyoto::SmartPointer<Gyoto::Metric::Generic> const&operator[](size_t i) const;
public:
using Generic::gmunu;
void gmunu(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const ;
void jacobian(double ARGOUT_ARRAY3[4][4][4], const double IN_ARRAY1[4]) const;
int isStopCondition(double const coord[8]) const;
};
#endif
size_t
#define size_t
If not defined in <sys/types.h>.
Definition GyotoConfig.h:390
GyotoMetric.h
Base class for metric description.
GyotoWIP.h
Work in progress class.
Gyoto::Metric::Complex
Combine several metrics.
Definition GyotoComplexMetric.h:48
Gyoto::Metric::Complex::setParameters
virtual void setParameters(FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
Gyoto::Metric::Complex::Complex
Complex()
Default constructor.
Gyoto::Metric::Complex::cardinal_
size_t cardinal_
Number of objects.
Definition GyotoComplexMetric.h:58
Gyoto::Metric::Complex::elements_
Gyoto::SmartPointer< Gyoto::Metric::Generic > * elements_
Array of Astrobj::Generic.
Definition GyotoComplexMetric.h:63
Gyoto::Metric::Complex::jacobian
void jacobian(double ARGOUT_ARRAY3[4][4][4], const double IN_ARRAY1[4]) const
Derivatives of the metric covariant coefficients.
Gyoto::Metric::Complex::getCardinal
size_t getCardinal() const
Get the number of elements in the array.
Gyoto::Metric::Complex::clone
virtual Complex * clone() const
"Virtual" copy constructor
Gyoto::Metric::Complex::isStopCondition
int isStopCondition(double const coord[8]) const
Check whether integration should stop.
Gyoto::Metric::Complex::fillElement
virtual void fillElement(FactoryMessenger *fmp) const
Fill the XML element for this Object.
Gyoto::Metric::Complex::gmunu
void gmunu(double ARGOUT_ARRAY2[4][4], const double IN_ARRAY1[4]) const
Metric coefficients.
Gyoto::Metric::Complex::remove
void remove(size_t i)
Remove i-th element from the array.
Gyoto::Metric::Complex::append
void append(Gyoto::SmartPointer< Gyoto::Metric::Generic > element)
Add element at the end of the array.
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::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::WIP
Base class for work in progress.
Definition GyotoWIP.h:47
Gyoto::Metric
Access to metrics.
Definition GyotoAstrobj.h:47
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44