KADATH
metric_AADS.hpp
1 /*
2  Copyright 2017 Gregoire Martinon
3 
4  This file is part of Kadath.
5 
6  Kadath is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Kadath is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Kadath. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef __METRIC__AADS_HPP_
21 #define __METRIC__AADS_HPP_
22 #include "metric.hpp"
23 #include "scalar.hpp"
24 #include "space.hpp"
25 #include "system_of_eqs.hpp"
26 #include "tensor.hpp"
27 #include "term_eq.hpp"
28 #include "name_tools.hpp"
29 #include "metric_tensor.hpp"
30 #include "base_tensor.hpp"
31 #include "vector.hpp"
32 #include <cmath>
33 #include <vector>
34 #include <string>
35 #include "gsl/gsl_permutation.h"
36 
37 namespace Kadath {
38 using std::vector;
39 
44 class Metric_ADS : public Metric
45 {
46  protected :
47  int m_nd;
48  double m_L;
52 
53  public:
54  Metric_ADS(const Space& space);
55  Metric_ADS(const Metric_ADS& so);
56  virtual void manipulate_ind(Term_eq& so, int ind) const;
57  virtual Term_eq derive(int type_der, char ind_der, const Term_eq&) const;
63  virtual void set_system(System_of_eqs& syst, const char* name);
64  virtual ~Metric_ADS();
65 
66  protected:
67  virtual void compute_cov(int d) const;
68  virtual void compute_con(int d) const;
69  virtual void compute_christo(int d) const;
70  virtual void compute_riemann(int d) const;
71  virtual void compute_ricci_tensor(int d) const;
72  virtual void compute_ricci_scalar(int d) const;
73  virtual void update(int d);
74  virtual void update();
75 
83  void init_system(System_of_eqs& syst, const char* name_back_cov, const char* name_back_con, const char* name_back_ricci); // put the covariant and contravariant metric in cst of the system
92  void init_system(System_of_eqs& syst, const char* name_back_cov, const char* name_back_con, const char* name_back_gam, const char* name_back_ricci); // put the covariant and contravariant metric in cst of the system
93 
94  private:
95 
101  Term_eq derive_simple(const Term_eq& so) const;
102 
110  Term_eq div_eps(Term_eq& so, int n) const;
111 
118  Term_eq mul_eps(Term_eq& so, int n) const;
119 
120  friend class Metric_AADS;
121 };
122 
123 
128 class Metric_AADS : public Metric
129 {
130  protected:
131  int m_nd;
133  double m_L;
134  mutable bool m_doder;
139 
140  private:
141  mutable Term_eq** p_h;
142  mutable Term_eq** p_k;
143 
149  Term_eq derive_simple(const Term_eq& so) const;
150 
151  public:
157  Metric_AADS(const Space& space, Metric_tensor& hmet);
158  Metric_AADS(const Metric_AADS& so);
159  virtual void manipulate_ind(Term_eq& so, int ind) const;
160  virtual Term_eq derive(int type_der, char ind_der, const Term_eq& so) const;
161 
168  void set_system(System_of_eqs& syst, const char* name_met, const char* name_hmet);
178  void set_system(System_of_eqs& syst, const char* name_met, const char* name_hmet, const char* name_back_cov, const char* name_back_con, const char* name_back_ricci);
189  void set_system(System_of_eqs& syst, const char* name_met, const char* name_hmet, const char* name_back_cov, const char* name_back_con, const char* name_back_gam, const char* name_back_ricci);
190 
191  virtual const Metric* get_background() const;
192  virtual ~Metric_AADS();
193 
194  protected:
195  virtual void compute_cov(int d) const;
196  virtual void compute_con(int d) const;
197  virtual void compute_christo(int d) const;
198  virtual void compute_ricci_tensor(int d) const;
199  virtual void compute_ricci_scalar(int d) const;
200 
201  virtual void update(int d);
202  virtual void update();
203 };
204 }
205 #endif
Describes the tensorial basis used by the various tensors.
Definition: base_tensor.hpp:49
Class to manage asymptotically anti de Sitter metrics.
Term_eq derive_simple(const Term_eq &so) const
Computes the covariant derivative.
Vector * p_der_eps
Pointer on the vector containing the derivative of the conformal factor .
Metric_ADS m_ads
Background metric(i.e. ADS metric).
virtual void manipulate_ind(Term_eq &so, int ind) const
Uses the Metric to manipulate one of the index of a Term_eq (i.e.
double m_L
AdS length.
virtual void compute_christo(int d) const
Computes the Christoffel symbols, in a given Domain.
virtual void update()
Updates the derived quantities (Christoffels etc..) This is done only for the ones that are needed,...
Definition: metric_AADS.cpp:87
Metric_AADS(const Space &space, Metric_tensor &hmet)
Standard constructor.
Definition: metric_AADS.cpp:22
void set_system(System_of_eqs &syst, const char *name_met, const char *name_hmet)
Associates the metric to a given system of equations.
virtual void compute_ricci_scalar(int d) const
Computes the Ricci scalar, in a given Domain.
virtual void compute_ricci_tensor(int d) const
Computes the Ricci tensor, in a given Domain.
virtual void compute_cov(int d) const
Computes the covariant representation, in a given Domain.
Definition: metric_AADS.cpp:92
int m_nd
number of physical domains (usually the last compaxtified domain is discarded).
Term_eq ** p_h
Pointers on the differences between the covariant metric and the covariant background.
virtual void compute_con(int d) const
Computes the contravariant representation, in a given Domain.
Base_tensor * p_basis
Pointer on the tensorial basis (Cartesian basis only).
virtual const Metric * get_background() const
bool m_doder
true if metric variation allowed to be computed
virtual Term_eq derive(int type_der, char ind_der, const Term_eq &so) const
Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).
Term_eq ** p_k
Pointers on the differences between the contravariant metric and the contravariant background.
int m_place_syst
Where is the unknown h in the system of equations.
Metric_tensor * p_hmet
: the discrepancy between covariant metric and contravariant background.
Class to manage anti de Sitter metrics.
Definition: metric_AADS.hpp:45
int m_nd
number of physical domains (usually the last compaxtified domain is discarded).
Definition: metric_AADS.hpp:47
void init_system(System_of_eqs &syst, const char *name_back_cov, const char *name_back_con, const char *name_back_ricci)
Put the covariant and contravariant metric, dans the Ricci background into the System_of_eqs,...
Definition: metric_ADS.cpp:370
virtual void compute_riemann(int d) const
Computes the Riemann tensor, in a given Domain.
Definition: metric_ADS.cpp:314
Scalar m_rho2
Scalar containing
Definition: metric_AADS.hpp:49
virtual void compute_ricci_scalar(int d) const
Computes the Ricci scalar, in a given Domain.
Definition: metric_ADS.cpp:346
Metric_ADS(const Space &space)
Standard constructor.
Definition: metric_ADS.cpp:22
virtual void compute_cov(int d) const
Computes the covariant representation, in a given Domain.
Definition: metric_ADS.cpp:61
Scalar m_eps
Scalar containing the conformal factor .
Definition: metric_AADS.hpp:50
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
Definition: metric_ADS.cpp:357
virtual Term_eq derive(int type_der, char ind_der, const Term_eq &) const
Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).
Definition: metric_ADS.cpp:268
Term_eq mul_eps(Term_eq &so, int n) const
Multiplication by the conformal factor .
Definition: metric_ADS.cpp:488
virtual void compute_ricci_tensor(int d) const
Computes the Ricci tensor, in a given Domain.
Definition: metric_ADS.cpp:336
Term_eq div_eps(Term_eq &so, int n) const
Division by the conformal factor .
Definition: metric_ADS.cpp:456
virtual void update()
Updates the derived quantities (Christoffels etc..) This is done only for the ones that are needed,...
Definition: metric_ADS.cpp:56
Base_tensor * p_basis
Pointer on the tensorial basis (Cartesian basis only).
Definition: metric_AADS.hpp:51
double m_L
AdS length.
Definition: metric_AADS.hpp:48
virtual void compute_con(int d) const
Computes the contravariant representation, in a given Domain.
Definition: metric_ADS.cpp:81
virtual void compute_christo(int d) const
Computes the Christoffel symbols, in a given Domain.
Definition: metric_ADS.cpp:168
virtual void manipulate_ind(Term_eq &so, int ind) const
Uses the Metric to manipulate one of the index of a Term_eq (i.e.
Definition: metric_ADS.cpp:101
Term_eq derive_simple(const Term_eq &so) const
Computes the covariant derivative.
Definition: metric_ADS.cpp:210
Particular type of Tensor, dedicated to the desription of metrics.
Purely abstract class for metric handling.
Definition: metric.hpp:39
const System_of_eqs * syst
Pointer of the system of equations where the metric is used (only one for now).
Definition: metric.hpp:44
The class Scalar does not really implements scalars in the mathematical sense but rather tensorial co...
Definition: scalar.hpp:67
The Space class is an ensemble of domains describing the whole space of the computation.
Definition: space.hpp:1362
Class used to describe and solve a system of equations.
This class is intended to describe the manage objects appearing in the equations.
Definition: term_eq.hpp:62
A class derived from Tensor to deal specificaly with objects of valence 1 (and so also 1-forms).
Definition: vector.hpp:41